netherknight Posted September 27, 2018 Share Posted September 27, 2018 (edited) 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. Is there any way to adjust the colors to what I want? Edit for slightly more informaion: So it would be nice to have the strands inherit the color of a texture somehow. Edited September 27, 2018 by netherknight Quote Link to comment Share on other sites More sharing options...
netherknight Posted October 1, 2018 Author Share Posted October 1, 2018 Is there no way to go about this? Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted October 1, 2018 Share Posted October 1, 2018 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) ? Quote Link to comment Share on other sites More sharing options...
netherknight Posted October 1, 2018 Author Share Posted October 1, 2018 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. Quote Link to comment Share on other sites More sharing options...
StepbyStepVFX Posted October 1, 2018 Share Posted October 1, 2018 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 Quote Link to comment Share on other sites More sharing options...
netherknight Posted October 1, 2018 Author Share Posted October 1, 2018 Thank you! I will try it tomorrow, just heading home from work now. I'll let you know if it works! Quote Link to comment Share on other sites More sharing options...
anim Posted October 2, 2018 Share Posted October 2, 2018 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.