How to stop a panner node in material being used in a Niagara System

Hi guys,

I had a look around the forums to try find an answer but tbh I didn’t really know how to word it in a search properly but I couldn’t find an answer that worked.

“Changing a scalar parameter in a material assigned to mesh being used in a Niagara System” did show many results in my searches :stuck_out_tongue:

  1. So I have created a Niagara system
  2. In that system there are a few emitters
  3. One of those emitters has a mesh renderer
  4. The mesh assigned to it has a material which currently looks like this.

Since I’m new I could only add 1 image, but I composed what i needed into one, sorry if that’s cheeky.

  1. On the far left there is a scalar parameter called “TimeP” which I am trying to assign a timeline to (in blueprints) so that it basically just runs for 1s or so and stops (it drives the tessellation basically).

This is a far as I got with my research into how to do this, it worked with just a static mesh, and the time value did in fact run for the duration of the time line but as soon as I tried doing this to the Niagara System, nothing happens unfortunately.

If anyone can point me in the right direction or even show me a better way to go about it, that would be much appreciated :slight_smile:

**I tried adding a dynamic parameter into the material but it wasn’t very happy with it.

1 Like

looks like you incorrect use Dynamic Parameter. Just use it like multiplier with Time node and result send to Time Input in Panner. In Niagara you can use 0 for stop, and other values for various speed.

So if I understood correctly something like this?
Scalar Paremeter Question multiply Error

unfortunately it still doesn’t like it.

check this out
https://drive.google.com/file/d/184Tcdu9mggU04qvkPfbg6mRrL7fTxAH-/view?usp=sharing
dynamic parameter for using in Niagara, time - this is system node.

Also whish settings you using here?
image

A panner node is a macro for Coordinate + (Time*Speed), you can omit it in this case.

Instead feed your dynamic parameter into an appendvector node (set the other channel to 0) and animate the dynamic parameter in niagara as you would animate the timeline.

@Niels So I had a go at it this morning after reading the replies and I found what is causing the issue with the help of your comment. I noticed you plugged the final multiply into world position offset, where as I need it for the World Displacement.


So it seems that I can not use dynamic parameter in world displacement, perhaps you know another way round this?

@Valentin_Pantyukh In the same image on this post on the left is my material settings, I have also enable “flat tessellation”

Ah, the dynamic parameters probably don’t get passed to the tesselation shader.

Potential workarounds include :

  • Using the Particle Color nodes opacity instead, you won’t have access to opacity in niagara, but you might not need it.
  • If the animation isn’t complicated, you can use ParticleTime and a bit of math to define it. (you can also use a lut if it needs to be more complicated).

So I tried to upload the video to vimeo but had issues logging in so apologies for the late reply, I appreciate you replied very quickly. This is the effect I’m trying to achieve but without the second ripple.
https://youtu.be/DHsAqC7--gk

That’s why I figured a timeline would be ideal for this solution. I wouldn’t actually need the opacity/alpha parameter from the particle colour node but it still shows the same error.
I’m still relatively new to real time FX so I’m not to sure what Lut is or how to use it properly.

Ok, a few more questions then:

  • Why do you need tesselation? It seems kinda wasteful.

  • If you do need tesselation, why not just do it in BP, just add the mesh to your bleuprint.

  • I think you might be able to call getmaterials() on a NiagaraSystem. You might be able to select the correct material by index (watch out when you reorder) and assign from there.

This is a leaning exercise for me and the video I shared is my work so that is what I’m trying to achieve. I don’t think it wasteful, I think it adds to the effect personally. It’s that ripple effect just without the second ripple, i.e I don’t need a ripple when the cone scales down.

Yeah I guess I can run it through the Blueprint but it would be nice and easier to run it through Niagara. I can time it to the other emitters with ease and change it’s scale in there without having to faf around with timing a Niagara System with the blueprint, that seems like a lot of extra unnecessary work.

Unless of course that is the only way around it.


Is this not essential Getting the material assigned to Niagara system. Also how would you determine which index it is especially considering there are multiple (in my case) emitters with materials in the system

Big wall of text warning!
I’m still having to simplify massively to keep it readable.
In the end I fear you might have chosen a really difficult set of restrictions to deal with as a beginner.


Sorry, what I meant with wasteful is that you could just use a mesh which is dense in the places where you need it to be for your animation instead of increasing the vertex count during runtime.
You could make it look the same without using tesselation, thus making it more optimal. (And allowing previously discussed techniques to run the effect from niagara instead of bp)

It’s generally good practice to, as you say control effect materials through Niagara as much as possible. However in this case it seems none of the Niagara material parameters are being passed through into the tesselation shader, and as such you either need to find an approach that does not use the tesselation shader (see above), or work around the limitations imposed by the system. (Or be a graphics programmer, but I’m ignoring that option :scream: )

You shouldn’t create a new Dynamic instance. In the picture you sent, there will be two materials instances, one which is assigned to the emitter, and one which you just created. Instead cast the material you’re getting to Dynamic Material Instance to use the object that is assigned to the emitter.

You can’t determine the proper index, it changes if the emitter get’s moved around…
You could loop over all of them and check the name?
Or just adjust the index manually to the correct value?
(this solution isn’t ideal, but it is technically possible.)

2 Likes

Haha typical I go for something tricky on my second FX project:P
Sorry for my big wall of text.

But I think I see what your getting at in regards to the more dense mesh in the sections it needs it to be. I’ll do a bit of research into that and see what I can do with your solution, If I understood correctly have a pre-baked animation (say from Blender) that does that effect and just use that in Niagara as the mesh, alleviating the need for runtime tessellation, which as you say can be costly, optimizing the project as a whole.

I think like you say either I have to use that solution if I can wrap my head around it or find a way around the limitations. Unfortunately I’m not a graphics programmer so you were right to leave that out haha

You’ve definitely given me plenty to work with and helped me understand the system a bit better, it’s a shame Niagara doesn’t pass through the tessellation shader but oh well. Cheers for your help, I’ll mark your last comment as the solution since I think if anyone comes across this then that’s probably the best place to start. And I appreciate the time you’ve given me mate.

Till next time :slight_smile:

*As a note, I’ll post a final post here if I figured out a good way to do it.

1 Like