UE4 Cascade & Material Questions [FX Questions]

@TheVman: Ahhh- you’re the man! Haha.

It looks like the main components here were TextureCoordinate (Set to 1) and Tiling Distance (50-100 is about right). The smoke moves around smoothly and fades out nicely. Also the Spawn count (Minimum Recommended 5) can be set super low and it doesn’t jitter. Awesome!

For the Gunsmoke VFX, my settings are-

[Ribbon Data:]

  • Tiling Distance: 75
  • Distance Tessellation Step Size: 1
  • Tangent Tessellation Scalar: 5

[Spawn]
-Rate (Constant): 15

[Initial Size]
Constant: (15, 15, 0)

[Initial Velocity]

  • Max (Vector Uniform): (15, 0, 100)
  • Min (Vector Uniform): (-15, 0, 100)

[Size By Life]

  • Time 0: (0.3, 0.3, 0)
  • Time 0.2: (1, 1, 0)
  • Time 0.5: (0, 0, 0)

https://www.youtube.com/watch?v=F6eAeBBtteg&feature=youtu.be

1 Like

Glad I could help out! :smiley:

Alrighty, back to the rain! So it’s 90% there. We’ve resolved a majority of the issues and now few remain.

I’m trying to control the speed of the “rain mist” from within the Blueprint. You can see that it speeds up suddenly then goes to the correct speed. It’s one of those problems that’s 0 - 5 - 1 rather than 0 - 1. Meaning it jumps to some large number out of the blue then returns to the correct value.

From the preview in the Material (using CollectionParameter) it plays at the correct speed. I’m guessing that this has to do with the Time node in conjunction with the Keyframes. Although the time only goes to 3 points then flattens out. It seems to reach a problem once it hits 5 seconds and triggers that speed boost before decelerating.

https://www.youtube.com/watch?v=crW5_8B28O0&feature=youtu.be

Multiplying time by a varying float results in weird behaviour as you’re seeing. Best thing to do is run two ‘time’ vars - slowest and fastest - and lerp between the two times. It’ll be smooth then.

You might do lerp(time0.5,time2.0, Speed); for example.

So a rough explanation is-
Imagine you have a time(t) value of 1000.0 and are multiplying it by 2. you’d have (t)2000. but on the next frame, game time is ((t) + Delta) and you’re multiplying by something else, let’s say 2.2. Now you might have 2260 for example, a huge difference from the previous frame -260.This would keep happening and exacerbating itself. You might get odd results depending on how you’re using time, the only smooth method is to have two constant streams of vals

1 Like

Ah, I see. I’m not the mathematical type but I understand the rough idea. Thanks.
So you’re saying set up something like this? I’ll give it a go and see if it works!

Yeah basically, that’s how I would (and have!) done it before.

Hmmm…Nope! The problem’s still there. I even tested a flat 0 or 1 value and those work. It works in the Material editor, but not in the Blueprint. It’s still making that major jump (I made sure everything was saved/updated because that can cause issues too).

Man, what could it be?

https://www.youtube.com/watch?v=sBcyJyBJ1tg&feature=youtu.be

It would still jump on the lerp (or maybe you just need to transition even slower) because the output of the lerp is going into all the texture UVs.
You could get it working that way (you’d need to duplicate your texture samplers, then lerp afterwards).
…but that would make your shader more expensive.

  • The panner node now has a “speed” input - try that?
  • or animate your Collection Parameter in Blueprints, and don’t use the shader Time input.

Damn, it still doesn’t work.

I plugged the CollectionParameter directly into speed and it still speeds up before slowing down. I believe Time and Speed only goes forwards/backwards not faster/slower.

Maybe the solution is “creating a custom panner and animating/controlling the X and Y values.” instead of adjusting speed/time. Hopefully that works.

https://www.youtube.com/watch?v=YGk20i1NUMo&feature=youtu.be

Boy, this stuff is really fighting me. It appears that it can only play forwards/backwards. Perhaps Time Dilation is the answer?

I was hoping that scaling the U & V values would just slow down the panning but it actually plays it backwards as well. (ignore the scalar name, its incorrect)

1 Like

So I just tried Speed, wasn’t great.

This is simple enough…

1 Like

@Doggett: I think it’s best to just Lerp the FX. As in Lerp two different animations together instead of try to control one’s speed. That would seem to work :-/.

Welp, so we’re back to the Pistol Smoke. Now that we’ve figured out how to make it, how does one make it look good?

The Lead was wondering how they did it in RE7. Chunk 2000’s post had a GIF that sorta showed the shotgun smoke in action. It’s very quick and looks like its just an animated plane attached to the barrel. There isn’t any waviness like a ribbon (that I can see).

