Jump to content
Sign in to follow this  
hampuseh

copying color from parent in for each

Recommended Posts

Greetings!
I am currently creating a tree and now I want to group each section of branches in 1 color. 

Capture.thumb.PNG.12a073fb29b3d4ae538096a53d3b8b2e.PNG

In the picture above you see that I have given a random color to the start of each section, now I want the branches connected/close to the section to get the same color. So in the end each branch section will have same color. 

How would I do this?

Share this post


Link to post
Share on other sites
Posted (edited)

Well... after a little testing I actually found out that the attribute transfer worked for me without any issues.. 
 

EDIT: Actually it didn't work too great. Attribute transfer transfers attributes by radius proximity, which means that some branch pieces gets another colour.

Capture.PNG.032bc1a277dc2e21e6bed7c3487c5ad5.PNG

Edited by hampuseh

Share this post


Link to post
Share on other sites

if the branches are connected you can use Edge Transport SOP that will propagate attribute from root point of the connected edge network to all the branches

edgetransport_color.hip

Share this post


Link to post
Share on other sites

Thanks for the idea! 
It does seem to work the way its supposed to :)
But since I didnt actually start out with a l-system setup it was somewhat difficult to actually fuse the branches together without any weird artifacts. But I got it working thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×