Material Emissive Value Based on Player Proximity?
I'm not really sure if something like this is even possible, but I thought I'd ask just to be sure:
To give some background, I have a Player Controller in a 2.5D side scroller I am making (2D Gameplay with 3D Assets). The game's visual style is strongly based on silhouettes and emission.
So, what I want to achieve: is that I have various surfaces that have emissive values in their materials (but they are hidden by default) and I'd like them to light up when the player is close enough. But I don't want the entire material and mesh to light up, only parts of the surface that are close to the player.
One example is that I have a log mesh and material that is driven along a spline. By default it is normal, but I can drive an alpha value that makes the crevices in the bark glow. But this affects the whole mesh, when really I'd like to be able to only make the surface that is close to the player glow, as opposed to the entire mesh.
Is this even possible to produce? Thanks.
asked Sep 03 '18 at 10:28 AM in Blueprint Scripting
I'm not sure I fully understand your idea, but you can try to use simple sphere mask.
In case your camera is always on fixed distance from player, you can get camera position in material, add offset vector to it, and use it as position for sphere mask.
and use this as emissive mask for every material you want.
answered Sep 03 '18 at 10:40 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here