lisux Posted March 5, 2005 Share Posted March 5, 2005 Hi all. First of all, sorry for the large message. I'm making a volumetric shader using a surface shader. I have done it before but using a fog shader. I'm reusing almost all the code for the fog shader but in a surface shader. The shader is in VOP's with all the code in an Inline VOP, the rest of the VOP's are parameters for input and output variables for the inline VOP. I can't get any render using the surface shader, nothing is rendered, even more i get the next output from mantra: mantra: Resolving SHOP /vex/Volumes/VoxelKing_VOP failed - was it exported from Houdini? Creating image: md [192 x 124] Render Time: 0.265u 0.093s Memory: 47.91 Mb of 48.28 Mb arena size ------------------------------------------------------------------------------ VEX profile listing generated: Sat Mar 5 17:55:00 2005 Function Excl. Incl. Calls Instructions Instr. Local Secs Secs Per Call Storage ------------------------------------------------------------------------------ op:/vex/Volumes/VoxelKing_VOP 0.01 0.01 7,707 53,949 7.00 28,812 ------------------------------------------------------------------------------ Invocations Instruction 23,121 set 15,414 wo_space 7,707 if 7,707 integrate3dClip The error is very strange, is the first time i get it. Another strange issue, using this code in an Inline VOP: vector $p0, $p1; $p0 = wo_space(Eye); $p1 = wo_space(P); if (integrate3dClip($file, $channel, $p0, $p1, 0.000001)) { $voxelColor = {1, 0, 0}; } else { $voxelColor = {0, 1, 0}; } $voxelColor is an Inline VOP's output variable, $file and $channel are input variables wired to parameter VOPs. Well, i get always a completely green image in the volume cube occuped by the bound SOP that i'm rendering, when i use the Texture 3D Fog standar shader i get a nice smoke, so the 3d texture is right, using the same 3d texture the integrate3dClip doesn't detect the density with the above code (if it would be detecting it, i would be getting a red image,i think). Some clues? Thanks. Quote Link to comment Share on other sites More sharing options...
lisux Posted March 6, 2005 Author Share Posted March 6, 2005 Another strange issue, using this code in an Inline VOP:vector $p0, $p1; $p0 = wo_space(Eye); $p1 = wo_space(P); if (integrate3dClip($file, $channel, $p0, $p1, 0.000001)) { $voxelColor = {1, 0, 0}; } else { $voxelColor = {0, 1, 0}; } $voxelColor is an Inline VOP's output variable, $file and $channel are input variables wired to parameter VOPs. Well, i get always a completely green image in the volume cube occuped by the bound SOP that i'm rendering, when i use the Texture 3D Fog standar shader i get a nice smoke, so the 3d texture is right, using the same 3d texture the integrate3dClip doesn't detect the density with the above code (if it would be detecting it, i would be getting a red image,i think). 16650[/snapback] I reply to myself. I was making a mistake in my code, When one is rendering geometry as a volume, the interesting points are in the back not in the front, so the front points must be transparesnts in order to render the back points. In the example the front points are green and opaque, so the back points are not rendered. 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.