aschwo Posted July 21, 2006 Share Posted July 21, 2006 Hey Guys - first post, longtime lurker. I need some help clearing up exactly how the channels in i3ds work. From what I understand, an i3d texture has two default channels, density and P. If you choose to export any parameters, those parameters are then added as an extra channel. I'm trying to export Cd from some metaball copied particles into the i3d texture. From the help: "Any export variables in the image3d context will cause additional channels to be created in the 3D texture map." The wiki says this: "Create an Image3D VOP, add to it a 'parameter' tile with the "Export Parameter" toggle enabled and connect the tile's "input" (that appears when you enable the toggle) to something. You might also want to enable the "Invisible" toggle as well, so that it won't show up in the parameters pane when you create a SHOP from it." I understand how all that works, but am still running into some problems. I create a Parameter Op in VEX Builder, giving the parameter name "Cd", and toggling the "Export Parameter" on. Then, I created an Input Parameter. As I understand it, because the metaballs that I will be rendering have a Cd attribute, this should work. Is this correct? The VOP that I created, image3d1, has an error: "G:/TEMP/image3d130761.vfl" line 58 ERROR (1008) Undefined symbol "restIsConnected" if (restIsConnected) ^ Then, when trying to render the i3d with that shader, this error is output to the console: "[op:/vex/image3d1] Unknown parameter Cd Undefined symbol [op:/vex/image3d1] Unknown parameter 0 Undefined symbol " Next, the Fog Shader. I'm basing this off of the default 3D Texture Fog shader. Since the channel Cd should be exported, I created a Texture 3D OP, plugging in the "fname" param into image3d and P from the globals into the Position. The channel name, I'm calling Cd, because that's the name of the param being exported from the image3d shader. Is there a different naming convention, something like "channel1"? When I finally try to render this mess, naturally, I get the proper alpha channel, but nothing for the color channels. I've been banging my head against this for a few days now, and am pretty sure I'm taking the right path to getting it to work, but fear that there is some niggling detail that I haven't taken care of. I've attached screenshots of my VOP networks and the params for the Texture 3D op. Anyway, thanks for making it this far through my post. If you'd like, I can clean up a hip file and post that up as well. - Alex Quote Link to comment Share on other sites More sharing options...
SvenP Posted July 22, 2006 Share Posted July 22, 2006 http://odforce.net/forum/index.php?showtop...l=i3d&st=12 Quote Link to comment Share on other sites More sharing options...
aschwo Posted July 22, 2006 Author Share Posted July 22, 2006 Argh, thanks Sven. I thought I had gone through everything in the archives. Apologies. - Alex Quote Link to comment Share on other sites More sharing options...
aschwo Posted July 23, 2006 Author Share Posted July 23, 2006 Well, I'm back with more problems. Sven, your help was great, but didn't really get at my problem, which was getting the Cd parameter from the particles into the i3d. I've made more progress - with the help of my professor - but we're both stuck on it. Anyway, I've attached a HIP file that we've been working on. The metaattrib function seems to not want to work. A print function was attached to read the data being output, and there was absolutely nothing coming out of the mattrib. Anyway, if you've got a minute, please take a look and lend your insight. Thanks, Alex i3d_color_v7.hip Quote Link to comment Share on other sites More sharing options...
SvenP Posted July 23, 2006 Share Posted July 23, 2006 If you carefully read the help you will read this for the MetaballSpace vop : The operator is valid only inside the Point Loop loop construct and if you then read the docs for mattrib : Note that when using this operator inside a Point Loop, the attribute is not pre-blended by the density of the metaball. now you should already know what you need to know. 1) you can leave the MetaballSpace stuff away and connect P to your mattrib vop and you will get a Cd value that is already blended by the metaball density . 2)you create a point loop and use metaball space to roll your own density code and get the Cd value non pre blended for every metaball in range and compute the final color for yourself ( and also in this point loop you connect P to your mattrib vop and not p in metaball space ) I hope this helps a bit Sven 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.