Jump to content

VEX function - colormap


Recommended Posts

Hello friends,

I am learning vex functions. I came across colormap function. I want to apply color to the grid based on the colormap. Can I use this expression for that? I tried it but it didn't work.

1)I created a custom vex node in material shader builder with outcol output para of color type.

2)In inner code, $outcol = colormap("/obj/cop2net1/Mandril.pic",P,u,v,20)

3) Output of this custom vex node is connected to surface color. But it didn't work.

vector colormap(string filename, vector uv, vector du, vector dv, int samples) , I want to use this function. I am not sure what can I input for vector uv, vector du, vector dv.

Can someone please help me out with this.

Thanks a lot for your time.

:)

Link to comment
Share on other sites

It is working. With following changes.

1)I applied uv texture to the grid.

2)Created 3 new inputs, two float para u and v and a vector para uv on custom vex node.

3)Used uvcoords operator and connected its output to u, v and uv of custom vex operator.

4)set ,$outcol = colormap("c:\Program Files\Side Effects Software\Houdini 12.0.575\houdini\pic\Mandril.pic",$uv,$u,$v,100);

It is working.

Even if I set, $outcol = colormap("c:\Program Files\Side Effects Software\Houdini 12.0.575\houdini\pic\Mandril.pic",$u,$v);

It is working.

The question is how to use pixel sample input in colormap function in step 4, even if I set it to 0, it is working.

Edited by sorry
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...