Colored Shadow

Hi everyone, those anyone know how i can create a material that cast a color shadow like this :translucent_T.jpg.

I found this image here :

But i don’t understand how i can do this ? I prefer not going in the c++ code.

Is there a way to do it with material properties ??

Thank you very much and sorry for my english !

EDIT: Nevermind, looks like you can simply do it by piping the colour into your translucent material, and the engine automatically calculates the transmission colour based off that map. The below method may work if you want a high-resolution coloured projection.

If I recall correctly, this is achieved using a spotlight, with a light function attached. I’ve got a feeling you can only do greyscale light gobos, so you have to make three lights, each with red, green or blue, and apply a different gobo based on the relevant colour channel from your image (so that you end up with 3 greyscale images from the red, green and blue channels of your ‘stained glass’).

Colored translucent shadows are only supported for lights with Mobility set to Static, so make sure you have that setup. That’s how the image you linked to was created.

Light functions are greyscale-only due to performance constraints.

That image is from UE3 in 2009 and the feature that allowed lightmass to do that hasn’t been working in UE3 for quite some time. I tried to do the same in UE4 but did not have any luck, though this was some months ago and I’m not sure if it is working now.

Crow, did you get it to work as intended, or did you end up using a light function?

Coloured light functions are kind of handy, can we get those back in?

It wasn’t actually me that was trying to get this to work, I just offered an answer. Sucks that it only works with static lights, but you can still use three dynamic lights with a light function for each colour channel (R, G, B) and layering them up to get a proper colour image - a little like an old school home video projector with the three lamps.

It’s doable in realtime with something that’s not too bad. But it’s not actually a common occurrence in most games, unless you’re in a church how many places have stained glass windows?