Can I offset a pyro simulation in time?

   6240   5   0
User Avatar
Member
117 posts
Joined: Feb. 2015
Offline
I have saved a pyro simulation to disk and I thought I would use this simulation in several places in a bigger scene.
Now is there a way to offset them in time in Houdini so some starts 20 frames earlier, and some starts 30 frames later for example.

I considered putting 2 simulations on top of each other, will this work or will it create flicker or any other problem?

Cheers
/Andreas
User Avatar
Member
2539 posts
Joined: June 2008
Offline
Sure, right after your File import node add a Time Warp and visualize it. Then set your output range start to the frame where you want the animation to begin.

Say you have 100 frame simulation that you want it to start on frame 200. Set your input range from 1-100 and set your output range 100-200. The Pre-Extend and Post Extend define what happens when the frame range goes beyond the number of frames you have on disk.

Typically a PreExtend with the default Hold setting should work ok with pyro sims because they tend to start off empty and build up over time.

You can even time stretch your pyro sequence by setting your output range so something bigger than your input range.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
14 posts
Joined: Jan. 2009
Offline
Enivobs response is correct.

As with (almost) everything in Houdini there is another way to offset your pyro if you'd like. This method will also work for animated textures, composite sops, etc.

In your file node you'll have to write a bit of code:

Let's say this is the geometry/sim file you're pointing to in your read node

Cdata/mydata/pyro_v01.$F4.bgeo

You'll need to modify it and do the time shift. But you'll also have to make sure the range is clamped and wont error out. In this example we have $F padded by 4, so each frame will be 0001, 0002, 0003, 0004, and so on. To shift, clamp, and define frame padding you can write an expression like this

Cdata/mydata/pyro_v01.`padzero(4,clamp($F-99,1,300))`.bgeo

padzero(4,$F) defines the frame padding
clamp() lets you define a range to clamp values to
$F-99 makes it so that frame 1 won't happen until frame 100
1,300 is the start/end of the original range

Make sure not to forget the tics ``

If your frames aren't padded the expression would look like this

Cdata/mydata/pyro_v01.`clamp($F-99,1,300)`.bgeo

Hope this helps!
User Avatar
Member
117 posts
Joined: Feb. 2015
Offline
Thanks guys, super useful. In some of my simulations I have problems getting the beginning to look good but the rest looks great. I'm hoping I can “patch” the first frame with methods like this, basically using multiple simulations on top of each other. Is that a sensible approach?

Also one problem I have now is rendering or viewing both of them at the same time.
I added a volume merge right after the import_pyro fields. And it seems to create a new volume with both of them. But it doesn't seem to deal with with them having different resolution so one of is just smeared over the whole grid. What would be the best way to approach multiple pyro volumes?

Cheers
/Andreas
User Avatar
Member
2539 posts
Joined: June 2008
Offline
One thing I have experienced is that you can export a pyro sim out as a .bgeo sequence. Then in your playback scene just read in the .bgeo and you don't need to merge anything. It shows up as smoke or whatever it was exported as. Makes things simple, just think of it as footage after it is exported. You can still put a material on top as well.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
14 posts
Joined: Jan. 2009
Offline
A simple merge sop should work.

For me it's been easier to just create a separate object for each pyro I'm dealing with. This allows me to easily adjust shadow intensity, shader attributes, link them with volume lights etc. It depends on your workflow though, sometimes I'll have a few pyro sims merged together into one object and others are stripped out for lighting purposes.
  • Quick Links