Jump to content

changing color based on a map after a wiresim?


Recommended Posts

I've generated a bunch of wires which I then applied a wiresim to. Now after this I want to change the colors of the primitives through a texture map. I'd like to do this after the simulation so I can change the texture without having to run the simulation again. 

Usually when applying hair material to hair you can add a texture map to the root color. This will then allow you to color in the hair based on anything. This doesnt seem to work with my generated wires though. changing the root and tip color does result in a gradient over the strand like image 1. But applying a map projects the entire image per strand. 

image.thumb.png.c561c8b10ae21e2dc9004f9223c15a17.pngimage.thumb.png.8998bc927d2da08781fa52fa4aa58afb.png

Is there any way to adjust the colors to what I want? 

 

Edit for slightly more informaion:
image.thumb.png.e40b1e3b48552098c82aee01839c4692.png

So it would be nice to have the strands inherit the color of a texture somehow. 

Edited by netherknight
Link to comment
Share on other sites

Hi,

Instead of plugging a map into the root color (which then may used the uv created by the polywire sop - if any), maybe you should try to transfer Cd attribute from your grid (the one where you have plugged an attributefrommap sop) to the root point of your wires, and see if the hair shader can use the color point attribute as color (instead of the map) ?

Link to comment
Share on other sites

Yes this definitely works however I can only seem to do this during the creation of the wires. Sadly this means I need to stat the simulation over again because Houdini sees the change in color as a adjustment making the previous simulation moot. (Unless there's a way of avoiding that whilst maintaining the color change) 

This also wouldnt work with rendered out simulations ofcourse due to point color being part of the mesh. 

 

Link to comment
Share on other sites

if the topology of your wires doesn't change, use a copy of your "initial" wires - where you transfer the Cd attribute on the root - , and transfer attributes between your two set of wires (the one coming from simulation and the one where you have the root color transfered) using the topology : attributecopy SOP

http://www.sidefx.com/docs/houdini/nodes/sop/attribcopy.html

 

Link to comment
Share on other sites

just store 'uv' attribute from your geo on wires instead of color (you can rename it if you want to have another attrib called 'uv')

then you can bind this attrib directly in the shader and sample any texture to get your colors without resimming anything or any additional sop setups

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...