Jump to content
archz2

Separating objects by colour

Recommended Posts

How can I select objects by colour and split them into different groups so that in the external render engine, I have different sets of geometry on which I can apply different material (3 in the attached file, currently)

I downloaded the original file from this page. 
https://www.tokeru.com/cgwiki/index.php?title=HoudiniVolumes

and made changes in the colour ramp of attribute vop titled 'Cd_ramp_by_sdf_depth'. 

However, now I'm getting only one colur. 
image.thumb.png.c849d14a94d487d1237ace198da69ddd.png

 

 

Vol_worms_curlnoise_v02_edited.hipnc

Share this post


Link to post
Share on other sites

The Partition SOP has a preset for grouping primitives based on their Cd attribute; check the dropdown presets on that node.

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

I have added partition sop, chose the option of 'group by color',  but it is not splitting up my geometry into various groups. Maybe it's due to the fact that the three colors haven't been applied as mentioned earlier?

 

image.thumb.png.1731f420dba27173432beedb87fc2eb8.png

 

Vol_worms_curlnoise_v02_edited.hipnc

 

 

Edited by archz2

Share this post


Link to post
Share on other sites
Posted (edited)

The minimum and maximum values you were using to fit your ramp weren't a good input range for remapping your SDF values. I exported the sampled values to a temporary attribute ("test") and then used those values as the starting point for remapping. Once you have the color values working, the Partition SOP creates groups like you'd expect.

 

 

 

Vol_worms_curlnoise_v03_toadstorm (1).hipnc

Edited by toadstorm
updated file
  • Like 1

Share this post


Link to post
Share on other sites

I see. Thank you so much!! I'll take a deeper look at the SDF values and the ramp.  One more query. How can I avoid the polywires crashing into each others and turning with noisy joints? Enabling or disabling 'prevent joint buckling' doesn't help. 

 

image.thumb.png.6df54869db6fdeabd3d249e02d2b906e.png

Share this post


Link to post
Share on other sites

You can try several methods:
- Fuse points
- Measure Curvature and Polycut at tight corners
- Run a loop over the lines before Polywire and use Ray to manage layering
 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Fenolis said:

You can try several methods:
- Fuse points

 

Where exactly are you suggesting to fuse points in the workflow? I added fuse right after scatter but I'm still getting the same result. 

 

image.thumb.png.9d0c3c70b1bc20bd3d48a3bfea9a8868.png

4 hours ago, Fenolis said:

- Measure Curvature and Polycut at tight corners
- Run a loop over the lines before Polywire and use Ray to manage layering
 

I don't know how to do that. What is the process to do it?

 

Share this post


Link to post
Share on other sites
Posted (edited)

@archz2 You have Files on Cg-world Japan section Houdini Tutorials
Houdini Cook Book

Edited by Librarian
Nam* Sectione

Share this post


Link to post
Share on other sites
Posted (edited)
16 hours ago, Librarian said:

@archz2 You have Files on Cg-world Japan section Houdini Tutorials
Houdini Cook Book

Thanks for suggesting this resource. It's an extremely vast.

I reached here on their page listing various chapters in their series of tutorials.

https://cgworld.jp/regular/202107-hcb-114.html#related_Entries

image.thumb.png.4d9b513d4e034b86db92b775642ca789.png

 

Can you point out to any particular tutorial that covers these two techniques?

 

- Measure Curvature and Polycut at tight corners
- Run a loop over the lines before Polywire and use Ray to manage layering

 

 

 

Edited by archz2

Share this post


Link to post
Share on other sites
On 8/8/2021 at 9:43 AM, Librarian said:

@archz2 Maybe you gonna find some useful stuff .
 

zeko.jpg

Zeko.hiplc

Thanks a lot for sharing this. Will definitely check it out!

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

×