Neil78 Posted January 17, 2012 Share Posted January 17, 2012 Hi Whats a good way / is it possible - to render normal passes of volume / pyro renders? Thanks Odforce Quote Link to comment Share on other sites More sharing options...
eetu Posted January 17, 2012 Share Posted January 17, 2012 Inside the volume material read the normal for each sample with a Volume Gradient Sample from File VOP, and pipe the result to the Surface Normal output. Looks like it has to be multiplied with opacity to get a normalised result. 1 Quote Link to comment Share on other sites More sharing options...
jonp Posted January 19, 2012 Share Posted January 19, 2012 IIRC you can use the 'N' global variable in a surface shader without having to create it in SOPs or read it from a file, as it gets computed automatically at render time. You should then multiply it by dPdZ and opacity to make it more usable in compositing. --jon Hi Whats a good way / is it possible - to render normal passes of volume / pyro renders? Thanks Odforce Quote Link to comment Share on other sites More sharing options...
Neil78 Posted January 30, 2012 Author Share Posted January 30, 2012 IIRC you can use the 'N' global variable in a surface shader without having to create it in SOPs or read it from a file, as it gets computed automatically at render time. You should then multiply it by dPdZ and opacity to make it more usable in compositing. --jon Hi guys - thanks for both replies - and sorry for delay in getting back to you - i was sidetracked with work so i've got a new pyro shader in H12 - ive added a global variables vop - and the surface position is routed to the volume gradient from file vop - and that is routed to the surface normals of the surface output vop.. Does this sound right to you guys - and how do i multiply by BSDF? or opacity? Thanks Quote Link to comment Share on other sites More sharing options...
Neil78 Posted January 30, 2012 Author Share Posted January 30, 2012 Inside the volume material read the normal for each sample with a Volume Gradient Sample from File VOP, and pipe the result to the Surface Normal output. Looks like it has to be multiplied with opacity to get a normalised result. Hi guys - thanks for both replies - and sorry for delay in getting back to you - i was sidetracked with work so i've got a new pyro shader in H12 - ive added a global variables vop - and the surface position is routed to the volume gradient from file vop - and that is routed to the surface normals of the surface output vop.. Does this sound right to you guys - and how do i multiply by BSDF? or opacity? Thanks Quote Link to comment Share on other sites More sharing options...
jonp Posted February 8, 2012 Share Posted February 8, 2012 I don't have access to Houdini 12 so I don't know what is possible in the pyro shader, but the setup to render normals is pretty simple. Create a material where you take the N global variable, normalize it and then multiply it by the computed opacity of the volume density, then plug it into Cd and plug opacity into Of. The attached image and Houdini 11 scene demonstrates this. Cheers, Jon Hi guys - thanks for both replies - and sorry for delay in getting back to you - i was sidetracked with work so i've got a new pyro shader in H12 - ive added a global variables vop - and the surface position is routed to the volume gradient from file vop - and that is routed to the surface normals of the surface output vop.. Does this sound right to you guys - and how do i multiply by BSDF? or opacity? Thanks shaded_volume_normals.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Neil78 Posted February 14, 2012 Author Share Posted February 14, 2012 I don't have access to Houdini 12 so I don't know what is possible in the pyro shader, but the setup to render normals is pretty simple. Create a material where you take the N global variable, normalize it and then multiply it by the computed opacity of the volume density, then plug it into Cd and plug opacity into Of. The attached image and Houdini 11 scene demonstrates this. Cheers, Jon Many Thanks jonp - ill check out right away - sorry for delay in getting back Quote Link to comment Share on other sites More sharing options...
Neil78 Posted February 15, 2012 Author Share Posted February 15, 2012 Many Thanks jonp - ill check out right away - sorry for delay in getting back Hi jonp - thanks for the hip - really helpful - 'ive since discovered that H12 has yet to sort out the global "N" for volumes (whether it remains available as a global or has to be computed manually, and if so how and at what cost) - which explains why i was having trouble really appreciate the help though Best Quote Link to comment Share on other sites More sharing options...
djwarder Posted September 2, 2013 Share Posted September 2, 2013 Any update on this? Would be great to have a normals pass in 12.5! Quote Link to comment Share on other sites More sharing options...
tjeeds Posted September 3, 2013 Share Posted September 3, 2013 The method that utilizes Volume Sample from File works unless you add shader noise or other render-time details. In that case you can use the gradient() vex function. It doesn't come wrapped in a vop node currently but it's simple to set up with an Inline Code. Here's an example of it in action, the pyro sim in this file has a rest field which is used to calculate noise in the Billowy Smoke shader. The red nodes in the shader are doing the normal calculation. Since the gradient function returns a vector in screen space it's important to transform it to world coordinates, though if kept in screen space the R and G channels can be used for 2d heat distortion in comp volN.hip 1 1 Quote Link to comment Share on other sites More sharing options...
djwarder Posted September 5, 2013 Share Posted September 5, 2013 Ah great news, thanks for sharing the file. We need to use it for a heat distortion effect anyways, so that's perfect! Quote Link to comment Share on other sites More sharing options...
MagnusL3D Posted September 11, 2015 Share Posted September 11, 2015 I downloaded this example file but it doesnt seem to work anymore ? I don't have access to Houdini 12 so I don't know what is possible in the pyro shader, but the setup to render normals is pretty simple. Create a material where you take the N global variable, normalize it and then multiply it by the computed opacity of the volume density, then plug it into Cd and plug opacity into Of. The attached image and Houdini 11 scene demonstrates this.Cheers,Jonshader_volume_normals.png 1 Quote Link to comment Share on other sites More sharing options...
fathom Posted September 11, 2015 Share Posted September 11, 2015 i think h14 doesn't auto calculate the normal for volumes anymore. you need to calculate the gradient yourself using a gradient vex function in an inline block. look at the rendering subforum for a recent discussion on this. honestly tho, N from a transparent surface might be a bit odd. it's going to end up being a blend of all the samples it hits which could throw things way off. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.