Vertex Map with sketch & toon shader?
-
Hi!
I'm trying to find a way to drive a Vertex Map with the Sketch & Toon Cel shader. What I'm trying to achieve is to generate a vertex map with only the shadows, I figured since the Cel shader is able to generate this it would maybe be possible.Any ideas if and how this can be achieved?
-
Hi history-growth,
That was asked a while ago (but the thread was sadly mixed with other questions and so too noisy for my taste), but let me answer how I would approach it.
Sketch and Toons is a Render Based Effect, so that will not work as a live source. Besides, the Cell shader has no concept of shadow; it works only based on the position of the light source. So two objects wouldn't affect each other in terms of shadow with that.
Try this:
The Object in question needs a neutral white Material. All other objects that are obscuring the view of that Object need to be disabled for the Camera view (Compositing tag, Seen By Camera: off)
Set your light source to get the shadow you like to have. This works for GI in the same way.
Then render from the point of view of the final camera; if animated, the whole animation might be needed.
This clip is then projected to the Object while the selection has an X in it. So you can use the data, but it doesn't interfere with the rendering. The Image or the clip is placed in the Illuminance channel. (Other channels will work as well, I prefer the Luminance channel)
Call up a Shader Field in the Vertex Tag and set up the Shader to Luminance.
Add a Freeze to it, and set it to update. Animate its influence from 100% over time to 99%; this refreshes it. (Tip credit goes to Lionel Vicidomini)
The Material is set to Camera projection and uses the same render camera.
The Shadow and Light should show up now in the Vertex Map.
All other objects can now be set to Seen By Camera, and you can carry any material you like. Use the Vertex Information as you need.
All the best
File/Example
https://stcineversityprod02.blob.core.windows.net/$web/Cineversity_Forum_Support/2023_PROJECTS_DRS/20230616_CV4_2023_drs_23_TXvp_01.zip -
Aaaah! Interesting technique. It works, now I'm just trying to set up a workflow to easily translate the original light to a Redshift light.
One thing - why not use the Refresh Frame checkbox (found in the bottom of the Shader Field settings) to force the Vertex map to continously update?
-
Hi history-growth,
Thanks a lot for the reply.
Yes, of course, you are correct, if the Refresh works for you, then please use it.
I had some trouble with it yesterday, so I shared the workaround, just in case.Enjoy your project