FakeDynamicLight_Sprite_MaterialFunction
- Exposure: public
- UE Version: 4.20
This is for making a single sprite look like a fairly convincing dynamic light. Great for flashes during explosions so you don't have to spawn a dynamic light. Instruction count by default is 31. You can turn off directionality to reduce it to 22 instructions. Note that the instruction count you see in the material editor, in 4.20, will be wrong. See the function input descriptions for accurate counts.
ctrl + v
-
Fixed an issue where particle alpha at 0 would make it a black light instead of invisible (replaced a multiply with a lerp).
-
Added instruction count for close fade
-
Improved close fade smoothness
-
Cleaned up previous version
-
Added an option to fade when up close, so there isn't a pop if the camera goes through it (generally only needed for sprites that are around for a while)
-
Initial
1 comment
-
This is for making a single sprite look like a fairly convincing dynamic light. Great for flashes during explosions so you don't have to spawn a dynamic light. Instruction count by default is 31. You can turn off directionality to reduce it to 22 instructions. Note that the instruction count you see in the material editor, in 4.20, will be wrong. See the function input descriptions for accurate counts.
- Paste this into a material function.
- Add the material function to a new material, Blend mode = modulated. Unlit. Disable depth test = true. Render after DOF = false.
- Make a particle system that spawns a single sprite. Apply this material.
- Set the particle color - for convenience, alpha multiplies the color. COLOR VALUES NEED TO BE VERY HIGH FOR THE EFFECT TO SHOW UP. For an explosion, for example, you want the color to be 100 or higher.
Spoondog
August 27, 2018, 2:08 am