Scatter points density based on color

   10139   7   2
User Avatar
Member
24 posts
Joined: March 2014
Offline
I have an iso offset node feeding into a scatter points node. I wanted to use the color attribute of the geometry node (which I had changed with a couple of paint nodes) to feed the density of the scatter points. But the color attributes are lost in the iso offset. Being new to houdini I have no idea how to get the Cd attribute after the paint nodes into the scatter points node to influence the density. Any ideas how to make this work? Thanks.
User Avatar
Member
7728 posts
Joined: Sept. 2011
Online
For scattering from volumes, the density of points is determined by the density of at each point of a single voxel grid. The iso offset is creating a density volume that is constant inside your geometry. To drive the density from an attribute on the geometry, a volumetric representation of the attribute is required. If you prefer working with houdini volumes, the node, attribute from volume can generate a volume from an attribute on your source mesh, and optionally multiply by your existing volume – this will preserve the edge blending of your iso-offset. Alternatively, the VDB toolset will allow for similar construction of volumes, often more efficiently than Houdini volumes. You will need to use a vdb combine node to perform the scale by density however.

A point of contention for both methods is that your painted attribute is only defined as a surface, how the value is extended into the volume is not well defined, and most operations will either streak the surface value into the interior along the normal/gradient direction, or simply leave the interior undefined (zero).
User Avatar
Member
24 posts
Joined: March 2014
Offline
Ok thanks. So the purpose of the volume is to create the points for a voronoi fracture node. Is there a better way to be able to control the fracture so that some spots have much smaller pieces and others have larger?
User Avatar
Member
130 posts
Joined: June 2016
Offline
you could scatter points separately on the geo using color and scatter points using volume separately then merge both using merge sop then feed it into the voronoi fracture node so that your painted density will remain same in the surface. for scattering inside the volume you could add noise to the volume using volume vop and then use scatter for noisy scattering.
Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
User Avatar
Member
17 posts
Joined: June 2015
Offline
Mohanpugaz
you could scatter points separately on the geo using color

Can you explain how this would be done? I only see Generate by Density option on the Scatter node. Thanks!
User Avatar
Member
130 posts
Joined: June 2016
Offline
Isaac Katz
Can you explain how this would be done? I only see Generate by Density option on the Scatter node. Thanks


simple example for scattering based on color this doesnt have solution to the original post, this is just for Isaac's question
Edited by Mohanpugaz - Sept. 3, 2021 05:53:12

Attachments:
Screenshot 2021-09-03 151323.png (225.5 KB)
Screenshot 2021-09-03 151303.png (14.5 KB)
scatter_based_on_color.hiplc (497.2 KB)

Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
User Avatar
Member
130 posts
Joined: June 2016
Offline

Attachments:
fracture inside based on color.gif (522.3 KB)
fracture_based_on_mask.hiplc (656.3 KB)

Mohan Pugaz
movfx
https://www.instagram.com/movfx/ [www.instagram.com]
https://www.youtube.com/channel/@_movfx
User Avatar
Member
17 posts
Joined: June 2015
Offline
Mohanpugaz
Isaac Katz
Can you explain how this would be done? I only see Generate by Density option on the Scatter node. Thanks


simple example for scattering based on color this doesnt have solution to the original post, this is just for Isaac's question
Image Not Found

Image Not Found

Thanks!! so simple
  • Quick Links