Jump to content
ejr32123

disturbance when velocity

Recommended Posts

Hi,

Is it possible to have disturbance added only when a pyro sim is moving? I have a cloud being moved by a plane. Regular disturbance with default settings in pyro solver causes your sim to move. I don't want the disturbance to cause the sim to move, I want it to disturb when the sim is moving. I tried changing bindings, etc. but I couldn't get anything to work.

Any suggestions?

Thanks

Share this post


Link to post
Share on other sites

there is a "control field" on the gas disturb node.
You can get a "speed" field with the gasmatchfield + gasanalysis microsolvers

disturb_on_speed.hipnc

or you can build disturbance directly is a gaswrangle node:

vector4 hvec;
vector _div = (v@P + rand(f@Frame+chf("seed")) * chf("divscale"))/chf("divscale");
hvec = _div;
setcomp(hvec, f@Frame, 3);
vector disturbance = vector(random(hvec))*2-1;
v@vel += disturbance * length(v@vel) * chf("disturbance_amount");

 

Edited by bunker
  • Like 8
  • Confused 1

Share this post


Link to post
Share on other sites

hmm, It doesnt seem to work for me. I just get a warning on the analysis node saying Length only supported for vector->scalar fields and matrix->scalar fields and nothing happens : (

Why do you have to create a new field "speed"? It seems you could just use the velocity field as the control field. If there is no velocity there will be no noise.

Edited by ejr32123

Share this post


Link to post
Share on other sites

Control field always should be a scalar value, because its used like multiplier for final influence...

unlock gas disturbance node go disturb_vectorfield, find control_field , change  to vector and add length after it. And you can use now vel as control field )

Edited by tamagochy
  • Like 1

Share this post


Link to post
Share on other sites

@tamagochy @bunker thanks! Just to clarify, what exactly do you mean by add length after it? Add a length vop?

Edited by ejr32123

Share this post


Link to post
Share on other sites

edit: I found the problem: The field to disturb needs to be vel, then check on :"disturb field is Vector field". In the gas matchfield the rank needs to be scalar. As @tamagochy said, the control field needs to be scalar.

Edited by ejr32123

Share this post


Link to post
Share on other sites

The problem now is that the turbulence causes the slow moving smoke to speed up then that causes it too speed up even more. 

Share this post


Link to post
Share on other sites

if you are using gasdisturbance node you no need gasmatchfield. In control field tab you can enable ramp curve and fit influence values to disable disturbance in low speed areas

  • Like 1

Share this post


Link to post
Share on other sites
On 7/6/2018 at 12:55 PM, tamagochy said:

if you are using gasdisturbance node you no need gasmatchfield. In control field tab you can enable ramp curve and fit influence values to disable disturbance in low speed areas

isn't that just because the control field is temp by default, which dissipates? I switched the control field to velocity. I am still confused how to get this to work. I create a mask of areas with velocity, but in turn, the turbulence affects the very mask its using causing the turbulence to never stop.

Share this post


Link to post
Share on other sites

If you want to use vel as the control field of disturbance, you can unlock the node, dive in and find the parameter called control_field. Change the type to vector, and add a length node between it and if_control_field. Now you can control the disturbance by the magnitude of velocity, which is doing the exact same thing as Julien's method, just a different way. Make sure to change your ranges on the ramp to be realistic for your sim. 

Share this post


Link to post
Share on other sites

This is the technique they're talking about. I highlighted the nodes in yellow with an explanation for each. 

Thanks to Stephen Knipping for the trick 

 

On 7/24/2018 at 9:09 AM, ejr32123 said:

isn't that just because the control field is temp by default, which dissipates? I switched the control field to velocity. I am still confused how to get this to work. I create a mask of areas with velocity, but in turn, the turbulence affects the very mask its using causing the turbulence to never stop.

Velocity is not the same as speed. What you're looking for is to control the disturbance in areas of greater speed. Speed is the same as the magnitude (length) of the velocity vector. The reason you put "vel" into the control field, is because inside the vop we will tweak it to calculate the length instead, and use that. You cannot only enter "vel" to make it work how you want.

Gas disturb by default affects the temperature field. Temperature can play a major role in the look of your sim because it affects velocity. But it doesn't do any good if you're not using temperature in the sim, or if you want to affect the velocity field directly. You turn on "control field is vector" in order to get the switch to switch to the correct gas field vop inside. 

 

 

gas_disturb_velocity.hiplc

Edited by jamesr
more explain
  • Like 1

Share this post


Link to post
Share on other sites

thanks guys, I got it working already. I just needed to adjust the control range on the disturbance node.

Edited by ejr32123

Share this post


Link to post
Share on other sites

Hi, have anyone figured out how to do this trick in the modified gas disturb node in Houdini 18? 

Share this post


Link to post
Share on other sites

There is the same idea. You can try to modify control in vex gas field VOP or create temp field to use as control field

Share this post


Link to post
Share on other sites
10 hours ago, tamagochy said:

There is the same idea. You can try to modify control in vex gas field VOP or create temp field to use as control field

 

Hi Andrill, is this the one, to be changed to vector and add a length after it. Is there a way to see the connection of what is this node linked to at the Gas Field Vop level?

 2020-05-06_10-37-30.thumb.png.62cb78a986e41ef5e6fefa05f55fb7ad.png

 

Edited by zjie
  • Like 1

Share this post


Link to post
Share on other sites
On 7/5/2018 at 7:58 AM, bunker said:

there is a "control field" on the gas disturb node.
You can get a "speed" field with the gasmatchfield + gasanalysis microsolvers

disturb_on_speed.hipnc

or you can build disturbance directly is a gaswrangle node:


vector4 hvec;
vector _div = (v@P + rand(f@Frame+chf("seed")) * chf("divscale"))/chf("divscale");
hvec = _div;
setcomp(hvec, f@Frame, 3);
vector disturbance = vector(random(hvec))*2-1;
v@vel += disturbance * length(v@vel) * chf("disturbance_amount");

 

I tested this one for a shot, holy **** it works nice! Thanks alot Julien D!!

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×