kai.scorpio Posted October 8, 2008 Share Posted October 8, 2008 My situation is that I am trying to color some smoke depending on the color of points inside the smoke. The setup is a popnet that creates some particles, and a volume is created from these particles using the iso offset node, sampling set to point-cloud. However, my smoke is now white, and I would like to make the color of the smoke the same as the color of the particles at that location in the smoke. How do I do that? Is there another method other than copying metaballs to the particles and creating a volume from that, as this requires a lot of tweaking to change the metaball size everytime I change the number of particles, and looks terrible in the viewport. Many thanks, Kai Quote Link to comment Share on other sites More sharing options...
aracid Posted October 8, 2008 Share Posted October 8, 2008 Hey You could bake your points out to disk(the ones with the colour), and then read them in as a point cloud, its quiet a simple addition to the vop network. there might be even a simplier method, let me know if i must bash up a file. regards brian Quote Link to comment Share on other sites More sharing options...
kai.scorpio Posted October 9, 2008 Author Share Posted October 9, 2008 Yes please, an example would be nice. I think I understand what you are saying, but I have no idea how to do it... Would this method update the color of the smoke when the color of the particles changes throughout the animation? Quote Link to comment Share on other sites More sharing options...
Allegro Posted October 9, 2008 Share Posted October 9, 2008 (edited) Yes please, an example would be nice. I think I understand what you are saying, but I have no idea how to do it...Would this method update the color of the smoke when the color of the particles changes throughout the animation? Here's an example. You're likely going to want color information beyond that of the density because you'll run into premultiplication issues if the color fades out to black as the density fades to black. I haven't bothered to comment anything, so let me know if you are confused by anything that's going on. And yes, if you set it up right, this should update just fine as your animation occurs. points_to_color.tar.gz Edited October 9, 2008 by Allegro Quote Link to comment Share on other sites More sharing options...
eetu Posted October 9, 2008 Share Posted October 9, 2008 Ahh, thanks for this, it cleared up a couple of weakest links in my point<->volume mental picture eetu. Quote Link to comment Share on other sites More sharing options...
kai.scorpio Posted October 10, 2008 Author Share Posted October 10, 2008 (edited) Many thanks, I see how it works now. Is there any other way to work without creating the 'grid' of points first, because it takes forever to render out with a high resolution, and if I use a too low one I get black stripes throughout my volume. EDIT: I might actually be able to make that work, but the volume changes size throughout the animation, so I'd have to update the resolution depending on it's size, how do I query the size of a volume/bounding box? Kai Edited October 10, 2008 by kai.scorpio Quote Link to comment Share on other sites More sharing options...
anamous Posted October 10, 2008 Share Posted October 10, 2008 You can also take a shortcut that allows you to access the points without writing them out to disk by replacing the expression in the "Point Cloud Texture" parameter field of the volume_* SOPs with op:/obj/sphere_object1/POINT_CLOUD[$F] which references the point cloud SOP directly. As for finding out resolution and size, they are provided inside the Volume VOP as outputs of the global parameters VOP node. In the SOP context, you can use the $SIZEX, $SIZEY and $SIZEZ variables. You can easily use those to adjust your sampling steps in the isooffset SOP. cheers, Abdelkareem Quote Link to comment Share on other sites More sharing options...
kai.scorpio Posted October 11, 2008 Author Share Posted October 11, 2008 (edited) Ah, thanks for that solution, works perfectly. I wasn't clear before, but I was thinking about changing the spacing of the point grid and keeping the number of voxels/points the same as it changes size (that wouldn't cause any problems or would it?). However, I cannot use $SIZEX/Y/Z in the spacing parameter, doesn't produce any points that way (even though it doesn't show an error when I middle-click the node). EDIT: Use bbox() function, that does it. Kai Edited November 4, 2008 by kai.scorpio 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.