# Common Sense

## Recommended Posts

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:

##### Share on other sites

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 by Noobini

##### Share on other sites

Eh? ...the common sense solution isn't very robust.  Just add more scatter points to see it fall apart.

##### Share on other sites

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...

##### Share on other sites

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

##### Share on other sites

subdiv Depth 4, done.

##### Share on other sites

and that doesn't work for a scatter of 113..

##### Share on other sites

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 by Noobini

##### Share on other sites

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.

##### Share on other sites

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.

##### Share on other sites

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.

##### Share on other sites
3 minutes ago, marty said:

ummm I have no interest in you,

feeling is mutual

##### Share on other sites

I think this thread has run out of steam...

lets all move on.

##### Share on other sites

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

##### Share on other sites

Now this thread is really done.

• 1