- Home /
How to achieve this effect in an easy way?
Hi
I always wondered if there is an easier way to achieve this effect (the green light stripes):
My current approach is to align the UVs and make the texture scroll (as you can see it´s messed up right now). This takes a lot of time. Is there an easier way to do this? Through a shader or something (I have zero experience in shader writing)?
It´s from an UE4 experiment of mine. Don´t stone me to death for this :D
Its probably not the response your looking for, but when I saw that, my first thought was animation.
Answer by phil_me_up · Feb 23, 2016 at 12:31 AM
Shaders are absolutely the way to do this. Whilst I can't tell you off the top of my head what the best approach is, you'll probably want to look at having a scrolling gradient which you then tint. The speed of the scroll can be controlled through an exposed property, as can the colour tinting etc.
If you're not familiar with writing shaders, then looking at something like Shaderforge would be a good start. It's fairly similar to UE4 with respect to building shaders.
Shader Forge is quite expensive. I'll see if I can do this within UE4 first.
Answer by tanoshimi · Feb 23, 2016 at 06:52 AM
If you're shading in world space coordinates you don't need to worry about lining up the UVs, but if you want them in object coordinates then the way I've always done it is the same as you describe you're already doing.
Bu is there a way to align them by code? It's really annoying to do this by hand.
Your answer

Follow this Question
Related Questions
Fake Volumetrics via custom bloom 0 Answers
Using Color.Lerp with Lightweight Render Pipeline 1 Answer
Layer Dependent Reflections 1 Answer
how to do a simple multi-pass rendering? 0 Answers
Forward Rendering for Terrain, overriding the shader? 0 Answers