Sorting Primitive numbers by Primitive area

   10290   8   3
User Avatar
Member
319 posts
Joined:
Offline
Hi,

Does anyone know how I can sort primitive numbers on a piece of geometry by how big the primitive area is? For example if I have a box with a chunk cookied out using a polgon sphere, i want to keep the original faces of the box primitive numbers 0-5 with all the cut out primitives (i.e. the smaller ones left as a result of the cookie with a polygon sphere) being 6 - N….

Thanks.
User Avatar
Member
4256 posts
Joined: July 2005
Offline
The Cookie SOP has a groups option so you can make groups out of the different parts of the cookie's result.

Also, you can use the Measure SOP with “area” mode. Then after that use a Sort SOP to reorder the primitives. Just use expression mode, and put something like, “prim(”../measure1“,$PR,”area“,0)” as the expression.
if(coffees<2,round(float),float)
User Avatar
Member
2199 posts
Joined: July 2005
Online
The cookie sop will also maintain any groups that are on the geometry that is passed in. So if all the polys in your sphere are in a group before the cookie then the surfaces built from that sphere after the cookie will still be in the group even if they get cut.
The trick is finding just the right hammer for every screw
User Avatar
Member
319 posts
Joined:
Offline
Thanks wolfwood, that worked well, I've never used the Measure SOP before 8) . I'll have a look at your suggestion too Simon, thanks as well.

I'm (still) trying to create a geometry prefracturer for use in DOPs, this time using the SOP_Solver. My fracturer (based on a hip file given to me by pbowmar I must add) now sort of works but still it is not very robust. If anyone if still trying to do the same sort of thing feel free to download and have a play….

Cheers.

Attachments:
my_new_cookie_4.hip (609.5 KB)

User Avatar
Member
7025 posts
Joined: July 2005
Offline
Dude, use the Maya slicer tool. Getting the job done is more important than trying to make it purely Houdini. I think Max has a tool that does this too. Hopefully one day Side Effects will provide one

Cheers,

Peter B
User Avatar
Member
319 posts
Joined:
Offline
Yeah I do want to but it's proved a bit fussy on certain geometry so I thought I'd try the OTL route again…I think it's gonna have to be a combination of methods….
User Avatar
Member
44 posts
Joined:
Offline
hi !

You can take a look at test i made for some project. It is far from being procedural, but i think you can swap bottle geometry with something else and it should work.I exported animation to maya (because of mental ray) and added some particles after. I never rendered whole animation tough, only playblasts.

kumpa

p.s.:i think u have to open file in 8.1.625, it crashed on 8.1.685

Attachments:
bottle.hip.tar.gz (198.5 KB)
zima_tst_3.jpg (144.4 KB)

User Avatar
Member
509 posts
Joined: July 2005
Offline
here's my test I did time ago … trying to archieve as well a method of shattering an object…

I did many tries to make an OTL from this scene.. with no much success yet…. but i'm not giving up yet… I'm sure ther's a way to make this more procedural….

hope this help.. but after watching Kumpa's scene i found that is pretty much the same.

cheers

p.s. scene Notes: obviously my scene has much less pieces… but it still needs you save the geometry after it's shattered and before giving it into the DOP network

Attachments:
head_setup_16.hipnc.zip (881.4 KB)

JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
User Avatar
Member
319 posts
Joined:
Offline
Thanks for your help guys and for posting the files. That jpg looks great. I've actually managed (shock, horror!!) to get my fracturer to work pretty well. Seems to chop up the geometry fed into it pretty nicely. I'm looking to improve it by adding more randomness to the cutter geometry (at the moment it just uses a fractilized sphere with random size parameters) and then wrap it up into a nice OTL….when I get that done i'll post it on the exchange….that might not be for a few weeks though…deadline looming………!! :wink:
  • Quick Links