Page 1 of 1

Outline with smoothed normal issue.

PostPosted: Sun Apr 07, 2019 11:00 am
by presto0727
Hello,

Currently, I'm making custom Toon shader for the project of my team.
Mostly, everything is OK, but I have one specific issue.

In many cases, we are using game objects that we intentionally hardened edges In order to get the shading we want.

https://drive.google.com/file/d/1bOU0ZdlG6eqBjwTrEyDxCKrPbGy-awcT/view?usp=sharing

However, when I apply outlines in the usual way, the out line becomes all broken.
(I understand that. because the outline's normal came from original mesh with hard edge)
https://drive.google.com/file/d/159N_bpjhwcrA75dHsvPoP6z1bS4Bi8dO/view?usp=sharing

But if there is any way to do, I want to get the outline as if it came from the mesh with smoothed vertex normal while I maintain original mesh with harden edge.
https://drive.google.com/file/d/10SS3TALfjb35kMJbaxfgIZfA2k-tlBbk/view?usp=sharing
(I intentionally made outline thick to help my explanation)

can I get some help?

Re: Outline with smoothed normal issue.

PostPosted: Tue Apr 09, 2019 12:41 pm
by Amplify_Borba
Hello, can you share a sample of your shader? Are you using our Outline node?

Re: Outline with smoothed normal issue.

PostPosted: Wed Apr 10, 2019 5:32 am
by presto0727
Hi! Thanks for your reply.
I'll attach my hair shader sample on this pose.
this is unity package contains test scene, material, and my shader.

https://drive.google.com/file/d/1bb9hTPuWsAaSOqHrb0vnyWVlPTJ7Pf7l/view?usp=sharing


and attach two image here too.
Image

Image

(sorry, I'm not sure how to post image correctly. you can see the image by "right-clicking and open the image from new tab".)

in the scene, there are two torus mesh, one is with all soften edge and one is with harden edge.
In the shader, I used usual ASE outline node.
I want to make outline from harden edge torus look like the outline from torus of soften edge.

Re: Outline with smoothed normal issue.

PostPosted: Wed Apr 10, 2019 2:46 pm
by Amplify_Borba
Thanks!

Please note that our Outline node might not be suitable for all types of effects, we've added it for convenience and as an example even though we've been expanding its features over time, but for certain situations it might be best to create a custom solution.

In any case, you might try to use the Vertex Scale type rather than the Offset, so that vertices are scaled rather than moved, effectively smoothing the jagged torus.

Re: Outline with smoothed normal issue.

PostPosted: Wed Apr 10, 2019 3:58 pm
by presto0727
Thank your for the reply. I'll look for the custom solution, and try to use vertex scale too. :>