A light that casts a shadow rather than luminating the area

image
image

You can see in the photo with the dark road I can use a spotlight to create the circles on the ground, but I want to be able to cast black circles onto the white road as well. The road is made of an emissive material for both the Black and White materials.

I noticed that using a colored light that wasn’t black would cast a very very feint red ray and feint circle but it wasn’t noticeable. Is there a way I could make a totally black circle appear on the road.

Side note: I am making this for an android platform so I can’t use post processing. Thank you!

Only real way would be to make the road material listen to other intersecting objects by using distance field gradient.
Then you just add a cone to the lightposts that matches the cone of the light.

The white street material will then isolate the intersecrion and color it different - but you have no option to make it nice and smooth like light operates.

The only way to do that would be to force the street to use a custom moving render target.
You would then capture a special version of the cone mesh or change it to a single point with a falloff value so as to render the fading shade into it.
Its probably more expensive than a post process, so you have to bench it for android on the lowest possible device you want to support.

Then again, if your game is supposed to look like those screenshots and they arent just this way to prevent showing actual work… im not really sure you should be using Unreal.

A 2d engine like Flash used to be would be able to make exactly what you want and it would be a lot easier…
I think it would acrually be easier to render this directly in OpenGL via android studio…

Thank you for the response!
I do think that your idea could work but it does seem like it could get expensive.

I can’t say that I’m too sure what you mean by “im not really sure you should be using Unreal” but its kind of the only thing I’m familiar with and I’ve been trying to feel out what my options are.

I have the game set up so that the light cones react to music, and the game is a very barebones endless runner where the player has to dodge those obstructions while the music plays. It was a cool touch that the lights reacted to the sound but after removing the post process and remaking the features I couldn’t really mimic that affect in the “daytime” version. I do think that your idea could work with the right implementation but I think you’re right in saying that it might just be too expensive. This is just a side project I’m using to see what I can and can’t do in Unreal though so its not the end of the world if what I want isn’t possible for my specific scenario.

In a close environment you don’t really need to use RT.
Just the location in world position of where to pop in the rounded pre-shaded circle…

And/or a matched texture.

So for instance, instead of having the lightpost be completely random, you can make them all the same or randomize sequences of 5 or so of them to keep the matched road textures in sync.

And what I meant is that Unreal is overkill for an android game. It adds way more complexity than needed - particulaly if using less than 8bit for colors. But ofc thats not an issue if you are just trying to learn the engine.

1 Like