Jump to content

pyro tool !


nomad

Recommended Posts

hi!

Once again i want to say "thank you" to Side FX team for the pyro tool !

Here i am doing my first project with it, and here is some questions ...

1. How can i do simulation exactly for the camera region ? I mean the simulation only in region visible to camera , where spaces outside is exclude from the sim. Like the Point Cloud data.

2. Can i continue the sim from any point rather than frame one ?? I simulated the 70 frames (the low & up res). Can i continue the simulation from 71 frame or the sistem requires to precalculate the previous frames also ???

3.The last but not least item.

The learning materials covers all essentials of using pyro .. exept render.

I know there are comprehensive tutorial about render passes on the site ...but i believe there is some kind of specific way to render volumetrics .. for the later corection them in compose.

In my example i had a lot of troubles with color correction.

How can i render smoke and fire separately ???

Ok, i can switch off the smoke or fire in the shader and render out each single element. I ve attached fire and smoke renders. But the merged picture in compose is very different from the complex render.

So, the main question - What is the right way to render the explosion ???

thanks ..

comp.mov

expl.mov

post-1417-1245490504_thumb.jpg

post-1417-1245490515_thumb.jpg

post-1417-1245490524_thumb.jpg

Edited by nomad
Link to comment
Share on other sites

  • Replies 49
  • Created
  • Last Reply

Top Posters In This Topic

hi!

Once again i want to say "thank you" to Side FX team for the pyro tool !

Here i am doing my first project with it, and here is some questions ...

1. How can i do simulation exactly for the camera region ? I mean the simulation only in region visible to camera , where spaces outside is exclude from the sim. Like the Point Cloud data.

Firstly, you can't, really.. you have fix a box to the most ideal approximation of your camera view. Technically speaking, you need forces and pressure feedback, etc, from a slightly generous area around your simulation anyway, or you'll sense your gas/pyro/smoke hitting some invisible boundary. Even in "open boundary" mode, there is a there is a weird border effect. FYI, the "Gas Project Non Divergent" is the operation that does all the work of preserving volume (which creates swirls and stuff) and this operation relaxes velocities over the entire box.

However, you can make a box larger than your camera view, and experiment with Gas Resize Sim and move around this box to the areas you're interested in during the shot. Look at the Help for these DOPs... and if you have trouble, I can maybe help a bit.

2. Can i continue the sim from any point rather than frame one ?? I simulated the 70 frames (the low & up res). Can i continue the simulation from 71 frame or the sistem requires to precalculate the previous frames also ???

Yes, look at the "Explicit Cache" feature of the DOPnet. You can ask it to write .sim cache files (and only keep, say, the last 3-- coz they're huge) and simply restart from where you left off. However, there some dangers as you can forget you have these files sometimes and accidentally use them when you DONT want to. You have to experiment a bit and find your best workflow. Look at the Helpcard for the Dop Network node.

3.The last but not least item.

The learning materials covers all essentials of using pyro .. exept render.

I know there are comprehensive tutorial about render passes on the site ...but i believe there is some kind of specific way to render volumetrics .. for the later corection them in compose.

In my example i had a lot of troubles with color correction.

How can i render smoke and fire separately ???

Ok, i can switch off the smoke or fire in the shader and render out each single element. I ve attached fire and smoke renders. But the merged picture in compose is very different from the complex render.

So, the main question - What is the right way to render the explosion ???

If you look at the shader, there is a tab describing the output variables. Quite simply, add "Extra Image Planes" to your ROP and export "Csmoke", "Asmoke", "Cfire" and "Afire" for separate layers.

post-4-1245537557_thumb.jpg

Link to comment
Share on other sites

Just thought I'd add a few more details to Jason's already complete answer (since I suspect some of these questions will come up frequently).

3.The last but not least item.

The learning materials covers all essentials of using pyro .. exept render.

I know there are comprehensive tutorial about render passes on the site ...but i believe there is some kind of specific way to render volumetrics .. for the later corection them in compose.

In my example i had a lot of troubles with color correction.

Fire has a large dynamic range, so yeah, good tone mapping is a requirement -- not much that can be (or should be) done about that I don't think. The shader does do basic tone mapping of the raw blackbody intensities (assuming you're using the physical model), but only as a log scaling relative to the core temperature (the "Temperature" parameter, in degrees Kelvin, that a value of 1 in the field maps to). Anything beyond that basic "visual adaptation" treatment is left as a post-processing task, which I believe is as it should be (otherwise the shader would be imposing a limit to the dynamic range of the final output, which it knows nothing about).

