Jump to content
Sign in to follow this  

I3d Texture Channels Questions

Recommended Posts

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




Share this post

Link to post
Share on other sites

Argh, thanks Sven. I thought I had gone through everything in the archives. Apologies.

- Alex

Share this post

Link to post
Share on other sites


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.




Share this post

Link to post
Share on other sites

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


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this