Jump to content

PYROFX and scene scale


anupamd

Recommended Posts

So, Ive been struggling trying to figure out a good pipeline for using pyro with scenes of different scales.

If I have a pyro setup that works great and looks perfect. Now I drop in a scene and that scene is 100 times bigger than my setup. I found that its a lot easier to scale down my scene to the size of my pyro emitter/container , than try to somehow scale up my pyro grids/ noise scale..etc.

So my question is, if I wanted to scale up my pyro setup, is there an "easy" way to do this that would reliably scale my pyro setup without changing the behaviour of the sim?

I'd especially love to hear from those of you who use pyro in production what kind of pipeline works for this.

-A

Link to comment
Share on other sites

You could create a parameter called "scene scale" and link it to all the relevant parameters in the solver (noise frequencies, fields div sizes, ...) - a bit painful - Or you can do it quickly with 2 transform nodes: scale down your sources, and scale up the output of your sim.

Edited by bunker
  • Thanks 1
Link to comment
Share on other sites

I've been encountering this problem lately. The problem with scaling down a camera is that it messes with the volume step size of the render, so your viewport and the render can look drastically different.

So the way I've been dealing with geo that comes from maya (which is usually 100x too big), is create a null, scale it down to fit your scene. parent your imported camera (and geo) to the scaled null. create a blend node parented to the camera. turn off sx sy and sz, this way the blend is only picking of the transforms and rotations, not the scales. copy the parented camera, set transforms, rotations, and scales to defaults, so it inherits movement only from its parent. parent it to the blend node. so you should have 4 nodes in the chain:

null (scaled down)

camera (original)

blend (turn off scaling)

camera (transforms, rots, and scales set to default)

scene geo should be parented to the top null

render using the bottom camera in the chain

Link to comment
Share on other sites

Hmm in not really sure what you are accomplishing using the blend node? could you clarify? Ive just been scaling the whole scene down by putting everything (geo/cam) into a subnet and scaling the subnet. As for the stepsize, cant you just decrease/increase the stepsize to your liking in the mantra/sampling area? I've never gotten my pyro in the render to match the viewport.. well not exactly accurately, and im not really sure if thats so important as you have a lot of control in the shader anyway.

I've been encountering this problem lately. The problem with scaling down a camera is that it messes with the volume step size of the render, so your viewport and the render can look drastically different.

So the way I've been dealing with geo that comes from maya (which is usually 100x too big), is create a null, scale it down to fit your scene. parent your imported camera (and geo) to the scaled null. create a blend node parented to the camera. turn off sx sy and sz, this way the blend is only picking of the transforms and rotations, not the scales. copy the parented camera, set transforms, rotations, and scales to defaults, so it inherits movement only from its parent. parent it to the blend node. so you should have 4 nodes in the chain:

null (scaled down)

camera (original)

blend (turn off scaling)

camera (transforms, rots, and scales set to default)

scene geo should be parented to the top null

render using the bottom camera in the chain

Link to comment
Share on other sites

Hi,

I think to change camera and light scale is not good idea.

Especially if you r working on stereoscopic project.

I did not spend much time but I think you can just scale your volume(smoke/fire whatever),

Just need to set right volume step size and shader attribute such as Density / shadow density.

It's good to set volume step size per volume/object.

I attached file and pls compare the both montra.

Should look the same.

Cheers

volume_scene_scale.hipnc

Link to comment
Share on other sites

Hmm in not really sure what you are accomplishing using the blend node? could you clarify?

The blend is there because you can turn off sx, sy, sz... so the bottom camera object doesnt inherit the scale parameter values of its parents (which will probably be something like .01 if you're scaling down). You just want it inheriting the scaled transforms and rotations, not the actual scale parameter. Alternatively, instead of a blend node, you could put another null and scale it back up by whatever you scaled the top one down by. The point is to get the actual scale of your rendering camera back to 1 (even though the transforms and rotations are being scaled down).

Yeah this is a hack, and its definately better to avoid scaling your camera. But when thats not possible for whatever reason, this method has helped me not have to recreate a sim from the very begining, once I get some imported geo or camera that is using different world units from my scene.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

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