Shadows not following vertex offset

Node-based Shader Editor
Post Reply
shaals
Posts: 3
Joined: Fri Nov 09, 2018 3:22 am

Shadows not following vertex offset

Post by shaals »

Hello,

I'm having some weird issues when trying to do vertex offset to move objects. Each objects individual shadows does not follow the object. I've tried two different methods and had a different issue with both.

Method 1:
I found a sample of how to do rotation about an axis and plugged that in. However, when I set the render type or render queue to anything other than opaque/geometry, the shadows no longer follow.

Sample Rotate with Opaque/Geometry
https://imgur.com/a/ImBwlfv

Sample Rotate with Transparent/Geometry
https://imgur.com/a/Jfo9Glk

Method 2:
I played around until I could achieve a rotate through another method:

Custom Rotation with Opaque/Geometry and (World Postion - Object Position)
https://imgur.com/a/Gm3X3mb
https://imgur.com/a/BAw9p7L

Custom Rotation with Opaque/Geometry and only World Position
https://imgur.com/a/oV77M6d
https://imgur.com/a/Txowrzf

It's clear that the shadows are having issues with the (world position - object position) logic but not sure exactly why or how.

Any ideas on how to fix this or a work-around?
Attachments
SampleRotate.zip
SampleRotate Shader
(2.05 KiB) Downloaded 270 times
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Shadows not following vertex offset

Post by Amplify_Borba »

Hello, thank you for getting in touch and for your support!

I believe that you'll also need to calculate the normals through the 'Local Vertex Normal' port, please refer to the following sample and let me know if helps:
SampleRotate.zip
(5.1 KiB) Downloaded 326 times
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!
shaals
Posts: 3
Joined: Fri Nov 09, 2018 3:22 am

Re: Shadows not following vertex offset

Post by shaals »

That example is pretty close to what I pulled from before. It works up until the point that I add transparency and plug in an alpha channel into the opacity or opacity mask port.

It seems the opacity ports aren't 1:1 with the albedo/emission ports.

https://imgur.com/a/qDhRwdF
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Shadows not following vertex offset

Post by Amplify_Borba »

Can you please share a simple sample with the issue present that we can examine?
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!
shaals
Posts: 3
Joined: Fri Nov 09, 2018 3:22 am

Re: Shadows not following vertex offset

Post by shaals »

Well it seems as though installing the newest Amplify update has solved the problem. xD Cheers!
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Shadows not following vertex offset

Post by Amplify_Borba »

Thank you for letting us know, apologies for assuming that you were on the latest version!
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!
Post Reply