I am messing around with sprites in 3D, I cannot work out how to set it so if a sprite is in front of a light the front of the sprite it is also lit up.
I am using the ‘DefaultLitSprite’ material and have tried modifying it to get the result I want to no avail.
If anyone knows how I can make the light affect both sides of the sprite regardless of its position to it, I would be very grateful!
I’m also messing around with sprites, and the only solution I found to this is to use a translucent material. There is actualy a TranslucentLitSpriteMaterial.
use Subsurface Scattering to let the light from the lamps shine through your sprites. If you use the Sprite color as input, then it gets lighten up just like the Sprite looks. You also can multiply the sprite color with a color vector to adjust the tint (f.e. make it slightly orange, or to match the lights color).
use a low emissive value to brighten up all sprites, if you come to the conclusion, that your scene is overall to dark. This also helps stopping places, that get no normal light from being completely black, like instead of pure black shadows, you will get shadows that have the color of whatever color you use as input for your emissive slot.
I got the best results with a combination of both methods.
Edit: If you use emissive, then you also can link the emissive value to a parameter (like the distance between your player and the fire, scaled down to a range between 0 and 1 ^.^), and set this parameter dynamically while playing.
I tried this with this distance calculation from here:
and some light blueprints, which i gave an extra collision channel (so that the multitrace just needs to trace for those objects, that i want have to react to the emissive material), and it worked pretty well.
I am just not sure, why it didn´t work, if i use the multitrace distance directly from that beak hit result, but with the calculation he used there, it works.