Jump to content
Sign in to follow this  
logix1390

control fuel and temp by ramp

Recommended Posts

Hello

I have a ramp after my fluid source in sops that is mapped to the fuel and temp. However, I was expecting dops to pick it up and add in fuel/temp based on the ramp. It is not working. I made sure I am using a volume wrangle of course.

I think I am missing something.

I will attach my scene file for anyone who wants to take a look.

Thank you.

fuel_temp_ramp_fire.hip

Share this post


Link to post
Share on other sites

I think you want to do that before the FluidSource. Scatter points into your box and assign the f@fuel attribute to the points. Remember to change the FluidSource to Stamp Points instead of the Build SDF. Also, you will need two FluidSource nodes with one field each. By default the FluidSource uses a single attribute to build two fields. Typically density and temperature are the same at the start of the simulation. By using two FluidSource nodes and merging them together you can supply two different attributes, such as your ramp values for fuel and temp to construct the two smoke fields.

 

Share this post


Link to post
Share on other sites

Hey Atom

seems like i followed exactly what you said but the ramp still does not drive the sim in dops.

So i scattered points and created a fuel and temperature attribute.

I duplicated the fluid source, one with fuel and one with temperature..and i added in my ramp before the fuel fluid source. Is this the correct way?

I am trying to get the fire to stop emitting based on the ramp of the fuel.

appreciate the the help

 

fuel_temp_ramp_fire_v2.hip

Share this post


Link to post
Share on other sites

An important thing to remember about ramps is that they need to be driven by a value in the range of 0-1.

So you have to find a way to convert time to 0-1. This code shows an arbitrary decision to map time from 0-3 seconds into the 0-1 range. Then the ramp has meaning.

// The ramp must be driven by a float index value in the range of 0-1.
// Using @Time, remap the time of 0-3 seconds, not frames, which is $FPS*3, or 72 at 24 fps.
// So the ramp represent change of the range of frames 1-72 with these settings.
float ramp_index = fit(@Time, 0, 3, 0,1);
f@fuel = chramp("fuel",ramp_index);

So the final valid value for fuel is at frame #72. What ever value is at frame #72, that value will be supplied as fuel for the rest of the simulation. Just ramp down on the right side to insure all fuel is removed by then. In this setup I also linked temperature to fuel as the default shelf tools do.

 

Not exactly sure if this is what want but take a look at the modified file.

ap_fuel_temp_ramp_fire_v2.hiplc

Edited by Atom

Share this post


Link to post
Share on other sites

Hi Atom. 

Thank you, this works great. I didnt realize that Time plays a factor in this. Why is that? Is it becasuse I am working with dops ?

Thank you

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
Sign in to follow this  

×