scatter Tubes

   14622   18   4
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
Hi there!
I'm wondering how to model scattered Tubes without intersection?

Attachments:
Screen shot 2010-02-04 at 17.44.25.png (140.7 KB)

User Avatar
Member
31 posts
Joined:
Offline
Hi aquarel,

I could suggest you to take a look here: http://www.sidefx.com/index.php?option=com_content&task=view&id=1096&Itemid=279 [sidefx.com]

and download the pdf, that's awesome…
or if you want a quick way to achieve something “similar”, that doesn't take care about anything mentioned in the pdf, you could take a look at my quick scene.

If you change the tube's radius, you can see that the fuse SOP fixs for you the intersection, and if you need more or less precision, you could change the iteration number in the foreach SOP.

Hope that's what you are looking for.

Cheers,
Emanuele

Attachments:
scattered_tubes.hipnc (49.0 KB)

www.leleberti.com

Lead Crowd TD @ DNeg London
________________
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
Hi emanuele.
Exactly arkadiusz rekita pic of seed simulation I would like to understand how to do it! Thanks a Lot for your quick scene. but if I want to randomize the radius it stops work. Could you try to explain me how to do this right way?

Attachments:
Screen shot 2010-02-04 at 21.43.45.png (294.0 KB)
Screen shot 2010-02-04 at 21.38.24.png (149.0 KB)

User Avatar
Member
257 posts
Joined: Nov. 2007
Offline
do a search for “circle packing” (here, on odforce and in google).
You will find a lot of different algorithms that allow you to do this kind of thing.
Cg Supervisor | Effects Supervisor | Expert Technical Artist at Infinity Ward
https://www.linkedin.com/in/peter-claes-10a4854/ [www.linkedin.com]
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
no no, the packing algorythm is something different. I found out it yet. I need tubes with diferrent radius scattered in area , without intersections with each other the best with some space around each tube.
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Don't have time to do an exemple scene, but here's a quick and dirty recipe:

-Scatter some points
-Triangulate 2d them (You can also use existing geometry)
-Measure sop the result for every triangle in AREA mode
-Poly extrude the triangle to 0/check only front part of extrude.
-The result should look like scattered points…fuse them to get rid of them overlapping.
-Promote your AREA attribute to points
-Rename area point atribute to “pscale”
-Copy sop any geometry on your scattered point
-Adjust the size of your original copied object so it fits in harmomy
-open a beer and celebrate

I hope I did not miss a step…Cheers!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
7899 posts
Joined: July 2005
Offline
no no, the packing algorythm is something different. I found out it yet. I need tubes with diferrent radius scattered in area , without intersections with each other the best with some space around each tube.
Your problem is still a circle packing problem. In your case, you just want to randomly delete some of the circles after they've been packed.
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
hi ,
I tried the procedure what jrgauthier wrote , but it doesn't work, probably some mistake from my side. I'm just learning Houdini , so I dont understatnd all functions , some SOP's so I can't solve some problems.
To edward: I tried to do trough circle packing but it doenst do , what I want. The main problem I see in inaccurate circles/tubes.
better than 1000words is one pic. so I upload here simmilar pic what I want.
It's form arkadiusz rekita seed simulation system.
BUT I dont need his seed ecosystem. I jus want to scatter some Tubes with different radius without interseciton - the best with some “repulsive” force when they are too close to others. (shuld I try it trough particle system?)
I looking for some sources and other solutions . I found http://www.devmag.org.za/articles/55-POISSON-DISK-SAMPLING/#top3 [devmag.org.za]
and the paralel forum for this http://forums.odforce.net/index.php?/topic/10345-even-point-distribution-on-geometry/page__hl__scatter%20__fromsearch__1 [forums.odforce.net]
BUT the problem is , that I don't know how to transform it for my needs.
How to copy Tubes on scattered points and change they radiuses by Stamp function and interactively changing their radius also affect the distances between tubes. It sounds complicated…

Attachments:
circle_packing_delete.hipnc (203.8 KB)
Screen shot 2010-01-09 at 9.47.21.png (1.8 MB)
Screen shot 2010-02-05 at 21.25.16.png (28.0 KB)

User Avatar
Member
8833 posts
Joined: July 2007
Offline
here is simple example of one of the method how you can do this
it's using VOP SOPs to detect nearest connected point and calculating pscale from that

it can be also done with pointclouds for not connected points

and as you mentioned with particles. More exactly with Interact pop based on particle radius. Then you'll just wait for couple of frames for sim to settle down.

Attachments:
nonintersecting_tubes.hipnc (75.4 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
8833 posts
Joined: July 2007
Offline
EDIT: doublepost
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
31 posts
Joined:
Offline
That' s amazing !!!

Thanks Tomas… with your example I can understand better how to use neighbourCount and neighbour !!!
www.leleberti.com

Lead Crowd TD @ DNeg London
________________
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
thank you very much Tomáš!
the last think I don't know (can't understand) how to interactively change the radiuses of tubes simultaneously with their distances.
User Avatar
Member
8833 posts
Joined: July 2007
Offline
the radiuses are calculated from proximity to the neighbour points so if you change distribution of the points, in this case in triangulate2d sop or after, the radiuses will be updated

if you need it to be the other way around (change radiuses -> distribution will compute) you may consider particle method with interact POP i was writing about
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
yeah, in this case, I must rebuild this trough the particle system, becuse the priority is in changing the radiuses. thanx , I 'll try. :roll:
User Avatar
Member
8833 posts
Joined: July 2007
Offline
i was posting the solution with interact pop some time ago, but i don't know if it was here or at odforce, you can try to find it. I'll have a look for it too, but i can make another example later.

EDIT: ok, found it http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=83704#83704 [sidefx.com]

but i have already updated the file for your needs, here it is

Attachments:
nonintersecting_tubes_sim.hipnc (352.3 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
13 posts
Joined: Oct. 2009
Offline
it would be generous from you.)
EDIT: very cool, thankyou! I have to study it first and learn a little bit in deep.
Edited by - Feb. 6, 2010 16:07:34
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
WOW this is so awesome guys!
Tamte's solutions are way better than mine, forget about mine!
I almost understand your vop sop solution, it's when i hit the substract node inside the for loop node I can't really understand whats going on… Could you give some precisions?

thanks!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
User Avatar
Member
8833 posts
Joined: July 2007
Offline
jrgauthier

I almost understand your vop sop solution, it's when i hit the substract node inside the for loop node I can't really understand whats going on… Could you give some precisions?

by subtracting two positions you'll get vector from one position to another then length of that vector will give you distance between those points

i could use Distance VOP instead of Subtract and Length VOPs with the same result, but i forgot about if when creating it

what the VOP SOP is doing in short is:
loop through all neignbour points , get closest neighbour by comparing distances to all neighbours in for loop
return smalest distance / 2 as pscale

it will not give you the largest nonintersecting radiuses for tubes but the result is quite ok
you can loop through several iterations of similar VOP SOP where it will be improved by using previously computed pscales to get more accurate result
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
243 posts
Joined: Oct. 2007
Offline
Awesome, thanks alot!
JR Gauthier
Character Animation & Design
www.turboatomic.com
http://www.vimeo.com/user2847970 [vimeo.com]
  • Quick Links