Noobini Posted February 1, 2018 Share Posted February 1, 2018 here's another classic case....sure you can immediately launch into a big mass of codes/logic...or you could sit back a bit, analyse the problem and then use common sense: https://www.sidefx.com/forum/topic/53827/ Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 (edited) in case ppl don't have access to download the scenes, here's the VEX solution (No I'm not having a go at the contributors) if( (@primnum >= 0) && (@primnum <= 1) ) { setprimgroup(geoself(), "zero", @primnum, 1, "set"); } if( (@primnum >= 2) && (@primnum <= 4) ) { setprimgroup(geoself(), "one", @primnum, 1, "set"); } if( (@primnum >= 5) && (@primnum <= 8) ) { setprimgroup(geoself(), "two", @primnum, 1, "set"); } if( @primnum == 9) { setprimgroup(geoself(), "three", @primnum, 1, "set"); } if( (@primnum >= 10) && (@primnum <= 11) ) { setprimgroup(geoself(), "four", @primnum, 1, "set"); } if( (@primnum >= 12) && (@primnum <= 13) ) { setprimgroup(geoself(), "five", @primnum, 1, "set"); } if( (@primnum >= 14) && (@primnum <= 15) ) { setprimgroup(geoself(), "six", @primnum, 1, "set"); } if( (@primnum >= 16) && (@primnum <= 17) ) { setprimgroup(geoself(), "seven", @primnum, 1, "set"); } if( @primnum == 18) { setprimgroup(geoself(), "eight", @primnum, 1, "set"); } if( @primnum == 19) { setprimgroup(geoself(), "nine", @primnum, 1, "set"); } int Success; vector Color; if( inprimgroup(0, "zero", @primnum) == 1) { Color = primattrib(1, "Cd", 0, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "one", @primnum) == 1) { Color = primattrib(1, "Cd", 1, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "two", @primnum) == 1) { Color = primattrib(1, "Cd", 2, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "three", @primnum) == 1) { Color = primattrib(1, "Cd", 3, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "four", @primnum) == 1) { Color = primattrib(1, "Cd", 4, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "five", @primnum) == 1) { Color = primattrib(1, "Cd", 5, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "six", @primnum) == 1) { Color = primattrib(1, "Cd", 6, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "seven", @primnum) == 1) { Color = primattrib(1, "Cd", 7, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "eight", @primnum) == 1) { Color = primattrib(1, "Cd", 8, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } if( inprimgroup(0, "nine", @primnum) == 1) { Color = primattrib(1, "Cd", 9, Success); setprimattrib(0, "Cd", @primnum, Color, "set"); } another solution is in this screenprint: Then there's my common sense solution....of one node, take your pick.. Edited February 1, 2018 by Noobini Link to comment Share on other sites More sharing options...
Guest tar Posted February 1, 2018 Share Posted February 1, 2018 Eh? ...the common sense solution isn't very robust. Just add more scatter points to see it fall apart. Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 show me... and if it comes down to him having his Distance Threshold at 10...well, I made a comment there... but anyway, show me... Link to comment Share on other sites More sharing options...
Guest tar Posted February 1, 2018 Share Posted February 1, 2018 Scatter set to 55.. In the end not sure of why this entire thread exists. Common sense is nothing more than the education you have before you are about 20. attrTransfer_fixed_55.hipnc Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 subdiv Depth 4, done. Link to comment Share on other sites More sharing options...
Guest tar Posted February 1, 2018 Share Posted February 1, 2018 and that doesn't work for a scatter of 113.. Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 (edited) I'm surprised you haven't gone straight to scatter 1 million points... (i'm a poor guy so my rig is crap...can't go anywhere near there) Edited February 1, 2018 by Noobini Link to comment Share on other sites More sharing options...
Guest tar Posted February 1, 2018 Share Posted February 1, 2018 I did test it at various other settings it's a pretty poor solution to start a thread with and trumpet to other solutions. Not sure of the goal tbh unless you are aiming for ad hoc instead of robust solutions. Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 fair enough if you think my solution is poor...I made a contribution. So if you put up a better solution so everyone, including me, can learn from,...great... Or do you just wanna have a go at me ? Yes, I'm a noob. Intimidated ? NO. Link to comment Share on other sites More sharing options...
Guest tar Posted February 1, 2018 Share Posted February 1, 2018 ummm I have no interest in you, my interest is in robust solutions that scale in Houdini. For whatever reason you are personalising this feedback. 6 minutes ago, Noobini said: fair enough if you think my solution is poor...I made a contribution. So if you put up a better solution so everyone, including me, can learn from,...great... Or do you just wanna have a go at me ? Yes, I'm a noob. Intimidated ? NO. Link to comment Share on other sites More sharing options...
Noobini Posted February 1, 2018 Author Share Posted February 1, 2018 3 minutes ago, marty said: ummm I have no interest in you, feeling is mutual Link to comment Share on other sites More sharing options...
michael Posted February 1, 2018 Share Posted February 1, 2018 I think this thread has run out of steam... lets all move on. Link to comment Share on other sites More sharing options...
Noobini Posted February 2, 2018 Author Share Posted February 2, 2018 sincere apologies Michael for this one more post...but here's a better solution. (I won't explain here, it is on SESI thread) attrTransfer_fix2.hipnc Link to comment Share on other sites More sharing options...
Marc Posted February 2, 2018 Share Posted February 2, 2018 Now this thread is really done. 1 Link to comment Share on other sites More sharing options...
Recommended Posts