An alternative, if you don't want to deal with the physical model's dynamic range, is to use the "Artistic" model, where you have complete control over both chromaticity and intensity.

How can i render smoke and fire separately ???

Ok, i can switch off the smoke or fire in the shader and render out each single element. I ve attached fire and smoke renders. But the merged picture in compose is very different from the complex render.

So, the main question - What is the right way to render the explosion ???

To illustrate those layers Jason mentioned...

These can be rendered into separate "arbitrary output variable" (AOV) layers (or "deep raster planes", to use Houdini's terminology), which you can then combine in compositing. One of these (vector Cillum) can also be exported per light -- that is, for the smoke illumination, you can separate each light's contribution into a separate deep raster layer.

Here's an example of the base separations provided by the pyro shader (not including the per-light layers).

1. Csmoke: The final smoke color. All illumination sources combined in a single output. If you want per-light layers, you can use Cillum instead of Csmoke.

post-148-1245553424_thumb.jpg

2. Asmoke: The smoke's opacity (alpha).

post-148-1245553435_thumb.jpg

3. Cfire: The fire's emission color.

post-148-1245553441_thumb.jpg

4. Afire: The fire's opacity. Typically low-valued, or even zero for pure flames (here, it's been brightened so as to make it visible).

post-148-1245553450_thumb.jpg

5. Mfire: The shader's internal mask for the fire. This is sometimes useful to mask corrections for different parts of the pyro cloud.

post-148-1245553460_thumb.jpg

6. Cscatt: (yeah, that's 2 't's :)) The final contribution from scattered illumination.

post-148-1245553471_thumb.jpg

The above layers (with the exception of Mfire, which is just there for convenience), are meant to be summed -- they're simply added to each other, which is exactly what the shader does:

CompImage = [Csmoke&Asmoke] + [Cfire&Afire] + [Cscatt]

In this example, it looks like this (which is identical to the rendered combination -- i.e: the "C" layer of the deep raster image):

post-148-1245553535_thumb.jpg

Hope that helps,

Cheers.

P.S: I just noticed something... your explosion moves very fast so it's hard to tell for sure, but make sure the reset rates for the rest positions for your sim and shader are matched (see this post for more info on that).

Link to comment
Share on other sites

It would be great to get people's take on optimal Mantra settings for this kind of scenario, I've found first attempts to be much slower than I would have expected.

Obviously the volume step size should reflect the volume cell size and Mario's funky shader docs explain that well. Any info on gotchas with regards to micropoly rendering such as pixel samples, opacity limit, motion factor etc etc would be super helpful. I've found fairly default mantra settings to be very slow so I'm looking at optimisation..

Cheers

Louis

Link to comment
Share on other sites

It would be great to get people's take on optimal Mantra settings for this kind of scenario, I've found first attempts to be much slower than I would have expected.

More than any magical settings for Mantra (outside of the obvious), what needs to be optimized here is the execution of the shader itself. And I'm not so much talking about shader code optimization (even though I admit there may still be some pockets which are not optimal), but deeper, at the compilation level. This shader is of the "large" variety and seems to be taxing some systems.

As an interesting example, the noises are a big performance problem -- I don't mean their execution (they run fast enough when they're active), but the mere fact that they're there, even when inactive. Their code expands to an if-else chain of about 80 branches. This not only bloats the compiled bytecode to about 20 times the no-noise size (due to in-lining), which has a huge impact on load times, but also reduces performance to about 1/3-to-1/4 as fast as the no-noise times (even when none of these branches are ever visited at run time). There are also issues with integer versus string comparisons, etc.

Best I can do is to assure you that it's being worked on.

The current ("private alpha") version is considerably faster than the release version, and I believe it can be made faster still. So please don't lose hope :)

