How to use Cd[a] attribute for scatter density

   7640   4   1
User Avatar
Member
86 posts
Joined: Feb. 2014
Online
Hello

This is a bit a noob-question, I guess.
When importing alembic I managed to convert the color information by remapping the alembic name ‘rgba’ to the houdini name ‘Cd’.
In my geometry spreadsheet I see now the point attributes Cd, Cd, Cd and Cd and I do see color in my viewport (yay!).
Now I would like to use the Cd channel as an input for the density of a scatter OP. Maybe even with a multiplyer. How can I set such a thing up?

Thanks

Michiel
User Avatar
Member
343 posts
Joined: Dec. 2014
Offline
In the Scatter sop turn on Density Attribute set it to Cd. I would set up a multiplier to Cd with a point wrangle upstream from the scatter, or a point VOP with fit range but if you're looking to control the number of points that's all in the Scatter sop
User Avatar
Member
86 posts
Joined: Feb. 2014
Online
Thank you very much. now that I re-read my question I see all kinds of stuff has been clipped off during writing. Having used brackets in my typing resulted in formatting the tekst instead of displaying what Houdini shows me.
The thing is that I have a four-float value of color, consisting of CdR, CdG, CdB and CdA (alpha). I want to use the last channel, Cd-bracketOpen-A-bracketClose. How can I solo out that last alpha-component to be used as a density-input?
User Avatar
Member
9378 posts
Joined: July 2007
Offline
use PointWrangle before scatter
f@density = p@Cd.w;

then use density as Density Attribute in Scatter
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
86 posts
Joined: Feb. 2014
Online
So very much yesso!
Thanks beaucoup!
  • Quick Links