Jump to content
Hyrulean

Avoiding instancing interpenetration

Recommended Posts

Hello everyone! I am trying to do a simple thing but it seems like I am missing something.

I want something similar to this: 

But instead of controlling it by pscale, I would like to take the bounds of my instancing objects and make them get away from each other if the bounds of the instanced object is bigger than the distance between the points, or maybe deleting them as well.   

I am trying to do this just to scatter some crowds in a field, is there is an easier way to do that, it would be nice to know as well as I am quite new to crowds.

I am attaching a simple example file of what I am trying to do.

Crowd_RND_01.hip

Share this post


Link to post
Share on other sites

- not sure why you randomize Max/Min to the same value...might as well set every Tom/Dick/Harry = 0.868391

- instead of using box, use bounds, set bounding type to rectangle, you get a nice footprint (can even orient the rectangle) then I think area makes more sense than the total area of a 3d box.

Share this post


Link to post
Share on other sites
Posted (edited)

just foolin' around abit

Off topic:

there's a convenient Radii Attribute in bound, it outputs detail radii[0] radii[1] radii[2]

They are halflengths for a bounding rectangle (or box)...could be useful for proxy radius tho not as accurate as using trig to workout the radius

but how the HELL do i access these ? the only thing that worked was: detail("../blah","radii",0)...how to access radii[1] ?

Crowd.jpg

vu_Crowd_RND_01.hiplc

Edited by Noobini

Share this post


Link to post
Share on other sites

hmmm...FYI,

you can see the detail("../bound1","radii",1) works perfectly in the Circle SOP

yet if I use that same VEX func in the wrangle, NO dice...no matter what I tried, in the end I simply refer to the chanel in the circle...PIA !

 

vu_Crowd_RND_radii.hiplc

Share this post


Link to post
Share on other sites
50 minutes ago, Noobini said:

hmmm...FYI,

you can see the detail("../bound1","radii",1) works perfectly in the Circle SOP

yet if I use that same VEX func in the wrangle, NO dice...no matter what I tried, in the end I simply refer to the chanel in the circle...PIA !

 

vu_Crowd_RND_radii.hiplc

in wrangle you just use node input numbers, instead of a network path: detail(0, 'radii', 1);

Share this post


Link to post
Share on other sites
Posted (edited)
15 minutes ago, davpe said:

in wrangle you just use node input numbers, instead of a network path: detail(0, 'radii', 1);

could have sworn i tried that first off, ie connected it to 2nd input of wrangle, then tried all 0,1,2 indices. :angry:, 1st input was for the points that was gonna set f@brad value for.

Edited by Noobini

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

×