Jump to content

Passes for volumes


csp

Recommended Posts

Hello,

Since last week, I am working with volumes inside Houdini, pyro smoke, and I want to have a production rendering with passes. The only image plane which works is the beauty pass (rgb) and alpha.

Also normals N, position P, depth Pz seems to work but it gives very pixelated results. My first question is how can I fix this?

My second question is how can I have more passes, what's the direct/indirect volume passes? They give no results.

I found on the forum an alternative to create normal pass for volumes but with complex mesh it seems not right. Also I cant include it in the pyro shader as extra pass, is there any way to go inside the pyro shader?

Finally last week double negative had a presentation in my Uni and show us that they had build a series of extra passes for volumes which was very useful for compositing. Is there anything like that for Houdini?

Thanks in advance for any info.

post-5813-132970222132_thumb.jpg

post-5813-13297022351_thumb.jpg

post-5813-132970225035_thumb.jpg

post-5813-132970225943_thumb.jpg

post-5813-132970226693_thumb.jpg

  • Like 1
Link to comment
Share on other sites

For the voxeling try decreasing stepsizes, or possibly lut/gamma if they are only visible on an edge (although the one on the image there looks like on closest surface on purpose). For other passes, I'm afraid you have to make them yourself.

Certain passes only make sense if you choose closest surface sampling and you get ugly voxelcubes but I don't know if there are good ways around that. Better work together with a compositor who's done volumes before to make meaningful passes.

Edit: Wait, pyro comes with a whole bunch of passes I believe. Isn't there a list in the last tab of the shader?

Edited by Macha
Link to comment
Share on other sites

I found a way to create depth pass on odforce forum but I hadn't found the post....It seems to use the deepshadow map to create depth pass,about normal pass I usually render a custom pass that I create three lights with rgb color.

Hope can help you~

Link to comment
Share on other sites

The extra passes they used were probably just different light passes. They'll usually just pass out a grayscale per channel of the 3 main lights which allows comp to mess with it more. Were they blue clouds/smoke?

They're using a proprietary solver at DNEG and rendering it in their own version of Renderman, but you should be able to do the same in Houdini if they're doing more than light passes. I'd use something other than the pyro shader though, as you can't jump in there and mess with it to get what you want.

Link to comment
Share on other sites

This was Jeff's (old school) reply on my mirror post in sidefx forum.

Position, normals and volumes...

Position from volumes is ambiguous.

How do you expect a volume to generate a single P position hit? The darn volume is partially transparent and the ray can penetrate quite deeply. What kind of sorcery or manufactured magic you use to derive a P and then make it work in production is dubious at best. I have seen light shadow opacity maps to help in such sorcery but alas it is ultimately a hack and in some cases, a suitable hack to pseudo-light volumes.

Is it the first P hit of the volume or the last hit when the ray either exits the volume or gets to the opacity limit (0.995 by default I believe).

How can you fix this?

You don't. There is no answer. Hopefully you understand now.

This is where Deep Camera Maps come in. Once generated, you can composite the volume with other objects that too have a Deep Camera Map generated. Nuke has some basic tools that take advantage of Deep Camera Maps to do more than just depth compositing which Houdini's tools can do.

Surface Normals on a Volume are as ambiguous as P

And then you throw out the Normal thing. Gotta love it.

Again you are manufacturing data on top of a volume to hack out lighting in this case. You can use three lights, one red, green and blue light to shade the volume. Top, Left, Right work ok. Each light shades the volume in the single color pass. In comp, you have r, g and b representing the lighting contribution from the three lights respectively. Separating these channels in comp, you now have the light coverage from the three lights to play with. A time honoured hack that works very well. That is why you see many tests with the non-intuitively lit volumes with the characteristic rgb rainbow colors.

As with P, what normal? As the ray penetrates the volume for shading purposes, most lighting algorithms assume that the light scatters in an isotropic fashion. With more advanced volumetric shaders, you can evaluate the current gradient of the volume, the spot normal inside the volume to factor in a bit of anisotropic lighting and then it really gets complex.

So the normal as with P varies as the ray penetrates and traverses the volume.

A very complex problem that currently is still very expensive as the more physically correct the volume shader the slower it gets. Ultimately as computers get faster, you'll see more options as the shaders can get more complex.

The three light trick works well.

How to extract extra image planes?

This is relatively straightforward for shaders coded with VOPs. Just put a Parameter VOP inside your Fog Shader, set it to export and voila, new image plane.

Oh I forgot, H11's pyro shader is coded... Wink

You can hack the pyro shader, add a new parameter like:

surface pyro(

....

export float myparm;

....

)

then in the body of the function write any part of the shader to that variable to export. In the Output ROP driver, add a new plane and match the name and type to export. Because you have access to the illuminance loop when you use Mantra in micropolygon or raytrace mode, you could write exports from inside the illuminance loop to get per-light coverage.

  • Like 1
Link to comment
Share on other sites

Edit: Wait, pyro comes with a whole bunch of passes I believe. Isn't there a list in the last tab of the shader?

yes it comes with few passes, in the Output Variables tab, but 3 out of 6 are for fire, another is the beauty pass of the smoke, another the alpha and Cillum is maybe the most usefull (Per-Light smoke illumination, non-PBR),

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