MENOZ Posted June 30, 2008 Share Posted June 30, 2008 hi! i have an imported object sequence, with many pieces of geometry. with the connectivity SOP and partitionSop i create the various groups for each piece of geometry. now i want to assign a different color to each group of polygons, randomly. how can i use the groups i created to drive the color? if i have point i can use the $PT, but here i have sheet_0 sheet_1 sheet_2 etc.. that's the hip file for example. sheet.hipnc Quote Link to comment Share on other sites More sharing options...
symek Posted June 30, 2008 Share Posted June 30, 2008 hi!i have an imported object sequence, with many pieces of geometry. with the connectivity SOP and partitionSop i create the various groups for each piece of geometry. now i want to assign a different color to each group of polygons, randomly. how can i use the groups i created to drive the color? if i have point i can use the $PT, but here i have sheet_0 sheet_1 sheet_2 etc.. that's the hip file for example. can't you use $CLASS from ConnectivitySOP as a seed for rand() for color? 1 Quote Link to comment Share on other sites More sharing options...
MENOZ Posted June 30, 2008 Author Share Posted June 30, 2008 can't you use $CLASS from ConnectivitySOP as a seed for rand() for color? :bag: yes, you are right thank you! Quote Link to comment Share on other sites More sharing options...
junaid Posted July 1, 2008 Share Posted July 1, 2008 :bag:yes, you are right thank you! I am trying the same but couldn't get it, could you explain me this how do i use this $CLASS variable for random color on each random group..? Cheers, Junaid Quote Link to comment Share on other sites More sharing options...
junaid Posted July 1, 2008 Share Posted July 1, 2008 I have attached connectivity and partition for making groups with $CLASS variable, but cant figure out how do i use the same for random color..? Junaid Quote Link to comment Share on other sites More sharing options...
symek Posted July 1, 2008 Share Posted July 1, 2008 I have attached connectivity and partition for making groups with $CLASS variable, but cant figure out how do i use the same for random color..?Junaid Append PointSOP -> Add Color, RMB -> Delete Channels, type in R: rand($CLASS) then in G: rand($CLASS+4) etc... Quote Link to comment Share on other sites More sharing options...
junaid Posted July 1, 2008 Share Posted July 1, 2008 Hi Simek, i tried that already but it didn't work. I am attaching my file if you like to see any problem with my geometry or something. Cheers, Junaid fracture_test.zip Quote Link to comment Share on other sites More sharing options...
graham Posted July 1, 2008 Share Posted July 1, 2008 You can't use local variables with the Color sop because it is a digital asset. Try using a Primitive sop instead. Quote Link to comment Share on other sites More sharing options...
junaid Posted July 1, 2008 Share Posted July 1, 2008 I tried with Primitive SOP as well but didn't work with me, do you mind trying with my file? Cheers, Junaid. Quote Link to comment Share on other sites More sharing options...
junaid Posted July 2, 2008 Share Posted July 2, 2008 Hi I have tried with primgrouplist augment with stamping, it worked okay. here is a file if anybody need it. but it would be nice to see if anyone can show this happen with $CLASS variable, Cheers, Junaid. test_rand_color.zip Quote Link to comment Share on other sites More sharing options...
graham Posted July 2, 2008 Share Posted July 2, 2008 See attached. rand_color_boxes.hip Quote Link to comment Share on other sites More sharing options...
junaid Posted July 2, 2008 Share Posted July 2, 2008 ohh thanks graham, this is quite simple, but i tried this method but didn't worked that time. I was probably in hurry and didn't tested this method properly. thanks. Cheers, Junaid. 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.