Cheers.

Link to comment
Share on other sites

2 seconds.

Lol.

Please don't PM me asking me how I can render so fast.

I was kidding! The question was unanswerable!

How long is a piece of string?

P.S: a fireball that I use for testing, with a bunch of noises and modifiers, rendered at 640x480, on my machine (8-core), renders in 54 seconds with the release version of the shader, and in 25 seconds with the alpha version I'm currently working on.

BUT... the point is: the timings depend on a bunch of things, not the least of which is the sim itself.

As Wolfwood would say: "Use of display flags may alter your experience" :)

Link to comment
Share on other sites

Hey Mario, you have any quick tricks for viewing the ranges of your fields before kicking them to shading ? seems to me would be handy to have these values before you try to remap them :)

Cheers, ..and nice work on this shader !

Can't think of any tricks, outside of the visualizations provided by DOPs, though there are a few hscript expression functions to help you at least determine the actual numerical extents of the field values:

Minimum Value:
float volumemin (string surface_node, float prim_id)

Maximum Value:
float volumemax (string surface_node, float prim_id)

Average Value:
float volumeaverage (string surface_node, float prim_id)

So if "density" is primitive 0 (you can look at the spreadsheet to determine how the field names map to primitive numbers), in the SOP "/obj/Test3/fireball/__render_sop__" (here, __render_sop__ is a special variable which always points to the SOP whose render flag is set), then you can open up a textport and type:

/obj -> echo `volumemin("/obj/Test3/fireball/__render_sop__",0)`

/obj -> echo `volumemax("/obj/Test3/fireball/__render_sop__",0)`
1.08693

Which tells you that the density field, at the current frame, has the range [0,1.08693].

In terms of aiding visualization inside the actual shader, I'm currently working on a way to visualize the noises, to help with the various parameters and basis/fractal combinations.

... though now that you mention it... maybe there is a way for the shader to "visualize" ranges as well, perhaps, if I can manage to get the shader to slice the volume along some arbitrary plane... hmmm. Maybe, but that can already be done in DOPs, so it's probably redundant.

Anyhoo... hope that helps.

Link to comment
Share on other sites

" /obj -> echo `volumemin("/obj/Test3/fireball/__render_sop__",0)` ....

that's exactly what I was looking for, mostly the temperature field I'm playing with, lots of heat so I'd like to know the range before I go to shade ...as well, the heat field looks like a nice field to shade flame with looking at the visualization, so I might play with ramping it as well .... would be nice to have access to that info at in the shader too though ..

cheers !

J.

Link to comment
Share on other sites

hey, out of interest.. has anyone experimented with non-square voxel divisions and trying to balance out forces, diffusion etc? If you're looking down a long fluid it doesn't really make sense to sim the camera z axis at the same rez as the others..

would be nice to be able to rotate the fluid container too although I betcha I'll regret that thought some time in the future.. :wacko:

Link to comment
Share on other sites

Hi Mario, first of all, great tool! Do You remember what resolution of the low and highressimulation was needed to get details like You showed.

Thanks

Martin

In this example, it looks like this (which is identical to the rendered combination -- i.e: the "C" layer of the deep raster image):

post-148-1245553535_thumb.jpg

Link to comment
Share on other sites

hi guys!

Someone can tell me how to obtain that fine detail as can be seen in the 10th blast off video on the sidefx site.

I tried bunch of things like increasing curl on the upres pyro solver, or adding vorticles to the lores fluid, adjusted the shader but cant get the detail, all i get is big puffs. I suspect that it is noise mapped to density but can someone help me please?

Thanks in advance!

post-2892-1246616251_thumb.jpg

Link to comment
Share on other sites

hi guys!

Someone can tell me how to obtain that fine detail as can be seen in the 10th blast off video on the sidefx site.

I tried bunch of things like increasing curl on the upres pyro solver, or adding vorticles to the lores fluid, adjusted the shader but cant get the detail, all i get is big puffs. I suspect that it is noise mapped to density but can someone help me please?

Thanks in advance!

I have another question here.

As we see, Pyro has great fire simulation with smoke.

How to make Pyro just has its own fire without smoke?

Thanks!

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...