Backface shading question

Node-based Shader Editor

Backface shading question

Postby dg06113 » Sun Jan 07, 2018 6:03 pm

Hi!

Im doing a shader for plants etc.

Now i have a single sided mesh with culling turned off. But then the backside shades the same as the frontside, Being lit although its facing away from the light.

Is there anyway for the backside of the face to shade correctly or do i need to double the geometry and invert the normals? I really hope i dont need to:-(

Thanks!
dg06113
 
Posts: 1
Joined: Sun Jan 07, 2018 5:52 pm

Re: Backface shading question

Postby Amplify_Borba » Mon Jan 08, 2018 10:24 am

Hello dg06113, thank you for getting in touch!

Cull set to off disables culling, producing a double-sided material, however light is still calculated according to the normal of the mesh's face and, as result, it will not render correctly for the back face, which is the expected behavior.

There are a few ways to work out this situation, the simplest one by using our Switch by Face node to provide different inputs for when each face is facing the camera, or the Face node which outputs a positive or negative value if the rendered surface is facing the camera.

These nodes indicate whether you are rendering front or back faces, however, the best way for dealing with this is by using two separate passes, one for rendering front faces and another one for back faces. Unfortunately, we are still unable to create multi-passes with ASE as it is a feature that is still under development and should be added in the near future.

Please let us know if this information was helpful and if you have any further questions, thanks!
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!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 0 guests