UE4 - Is there a way to control the start point of a scrolling texture on a mesh particle? [SOLVED]

Hey All,

Sorry if this is a super simple question but I have had no luck on google looking for an answer, so thought I’d ask you awesome peoples.

In Unreal, I am using scrolling textures for mesh based particles. I have burst behaviour down and all is well, however, if I want a continuous spawn of mesh based particle, I notice that the scrolling texture seems to be panning at a global speed and position which makes sense. I know how to set the speed of a scrolling texture at spawn using a dynamic parameter, but I can’t work out how to set it so the material starts panning from the same location on each new mesh that is spawned. This means that meshes may spawn with the material already half way along it, or at the end of it etc.

Is there a way to do this?

Thanks peoples :slight_smile:

Try this:

The Particle Relative Time node counts from 0 to 1, spawn to death for each particle. If you use that, the offset will start from 0 on each one. If the speed is too high you might start to lose precision, therefore that frac node will fix it for you.
Does that answer? Let me know :slight_smile:

2 Likes

Hi Bruno, thanks for the quick reply, much appreciated.

I have set up the material as you have above and applied it to a test particle system. It seems I am still getting the same behaviour though…

Is there any way to control Particle Relative Time via parameter in cascade maybe? ( have no idea, just guessing :slight_smile: )

Cheers!

doesn’t Particle Relative Time just work with GPU sprites?

You can definitely just create a Dynamic Parameter and set that to 0-1 over the lifetime to achieve the same result.

What would you hook the dynamic param into though? Wherever I put it, it seems to either do nothing or break everything more.

if you plug it into the Time input of a Panner node that should do the trick - they’ll all start at the same point in the Panning and you can control how far the material scrolls by changing the end value.

1 Like

The way I set up there is that you can access the parameter “Use Relative Time?” from a material instance. Set it to True and it should work!

@tharlevfx afaik it works with all particles, but the “Particle Random Value” is GPU particles only.
Also, can’t use dynamic parameters with gpu particles!

2 Likes

Back in my day we used to encode the particle time in the alpha. So the particle colors alpha WAS the time.
Now days, there’s all these fancy dynamic parameters and “particle relative time.”
damn millenials

2 Likes

Ah gotcha, I will give that a go, thanks :slight_smile:

@Bruno Ah, I wasn’t using an instance, so I will give that a bash and see how I go… I may end up with 2 solutions!

@tharlevfx @Bruno

Hey guys, good news, both methods work. I think I was just unclear about how the time aspect was working, but now I have 2 solutions to the same issue which will hopefully enable me to do some nice continuous spawn mesh effects with scrolling textures.

Huge thanks to you both! :slight_smile:

1 Like