please any idea on how i can build a lenticular card shader, see reference https://youtu.be/hZ7P8B3JhWg

please any idea on how i can build a lenticular card shader, see reference https://youtu.be/hZ7P8B3JhWg

Anonymous
Not applicable
1,119 Views
7 Replies
Message 1 of 8

please any idea on how i can build a lenticular card shader, see reference https://youtu.be/hZ7P8B3JhWg

Anonymous
Not applicable
 
0 Likes
1,120 Views
7 Replies
Replies (7)
Message 2 of 8

madsd
Advisor
Advisor

Via OSL you have access to a 3D position and orientation vector, inside the shader. You can map a deer 5 meters inside the shader and camera face the sprite.

You would want to create a step sequence that takes the camera angle in adequate ranges and return an int value that triggers the motion, so alignment only occurs when the angle goes over or under a specific float value.

So you convert the camera angles max min max to create stops in both ends. Lets say the effect should occur between 0 and 90 degrees. from left to right and you break that up into the amount of steps you want. Giving option to move a bit without constantly realign the deer.

You would source the physical scene cameras world space data into the OSL map as vector inputs or floats, and if you want to control camera functions inside the shader as well, you can make UI for that too, and link that up as well.

Create a unit worldspace in the shader, integrate.


Coding skills needed for 1 shader.

For giant tree of core nodes and custom OSL node to do easy tricks, possible, but not as elegant.

0 Likes
Message 3 of 8

Anonymous
Not applicable

thanks for the idea but ion know shit bout' writing osl shaders yet..do you?

0 Likes
Message 4 of 8

madsd
Advisor
Advisor

A bit yes.

0 Likes
Message 5 of 8

zenop
Advocate
Advocate

There's a few examples already available of how others are approaching this:

https://forum.shaders.xyz/d/11317-challenge-09-lenticular-card/19

0 Likes
Message 6 of 8

Anonymous
Not applicable

yo i know...i'll try those methods tonight...thanks.

0 Likes
Message 7 of 8

madsd
Advisor
Advisor

I missed the concept entirely I can see that now, I was entirely thinking about making a 3d world inside the shader ( which is possible, but not needed for this effect )

0 Likes
Message 8 of 8

Anonymous
Not applicable

haha...no problem..i'll try with facing ratio.

0 Likes