Jump to content

Debri Question


JuriBryan

Recommended Posts

Hey, so I am trying to create a basic debri system from a cached file.

I used a activation volume to only trigger some of the fracture pieces and now I want to add the debri system but only on the pieces that are moving.

No matter what I try I cant seam to emit particles only on the pieces that are moving and if that works i cant emit only on the first frame after they start moving.

The debri tool works perfectly fine the problem is quit simply that it only works if the RBD system and the debri system are running at the same time.

And it only works on active RBD objects and not on static objects.

Is there a good way to create a effective debri system?

I took a look at the debri tutorial on cmiVFX the problem is just that he does not show how to do something like that, he showed how to do it if everything happens at ones.

The Geo falls all at the same time and then it is simple to create a debri system.

But not if one piece after the other falls out.

Cheers,

Juri

Here is the base file that I use to check the debri systems.

DebriTestFile.hipnc

Link to comment
Share on other sites

No matter what I try I cant seam to emit particles only on the pieces that are moving

Simple option is (assuming objs are moving upon activation)

1)Red colored points that you are using for activation of objects in dopnet, use them. Points number matches objid

(point no 1 == piece1 + 2 , point no 2 == piece2 + 2 , and so on...)

2)after dopimport sop use delet sop and delet group called 'piece' with the reference of colored point number ($PT) using the above mentioned relation between point number and group number. In short keep geometry of active objects only.

OR

If you want to have more control like emitting particles not only from active objs but also active objes which have crossed some threshold vel,

You can use empty data dop and modify data dop combination to assign some field only upon say, abs(vely) of an obj goes beyond 1 unit.

(Search this forum on how to use empty data and modify data dops)

You can use this field value at sops to decide whether to keep geo of an obj which is active and has vel greater than 1 unit.

OR

Use dopfield expression to access vel values of dop objs and transfer them back to geo group, if vel value is greater than 1 then keep that group otherwisw delete it.

Scatter points on the output of above mentioned process .

emit only on the first frame after they start moving

One of the solutions is keep the geo of active obj for only one frame and then delete it.

Use timeshift sop to access previous frame's data. Compare previous frame's data with current frame's data to find out the new group added , just keep the new group added and delete rest. This way you will have geometry of an active obj for one frame after it's activation.

scatter points on this output, these points will be there as long as geometry is there (only for one frame after activation of an obj). Emit particles from these points.

Edited by sadhu
Link to comment
Share on other sites

Thank you, I do understand the theory behind everything you said:)

But I can't get it to work...

How do I use the relation ships that you mentioned in a delete sop, more precise how do I only take the point number of the points that are coloured red?

Everything else is clear, I just never used the delete sop in such a way and would like to know how to do something like that.

Cheers

Link to comment
Share on other sites

ok I ran into a problem.

at the last step, when I try to delete the geo after it is in a group for one frame.

I tried to use a two attributes, one for the timeshiftet sim and on for the normal sim. Then I wanted to multiply the attributes in VOPs and they have a different result then 0 the geo should be black so that I can delete every geo that is black.

But that did not work.... Then I tried using bounding geometry to group everything but that does not work perfectly. The points that are scattered on the geo life more then one frame.

Any chance that you could upload a example file?

cheers,

Juri

DebriTestFile.hipnc

Link to comment
Share on other sites

Hi Juri. Not sure if I understand correctly what you're trying to do, but you can emit particles only on moving geometry by using the inherited velocity attributes from the RBD in the pop network. If you want, you can cache the RBD object and check if there is velolcity attribute. If there is not, you first have to generate point velocity (you can do this with a trail sop). Then, you can create an attribute at SOP level, call it myvel use type vector, feed the values with velocity $VX, $VY, $VZ. Now in the Birth tab of the source operator inside the POP you can add this expression:

if ($MYVEL > 0, 1, 0) That will emit particles only when the point geometry is moving.

-Alvaro

Edited by asegura
Link to comment
Share on other sites

wow thank you that works perfectly!

just one question, is there a way to keep these points only for one frame?

I am thinking that if I would use the system from your test file to emit particles from it would mean that there would be new particles on every frame if the velocity is high enough.

So I am looking for a way to say delete the scatter points after one frame.

Does any body know of a good way to do that?

cheers and thanks for all the help!

Juri

Link to comment
Share on other sites

Juri;

You don't need to do that on the source of your particles (In your case the scatter points). You can do it at POP level using a simple expression on the Impulse Activation parameter. That would be:

$F == 1

You can also emit in a frame range using Boolean operators. Example:

if ($F >=1 && $F < 5, 1, 0). This will emit from frame one to frame 5 only. Check the file I'm attaching.

But if you want to keep scatter point only in one frame, use an expression on the delete sop. Basically is the same expression:

$F == "any frame you want"

DebriTestFile_v003.hipnc

Edited by asegura
Link to comment
Share on other sites

I did try all those ideas, the problem is that I would have to go through each piece and see when it starts moving, and then delete all scattered points for each piece by hand.

So I am searching for a way to do that with a procedure instead by hand.

any ideas?

cheers

Link to comment
Share on other sites

ok I found a solution that generates emission geometry for smoke FX and particles for debri.

The solution right now is probably not the fastest solution but it is fully procedural and follows the main RBD simulation at all times.

thanks for all the help that got me to this point.

Cheers,

Juri

DebriTestFile.hipnc

Link to comment
Share on other sites

is there a way to keep these points only for one frame?

Refer your file attached to the 4th post of this thread.

Connect timeshift node after color4 and also connect delete sop after color4 node(two separate connections).

In timeshift write value == $F-1

In delete sop (set to particles)delete non selected, delete by expression $PT>=npoints("../timeshift1").

emit particles from this delete node.

Crosscheck total no of points with particles once the activation process of rigid bodies stops by middle clk on color4 and popnet node to find out total no of points and total no of particles respectively. It matches. it is 1750. (50 particles * 35 pieces)

Edited by sadhu
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...