I’m trying to create a kind of layer effect with shadows, a bit like the looney tunes famous ending image (see picture attached). My approach is to use an alpha map on a phong mat to create the holes in grid SOPs (for now it’s just a circle, but it’s just to test the concept).
The problem is that I can’t find the way to cast shadows here. I want the first layer to cast a shadow on the second layer and so on, again a bit like the looney tunes tunnel. The transparency side is ok, but for now no luck with the shadows… I did the transparency using Blending in the phong MAT, draw priority in the GEOs, and transparency as sorted draw with blending in the render TOP. I also set the shadow type to soft 2D and shadow casters to my layers int the Light. (see the .toe attached)
I see that the full grids are used to cast shadows, without using the alpha map. So I think the problem for me is that the shadows are not taking my alpha map in consideration…
Any idea on the correct way to do that?
Thank you in advance!
Hey Kefon, it seems you’re mixing up the concepts of transparency and shadows.
Shadows are calculated in TD using the 3d shapes of your SOPs - and just applying a texture with alpha does not create an actual hole in a 3d model.
I’ve attached a basic example which outputs this image. It uses the Hole SOP to make a circular hole in a Circle SOP. There’s a custom par slider on the Geo COMP to change distance of the circles. Hope this helps!
Thanks a lot Nettoyeur for your quick answer!
I had an intuition about this, but your answer is perfect and it is exactly the result I’m looking for!
But…
I was using TOPs to make the holes, because I want to use dynamic black/white images as a mask to make the holes. The goal behind this is to be able to shape the holes with a TOP. So, is there a way to cut a real hole in my SOP using a TOP? Is there a way to cut hole in surface SOP using a TOP mask?
As an alternative, how can I cut a hole in a surface SOP using a 3D SOP (like a sphere or a cube)? I tried using the Project SOP but I can’t find the proper way to use it… (sorry, still a noob!)
you can do both - if you look in the patch I posted above in /circle_shadows/geo you’ll see I used it there as well - I cut a hole in the large circle SOP using a smaller circle SOP.
Attached examples for cutting a hole in a SOP using a TOP mask or by using another SOP.
But note that the Trace SOP used for creating a SOP mask from a TOP image is a heavy operation - not well suited for realtime animation. If you want to change hole shapes dynamically, probably better to think about pregenerating all the hole shapes and switching between them.
Also see Help → Operator Snipperts - > SOP → Hole SOP for another example using a cube. making_holes_with_TOP_or_SOP.tox (918 Bytes)
Yes, I understood the circle SOP / hole SOP setting from the circle_shadows.
After my last message I also found out the Trace SOP while looking for a solution, and also that it is pretty heavy for real time as you mentioned, so maybe not the best option!
I will have look at both option you’re suggesting (hole sop using 3D shape and pregenerating hole shapes created with trace). I will keep experimenting (and learn TD)
Thank you so much for your help and quick answers!
also note that all transformations on your circles (translatexyz, rotatexyx, and scalexyx) are practically for free without any impact when you do them at the Geo COMP level , as that happens on the GPU(contrary to all SOP operations which only happen on the CPU). So for a real time installation you should try to cook all your SOPs only upon startup of a scene (and for instance use Switch SOPs after that to switch between more or less static shapes) , and if you want to animate parameters every frame try to do them only at the Geo level. (like the Distance custom parameter I added to the Geo COMP in my patch above)