Download

Possible to create an illuminated dance floor effect with dynamic lighting?

Hi All

Id like to create a dance floor that is dynamically lighting objects around it ie characters, moveable objects,etc. It seems spotlights only cast a single colour, id hoped i couldve plugged in an animated material to change the colours. Ive also tried projecting a light through a surface from below with a modulated material but it only works for static lights. Any ideas? Im about to try particles that emit light, but wondered if there was a better way?

Thanks

72807339ddf4d244193a6922ca5bb614fede4b8f.jpeg

you can set up a light in a blueprint and change its color however you desire.

Thanks, ill give that a go,although Im a total noob with blueprints. Ive actually managed it with particles and it works well, but im trying to figure out how to match the animating material I have for the emissive dance floor with the particles that are emitted.

Anyone know how I can project a material over the particle emitter. So for example I have a 8x8 grid of colours changing in the material, I want those to match up with the particle placements. So say the grid at the bottom left would be green and the particle emitted from that area matches the material.

With that approach you will still need a light for each different color since all lightfunctions have the limitation of being grayscale.

I am curious about the modulated approach you said you tried. I am not sure what static lighting limitation you are talking about. Could you elaborate a bit please?

I would try projecting the material onto your geometry using a “Worldposition behind translucency” material. Using that technique you can get nice soft colored lighting but you can only affect opaque objects with it.

If you want to project a texture onto a particle system, you need to do the same worldspace projection within the materials in your particle systems. Here is an example. It’s simple world-XY mapping a texture and then using worldposition and dot product to fade the effect. It will always be unshadowed though. Using a random texture from EngineContent.

Emissive_Project_Mat.JPG

Emissive_Project_Mat2.JPG

Notice how you see the center black hole on the lower sphere that is closer to the ground and the higher sphere has a more desaturated blurred color. That is because the material uses the distance from the Actor Z to control the Mip level of the projection texture.

It also masks using a sphere mask and normalmap falloff. This projection is a simple orthographic projection but you could also easily give it some FOV by dividing XY by Z scaled by some factor.

Also this example is a simple texture but it could work with animated material effects as long as you can match the world coordinates to the scale of your ground material UVs or whatever you used to define the grid.

To make this effect work requires placing a box around the entire bounds of the area you want the effect to show up. It is best to use flipped normals on that mesh and check “Disable Depth Test” in the material. One additional depth mask is required to mask foreground geometry that I forgot to paste. If you want to use this I’ll get that too.

To match in a particle system, do the same just using “worldposition” instead of “worldpositionbehindtranslucency”.

Great, thanks Ryan.Will look into that.

I was trying this technique below at first, to project a light from under the dance floor using the same material i have to colour the squares of the dance floor. But it says only works with static lighting.
https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/HowTo/ColoredTransluscentShadows/index.html

ohhh yes I see what you mean. I didn’t realize you meant the lightmass baked translucency.

Yes that only works with static lighting, but also only works with static objects since its entirely lightmap based. So even if your floor were static that approach would not help for characters.