Silhouette Shader
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Silhouette Shader
Hi,
Is it possible to use ASE to create a silhouette shader? I'm aware of the Outline feature built into ASE currently, but this seems to render an outline on all edges rather than just the silouhette based on the camera position.
I've also noticed that with the Outline feature I get floating outlines if my models are using their own imported normals or on intricate details. Calculating normals within Unity fixes this issue but I don't want to manually calculate normals.
I've attached some screenshots to explain what I mean.
Is it possible to use ASE to create a silhouette shader? I'm aware of the Outline feature built into ASE currently, but this seems to render an outline on all edges rather than just the silouhette based on the camera position.
I've also noticed that with the Outline feature I get floating outlines if my models are using their own imported normals or on intricate details. Calculating normals within Unity fixes this issue but I don't want to manually calculate normals.
I've attached some screenshots to explain what I mean.
- Attachments
-
- Silhouette_Shader.jpg (176.03 KiB) Viewed 11656 times
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Silhouette Shader
Hello,
Thank you for reporting the issue, we would be happy to examine it!
Can you share a sample for further testing on our side? (model and shader)
Feel free to send file download links directly to [email protected].
Thanks!
Thank you for reporting the issue, we would be happy to examine it!
Can you share a sample for further testing on our side? (model and shader)
Feel free to send file download links directly to [email protected].
Thanks!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Silhouette Shader
Hi Ricardo
Thanks for getting back to me. In regards to the issue with the current Outline effect - I'm not entirely sure what to send you. All I'm using is the tick box for "Outline", and this issue occurs on anything that doesn't have soft normals (such as a standard Unity cube).
However, I am looking for information on whether there are nodes that will let me create a silhouette effect instead of the way the Outline effect currently works. I want the outline to only be around the outer edges based on the position of the camera.
The desired effect below is not done with an Amplify shader.
Thanks for getting back to me. In regards to the issue with the current Outline effect - I'm not entirely sure what to send you. All I'm using is the tick box for "Outline", and this issue occurs on anything that doesn't have soft normals (such as a standard Unity cube).
However, I am looking for information on whether there are nodes that will let me create a silhouette effect instead of the way the Outline effect currently works. I want the outline to only be around the outer edges based on the position of the camera.
The desired effect below is not done with an Amplify shader.
- Attachments
-
- Silhouette_Shader_02.jpg (83.73 KiB) Viewed 11652 times
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Silhouette Shader
Thank you for the additional information, I just wanted to confirm that we could replicate the issue on our side.sazberryftw wrote:Hi Ricardo
Thanks for getting back to me. In regards to the issue with the current Outline effect - I'm not entirely sure what to send you. All I'm using is the tick box for "Outline", and this issue occurs on anything that doesn't have soft normals (such as a standard Unity cube).
However, I am looking for information on whether there are nodes that will let me create a silhouette effect instead of the way the Outline effect currently works. I want the outline to only be around the outer edges based on the position of the camera.
The desired effect below is not done with an Amplify shader.
Changing the Outline mode to "Vertex Scale" should resolve the issue. Alternatively, I recommend looking into the Custom Outline setups, they are quite flexible.

Looking forward to your feedback!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Silhouette Shader
You can recreate the issue by using the example outline shader that comes with Amplify, and apply it to any object with hard edges, such as a cube. I assume this happens just because of the way vertex offset is calculated?Ricardo Teixeira wrote: Thank you for the additional information, I just wanted to confirm that we could replicate the issue on our side.
Using "Vertex Scale" seems to still outline inner edges (see screenshot). It also seems to scale from the pivot of the mesh rather than the center, is this how it's meant to work? Am I able to change it to scale from the center of the mesh? I have attached a Unity package with the asset from the screenshot.Ricardo Teixeira wrote:Changing the Outline mode to "Vertex Scale" should resolve the issue. Alternatively, I recommend looking into the Custom Outline setups, they are quite flexible.
Looking forward to your feedback!
I am using version 1.4.2 of ASE incase that is an issue.
- Attachments
-
- Outline_Inside.jpg (73.31 KiB) Viewed 11642 times
-
- OutlineShader_Issues.unitypackage
- (136.97 KiB) Downloaded 1136 times
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Silhouette Shader
Yes, I tested it with the default Cube.
Unfortunately, although you can tweak the way the outline is drawn, I don't think that you can quickly fully exclude overlaying outline effects.
I will have to get back to you tomorrow as soon as the ASE developer gets back to me. (national holiday here)
Thank you for bringing up the issue, hopefully there's something we can do to help.
Apologies for the inconvenience!
Unfortunately, although you can tweak the way the outline is drawn, I don't think that you can quickly fully exclude overlaying outline effects.
I will have to get back to you tomorrow as soon as the ASE developer gets back to me. (national holiday here)
Thank you for bringing up the issue, hopefully there's something we can do to help.
Apologies for the inconvenience!
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Silhouette Shader
Okay thanks for the info.
Look forward to hearing more.
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Silhouette Shader
In order to mitigate the outline issues, so to speak, we recommend using a custom outline similar to the screenshot; Transparent, ZTest=Always, and ZWrite=On. In any case, this solution will not work for every type of model.sazberryftw wrote:Okay thanks for the info.Look forward to hearing more.
In order to add a flawless outline you will need to implement a custom screen space solution. It involves a few additional scripts but it's quite flexible.
Unity Shaderlab Outline - Screen Space
I hope the information above helps, be sure to let us know if you have any additional questions.
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Silhouette Shader
Thanks, I implemented this and I can see what you mean.Ricardo Teixeira wrote: In order to mitigate the outline issues, so to speak, we recommend using a custom outline similar to the screenshot; Transparent, ZTest=Always, and ZWrite=On. In any case, this solution will not work for every type of model.
Thanks for the information. I have a Valve Silhouette shader (package attached below) that appears to create a silouhette without the use of a screen space post effect. However, it masks out everything but the outline. Is it possible to use their method combined with the standard shader within Amplify?Ricardo Teixeira wrote:In order to add a flawless outline you will need to implement a custom screen space solution. It involves a few additional scripts but it's quite flexible.
Unity Shaderlab Outline - Screen Space
I hope the information above helps, be sure to let us know if you have any additional questions.
I just stumbled across this whilst googling: http://amplify.pt/forum/viewtopic.php?f=8&t=425
Is the multi-pass effect mentioned what I'm trying to achieve?
- Attachments
-
- SilhouetteShader.unitypackage
- (99.23 KiB) Downloaded 797 times
- Ricardo Teixeira
- Posts: 954
- Joined: Fri Aug 09, 2013 2:26 pm
Re: Silhouette Shader
I believe that was before we included support for Outline effects as we do at the moment.sazberryftw wrote:I just stumbled across this whilst googling: http://amplify.pt/forum/viewtopic.php?f=8&t=425
Is the multi-pass effect mentioned what I'm trying to achieve?
Regarding the Valve example, it's great reference but unfortunately it requires multi-pass support. We're actually working on multi-pass support as we speak, it should be available in a couple of weeks.
I would definitely recommend looking into the screen-space solution as it provides the best results, regardless of the geometry used.
Apologies for any inconvenience caused, we'll keep your email on record and notify you as soon as multi-pass support is available.
Sales & Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!