Jump to content

disturbance when velocity


evanrudefx

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

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 3 weeks later...
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.

Link to comment
Share on other sites

  • 4 weeks later...

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. 

Link to comment
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
Link to comment
Share on other sites

  • 1 year later...
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
Link to comment
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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...