Hi, just wondering, can I create geometries that cast shadows, while being invisible?
you can use a shader to the object that uses what the camera is looking on if the object isn’t there, but it will be invisible only to the camera.
I have no idea how to do this, cause i’m not a shaders expert yet, but I know that this is possible, probably @nehon know how to do it.
If you are using the internal shadow system and it has shadow mode enabled with an actual geometry, it should cast a shadow. I guess you can use an alpha texture or colour to simulate the effect.
I think the post processor shadow renderer ignores shadowmode (casts a shadow/receives on everything) and the filter uses it (cast/recieve mode).
There are reasons that escape me for having both options.
Leaving this here for clarity.
To cast a shadow, the shadow pass of the material must render something… even if the regular pass doesn’t. I think you can only achieve that by customizing your material definition with your own shadow pass.
I guess fork Unshaded and replace its PreShadow frag shader with your own:
…that renders a different color map or solid color or whatever.
And this has nothing to do with shadow processor versus shadow filter. It will work the same for both.
To cast a shadow a geom needs to render depth. So if you want it invisible, you can disable color rendering on its material.
Then put the geom in the transparent bucket so that it doesn’t mask what’s behind it. Also make sure it has a shadow mode to Cast.
But note that it will still render depth in the regular 3D scene also and so may cause other things to be clipped or look strange even though it’s invisible. (other things in the transparent bucket, I mean.)
Yeah… We need custom buckets