Invisible mesh that shows shadows cast onto it and occludes geometry that passes behind it

Hi, I’m making an isometric game that uses 3D characters superimposed over a 2D background. I’m using invisible 3D geometry for collisions, but was wondering if it was possible to have the shadows cast onto that geometry appear? I also want to use the geometry to occlude the characters as they pass behind it.

Thanks

Hi Mark,

There isn’t a way to have hidden or translucent objects with a cast shadow on them. The shadow will cast through any translucent objects. It is however to do the reverse and have translucent or hidden objects cast a shadow and this can be set through the details panel for the specific object under rendering > Cast Shadow > Cast Hidden Shadow.

Thank you!

Tim

Hi Tim, thanks for the reply.

I’ve been moving my project across from Unity to UE4 and this is my biggest roadblock so far. In Unity I have a shader that does what I’ve described. Is there no way to achieve this in UE4? I can’t think of another way to make it look as though my 3D characters are casting shadows onto the 2D isometric background.

Thanks,

Mark

Looking into this a little bit further it can be done but I’m not sure it will give you the results you are looking for.

When you create your translucent material set the TLM mode to Surface and the blend mode to Translucent. The problem here is that you will not really be able to see it without the mesh that is casting the shadow being scaled up. It’s a very soft shadow and when it’s a fully translucent object you will not see it at all.

I know you said you are using a 2D isometric background, is this an image you’re generating by making the 3D models and then making the 2D image or are you getting the 2D image from another source?

It was suggested that if you’re making the 3D models you could use them as Imposter Sprites to generate shadows that way based on the models themselves. I’ve not tested this method but it may be a possibility.

I don’t think that’d work for me, I need it to be completely invisible.

I’m building the model in Max and rendering in VRay. In my Unity setup, I had planes in the distance with the render as an unlit texture, and I had the characters walking around on the geometry I’d used for the render for collision, occlusion and shadows, but that geometry was completely invisible thanks to a shader somebody had created on a forum.

Here’s an example image of where I’m at:

Even though that background image is off in the distance, I want the character to cast shadows that appear as though they’re on the background, and have the character occluded as it passes behind objects.

I’m not sure if the method I used with Unity is the best way to go about it, but it’s really holding me back at the moment. Thanks for your time, I really appreciate it.

I could really use this functionality as well. I’m making a 2.5D game and I also need it to appear as if the character is sitting on a ground plane that isn’t really there. Can anyone from Epic comment on the possibility of this functionality being added to the engine? Thanks!

Look, this. Is the solutions combined.