Jump to content

Avoiding instancing interpenetration


Hyrulean

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

Link to comment
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.

Link to comment
Share on other sites

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
Link to comment
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);

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...