Group Primitives by Color

   5252   5   0
User Avatar
Member
4 posts
Joined: March 2011
Offline
Hey guys, Im in the middle of a shot, and heres a quick overview of what i want to achieve, and the problem im having:

I want to have a car explode as somones walking away, specifically, the top, one tail light, and both mirrors are going to blow off. The plan (and correct me if this is a bad way to go about it) Is to group those items, turn them into RBD fractured objects and use Voronoi fractures to get chunks, then keyframe on some velocity and activate the sim at the desired time.

My problem:
Ive got my car geometry in, and my current tree on this car is as follows:
File sop
color sop (to turn everything black)
paint sop (to paint the desired areas pure red)

Now im trying to find some way to make the red ones a group of some sort so that i can select just that area and make it the RBD and apply a fracture.

I tried using a partition with the rule “$cd” but it didnt do anything noticeable. I am also trying to use a group by expression, but when i set it to by expression im not sure where to put the expression, or what expression exactly to use.
*I thought of trying group by bounding box, but because i want the mirrors and just one tail light to explode as well, and not certain areas between them and the rest of the explosion, id prefer to learn how to do it with a paint.

Im going to continue fooling around on my own while i eagerly wait for some help, and will post if i solve it.

Thanks!
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
Hi,
See the attached file showing how you could create groups based on a custom attribute.

As to the workflow well I think you might have problems trying to shatter open faced geometry .But thats for you to explore with small tests ! .

Rob

Attachments:
rse_grp_basedOnExpression.hip (54.0 KB)

Gone fishing
User Avatar
Member
4 posts
Joined: March 2011
Offline
Hey thanks a lot for the help!
I just have one question:
Just so that i understand what I am doing and can apply it to other projects - in your expression: $CR>=0.2 I know (at least i think) that the $CR part of it is for color red to get the R of RGB, however i dont know what the >=0.2 Is doing in the expression, could you explain?
User Avatar
Member
349 posts
Joined: Aug. 2006
Offline
The 0.2 is just saying…. “If the $CR (red channel) has a value higher-or-equal-to 0.2, then group those primatives, if not then don't.” (assuming that it's in a groupsop)

It's a case of excusion. Anything with a red value of less than 0.2 will be ignored.
Edited by - March 19, 2011 16:44:21
User Avatar
Member
4 posts
Joined: March 2011
Offline
Ahh i see. Well youll be happy to know that with some finessing, the Veronoi fracture plan worked, and i now have a car with the top being blown off. Now to learn pyro fx to make the explosion/flames/smokes… *sigh* lol.

Thanks again for your help!
User Avatar
Member
349 posts
Joined: Aug. 2006
Offline
Glad to help
Post some animations in the wip area (work in progress). We all love to see fresh material.
  • Quick Links