Pixel Parser

   6462   5   1
User Avatar
Member
158 posts
Joined: July 2005
Offline
I need VEX shader which parses a bitmap texture pixel by pixel to asign a different pixel color value to each particle id. Or can I get the same effect with a bitmap input through another method?
User Avatar
Member
4140 posts
Joined: July 2005
Offline
Look at the help, and the examples, for the Color POP. There's probably half a dozen other ways you could extract colours from a bitmap and apply them to particles or data.

Cheers,

J.C.
John Coldrick
User Avatar
Member
311 posts
Joined: July 2005
Offline
sascha
I need VEX shader which parses a bitmap texture pixel by pixel to asign a different pixel color value to each particle id. Or can I get the same effect with a bitmap input through another method?

It really depends what you want to do. As always a little more information is helpful.

There's usually more thatn a couple of different ways to do things in Houdini.

Jerry
User Avatar
Member
158 posts
Joined: July 2005
Offline
But how can I render the ‘colors’ with Mantra? As far I can see them only in the OpenGL viewport. If I have some particles emmited from a source and pipe them into a color POP Mantra renders them only as uniform colored spheres. How can I get the colors into the software shading?

Attachments:
Unbenannt-1.gif (75.4 KB)

User Avatar
Member
4140 posts
Joined: July 2005
Offline
I recommend you take the basic topics and cover them, rather than specific questions in contexts that aren't clear at first. There's so many ways to do this, it might be more confusing to be asking lots and lots of short questions that might be more apparent if you walk through a broader range of tasks.

Just as an example - middle mouse over the sphere copy example(the first color POP example referenced), and you'll see there's a point attribute here - Cd. In the Copy SOP you'll notice they specifically told Houdini to copy this attribute over. However, it's just an attribute, not a final shaded colour. You need a shader that accepts that attribute, then passes that either to a shading model, or directly out if you want. You can quickly make one by creating a VOP shader with a Shader Layer VOP, set it to RGB color, then feed that to Cf. Assign it to the copied spheres, ensure the render flag is set for the Copy SOP(it isn't by default I believe), and hit render.

Cheers,

J.C.
John Coldrick
User Avatar
Member
158 posts
Joined: July 2005
Offline
I made a VEX shader with the Cd parameter as the diffuse input for a blinn model and it works.
  • Quick Links