It also looks like simulation is involved. It’d be cool to fake it with a static texture using something like texture warp or erosion. Texture hacks are pretty neat imo.

In my video I made an attempt to fake the pistol smoke. It doesn’t stretch over the ribbon quite right. It is stretching on the right axis. I created an edge mask to keep it from going out of bounds.

The problem is that the longer it stretches over the ribbon, the streakier it becomes. The texture also seems to be slithering along the ribbon although there’s no panner for that (just for warping). Any ideas folks?

https://www.youtube.com/watch?v=FTVLSI6VUyA&feature=youtu.be

Hey Folks, I want to introduce Lightning Clouds to my Weather VFX. I’ve been trying to translate Limeslushie’s SF shader into a UE4 Material. I’m stuck on trying to create the flickering aspect.

My best guess is that it’s tied to Time (from all the tutorial’s I’ve seen). Time combined with sine creates a pulsating effect. In the image the ScalarParameter just controls the panning speed.

How would I delay the time between flickers? Would it be tied to a Dynamic Parameter? How could I randomize this slightly?

Here’s an attempt at trying to figure out the flickering. Since the mesh is static and has no lifetime, I can’t use Dynamic Parameters :confused:

It’s gotta be some kind of mathematical equation. Perhaps using Floor could help keep it darker for a longer period of time.

Alternatively, it can all be animated in Blueprints. Although making it procedural would give it a more organic feel.

https://www.youtube.com/watch?v=R6BnFnoqIZg&feature=youtu.be

You’re on the right track for a good lightning flash effect - you just need to combine a few more Sines together - generally i use 3 Sine waves with different periods for any sort of pseudorandom material effect. If you Add them you know your range is (-3:+3) so then just Clamp that to something like (+2:+3) and then Subtract 2 and you’ll only get a flash when the Sines combine together. If you want to adjust how frequently you get flashes you just need to change the lower bound of your clamp and subtract - the smaller the range you give it the less frequent the flash.

Hope that helps!

1 Like

@tharlevfx Thanks for the awesome tip man. That’s a pretty neat trick! I’ll have to keep trying stuff out until I get the right tempo. There were some issues though- I’d set the range from 0 - 15 and subtract it by 12 (which is beyond 1) and it wouldn’t go past the subtract node. The number would hit 15 (all white) but doesn’t send the signal to the subtract unless the number is between 0 - 2. It’s odd but a neat trick none the less.

Hey Folks, I’d like to know how to “offset random” a clamped texture. As in, spawn the texture in random locations within the material so that the “lightning” appears random. Ideally with a clamped range so it doesn’t offset off of UV space. Having a emitter that spawns additive texture’s would have an issue (floating), so I’m trying to do it this way.

Also, I noticed that Tessellation doesn’t appear to work when using a particle system in UE4. It works on cube surfaces, so it isn’t the topology. And it also works on the same mesh outside the particle system. So something about Cascade doesn’t allow me to have a tessellated mesh. I guess my work-around would be creating a bumpy mesh to fake it (albeit it won’t move or adapt in real-time).

https://www.youtube.com/watch?v=XOgs2M60mP8&feature=youtu.be

Tessellation works fine on mesh emitters.
I am looking at a working one right now.

So something else must be doing something wonkey.
Make sure you disable crack-free displacement though. (and that the mesh already has the material applied prior to being in cascade just to be sure… though that might have been fixed in newer ue4 versions)

Hmm, I’m still having issues. Crack-free is disabled by default and when its turned on the mesh disappears.

I deleted the mesh emitter from Cascade then recreated it. The issue still persists. Maybe you could show me your setup? I’m currently in version 4.14.3.

here try this first: Using certain materials in Cascade corrupts them - Rendering - Unreal Engine Forums
because I’d need to hack n slash NDA stuff to share content.

Ah, I think I figured part of it out. The tessellation intensity and tiling wasn’t enough to see it. Problem is, the way it tiles isn’t organic and very striped (as seen in the video).

The larger the plane is, the harder it is to see tessellation. When I increase the tessellation tiling and intensity, it just get’s more broken and the sky remains relatively flat. However, when the same mesh is scaled down you can clearly see the bumpiness. So scale seems to be affecting the tessellation, the larger it is the flatter it becomes.

My issue here is that the tessellation isn’t smooth, becomes squashed and is tiling in a stretched manner, as if it has a 1:17 ratio or something. Also I noticed that the wire frame for the plane does not exist in the either the Editor nor Cascade. It’s just a four sided plane. Any idea why that might be?