Sorting Primitive numbers by Primitive area
10290 8 3- Dean_19
- 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.
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.
- wolfwood
- 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.
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)
- Simon
- 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
- Dean_19
- 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.
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.
- pbowmar
- Member
- 7025 posts
- Joined: July 2005
- Offline
- Dean_19
- Member
- 319 posts
- Joined:
- Offline
- kumpa
- 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
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
- VisualCortexLab
- 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
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
JcN
VisualCortexLab Ltd :: www.visualcortexlab.com
VisualCortexLab Ltd :: www.visualcortexlab.com
- Dean_19
- 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