Color by Velocity- how to do this?

   12091   9   4
User Avatar
Member
85 posts
Joined: Jan. 2009
Offline
I've got a mesh with velocity data, imported from abc. Now, I'd really love to color the mesh using a ramp based on velocity data. As I am not very proficient in Shops, I was wondering, how to do that.

I found a GetAttribute Node, but that wants some external bgeo to read the Attribute from. I was thinking about converting the ABC to BGEO, but I do not see much sense in doing so.

I thought there must be another, very simple way to read Velocity, pipe that into a ramp which then controls the diffuse color.

Is there a simple example anywhere around where I can see how this is basically done?
User Avatar
Staff
5287 posts
Joined: July 2005
Offline
If you're just looking for a viewport solution, you can turn on “Override Color Attribute” and enter “v” in the field, in the Display Options > Geometry tab. There are a couple of pregenerated ramps you can apply to the result.
User Avatar
Member
85 posts
Joined: Jan. 2009
Offline
Thank you very much, bit I was also looking for a way to render it in mantra.
User Avatar
Member
245 posts
Joined: Sept. 2011
Offline
You can use vopsop and just connect the velocity input to the color output.
User Avatar
Member
253 posts
Joined: Jan. 2008
Offline
I think you might be looking for this.

Make sure your shader has the “use point color” checkbox ticked.
This will make your shader pick up the Cd (color) attribute.

Attachments:
velRamp.hipnc (340.2 KB)

User Avatar
Member
152 posts
Joined: Jan. 2014
Offline
Dear Mawi,

I've been trying to use your provided file and it won't work with my geo. It is not particles, it is lots of RBD point objects instancing cubes but I don't understand why its not working as they all have velocity attrs on their points like your example file.

Yours curious,

5DN.
User Avatar
Member
607 posts
Joined: May 2007
Offline
Instancing doesn't automatically propagate point attributes to the instanced objects. Here's a solution via material overrides - there are other ways too, I'm sure

Attachments:
velramp_instance.hipnc (365.1 KB)

User Avatar
Member
152 posts
Joined: Jan. 2014
Offline
cheers eetu
User Avatar
Member
152 posts
Joined: Jan. 2014
Offline
eetu
Instancing doesn't automatically propagate point attributes to the instanced objects. Here's a solution via material overrides - there are other ways too, I'm sure

Turns out I wasn't instancing, but using a RBD point object. Sorry for the bad Houdini vocab.

I have attached my hip. Dunno whats going on.

Attachments:
massivecubesim3.hip (584.2 KB)

User Avatar
Member
624 posts
Joined: Aug. 2008
Offline
don't forget to normalize the velocity before, you might need to find the max and min values of the frame range.
  • Quick Links