Volume color from Particles

   10536   10   2
User Avatar
Member
30 posts
Joined: July 2016
Offline
Hi Everyone,

I'm trying to create a volume that takes its density and color from particles. The particles are emitted from a sphere and take their color from it's surface, which is blending between red and blue. I'd like to render this as smoke.

I've been searching for a solution to this, and while I've come across a few threads, I'm yet to find a working solution.

Based off what I've read however I've arrived at using a Volume from Attribute node to create the volume, and followed by an Attribute Transfer to bring the color across from the particles to the volume.

What I'm finding is that the pop net is only outputting a single Cd value, rather than values for each particle. Resulting in the volume in a single color.




I feel as though I'm missing some logic in how to achieve this… I've attached the working file and any feedback would be greatly appreciated!

Thanks

Attachments:
Geo1.PNG (259.0 KB)
Popnet.PNG (459.8 KB)
ColourVolumeFromParticles.hipnc (259.3 KB)

User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
Attribute transfer is for geometry attributes, not voxel values. You'll need to use a volume tool to achieve what you are after. Volume from attribute should be able to create a color field from your particle color.





but VDB's are better.
User Avatar
Member
30 posts
Joined: July 2016
Offline
jsmack
Attribute transfer is for geometry attributes, not voxel values. You'll need to use a volume tool to achieve what you are after. Volume from attribute should be able to create a color field from your particle color.


but VDB's are better.


Thanks for the quick reply @jsmack

I had actually tried using Volume from attribute once before, but without any luck. It seems to be creating the volume from particles. But the Cd value isn't being carried over.

I've attached this file. And thanks again as I've now spent a few days trying to work out a solution without any luck!

Attachments:
volFromAttrib.PNG (40.2 KB)
ColourSmoke_VolFromAttrib.hip (742.5 KB)

User Avatar
Member
30 posts
Joined: July 2016
Offline
Hey guys,

So I've dug through a few more threads and have now tried a different approach.

Using a Fluid Source node it seems like now at least the volume is drawing in the Cd values from particles. This is only visible when followed by a Volume Visualization node, with Diffuse Field set to Cd.*

However when I then try to render the volume with Mantra, it has no color.

I'm not sure why the Cd values are following. Again thanks for any tips or suggestions that could help!
Edited by starion83 - Jan. 19, 2018 13:18:57

Attachments:
ColorVolumeFromParticles_2.hip (812.0 KB)
fluidSource2.PNG (242.0 KB)
fluidSource.PNG (235.6 KB)

User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
Here is an example file with a few methods illustrated for creating density and color fields from particles. The preferred method is probably volume rasterize particles combined with vdb from particles for the color, or a volume rasterize points. The volume from attribute node only works with traditional houdini volumes. The benefits of vdb include not determining the bounds in advance, memory savings allowing for increased resolution, and the general speed of the vdb library. Some of the nodes for working with vdbs will even create extra fields as needed.

Attachments:
volume_from_particles_example.hip (697.3 KB)

User Avatar
Member
30 posts
Joined: July 2016
Offline
jsmack
Here is an example file with a few methods illustrated for creating density and color fields from particles. The preferred method is probably volume rasterize particles combined with vdb from particles for the color, or a volume rasterize points. The volume from attribute node only works with traditional houdini volumes. The benefits of vdb include not determining the bounds in advance, memory savings allowing for increased resolution, and the general speed of the vdb library. Some of the nodes for working with vdbs will even create extra fields as needed.

Thanks again jsmack for the quick reply and sharing the example! it's very much appreciated.

However I've downloaded the file to go through it, and it's throwing some errors when opened. Namely that it's skipping some missing parameters. I've made a quick search and this could be related to what version is being used? I'm running 16.0.633.

Attachments:
thrownErrors.PNG (42.1 KB)

User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
It was saved from 16.5.323

You can safely ignore those warnings, they are immaterial to the scene.
Edited by jsmack - Jan. 21, 2018 00:34:28
User Avatar
Member
30 posts
Joined: July 2016
Offline
It seems as though installing 16.5.323 did the trick.

Thank again @jsmack! this has been incredibly helpful to understand how to approach this.
User Avatar
Member
86 posts
Joined: Oct. 2015
Offline
Still works. Very helpful. Thanks!
User Avatar
Member
20 posts
Joined: Feb. 2016
Offline
Nice, will dig through. In reality I want to do the opposite - color particles with volumes!
Mage level 2
www.headofoliver.com
User Avatar
Member
1 posts
Joined: Sept. 2021
Offline
@jsmack First time posting I just wanted to say thank you for the file. It helped me get unstuck!
  • Quick Links