Texture as shadows

Node-based Shader Editor

Texture as shadows

Postby Freitas » Fri Apr 20, 2018 7:40 pm

Hi guys,

I would first like to thank you for creating this amazing tool, its so much better then the UE material editor.

So, I'm trying to create the shadow effect from the image below, the edge of the shadow have some kind of texture.

Image


With the shader below I can change the texture shadow, but works only with flat colors.
Image

In one of my attempts, I was able to add another color to the "shadow border/edge" but I forgot to save the graph :roll: but was made only using lerps + blends...

I also found this graph from Shader Forge:
Image
And the shader:
Image

I tried to remake the shader above (Shader Forge), like this:
Image

But I got only this on the Unity view, no texture, only white color :(
Image

I also tried to use the Light Attenuation as a mask :lol: and no success

Do u guys have any suggestion on how or if its possible to make this shader or someting close to this using Amplify?
Freitas
 
Posts: 3
Joined: Tue Apr 17, 2018 7:58 am

Re: Texture as shadows

Postby Amplify_Borba » Mon Apr 23, 2018 11:37 am

Hello!

In order to apply a texture to a shadow, you can use the following node setup as a simple starting point:

Image

Here is a more advanced example, with additional control:

Image

Do note that adjusting shadow appearance is not as straightforward as it might seem, some advanced techniques such as NGSS actually involve replacing Unity's built-in system.

Please let me know if this helps, 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

Re: Texture as shadows

Postby Freitas » Mon Apr 23, 2018 3:12 pm

Hi Borba :)

I tried your shader, and I cant get the texture to show in the shadows :( got the same result from one of the graph I posted before. I tested both on a empty scene and as you can see in the image below:

Image

I also tested in another scene, got same result:
Image

Shadow Quality:
Image

But with my old shader, the shadow shows up, atm this is what I have, now I just want to make this.
Image

Do you have some ideia, why the texture is not working/showing up?

Thanks again :)
Freitas
 
Posts: 3
Joined: Tue Apr 17, 2018 7:58 am

Re: Texture as shadows

Postby Amplify_Borba » Mon Apr 23, 2018 5:50 pm

It might be related to your scene, could you provide us with a simple sample with the issue present so that we may debug it on our side?

Feel free to send it through [email protected] or via WeTransfer, 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

Re: Texture as shadows

Postby Freitas » Mon Apr 23, 2018 8:31 pm

You are right, its some kind of issue with the project, even if I create a new scene in the project, the "shadow texture" dont works.

But when I created a new project the shader works :/

Image

And I just sent the project file to [email protected]
Freitas
 
Posts: 3
Joined: Tue Apr 17, 2018 7:58 am

Re: Texture as shadows

Postby Amplify_Borba » Tue Apr 24, 2018 10:50 am

Thank you for taking the time to send us a sample!

Upon testing it, the shader seems to be working as intended, although we've noticed that there were no texture set in the material so it was defaulting to white.

Image

Could you confirm on your side if setting textures on the material has the shader work as expected? 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