Jump to content

Accessing DOPs information at SOP level.


Symbolic

Recommended Posts

Hi,

I have a network which ends with an RBD node. Each objects is in a group... so the groups are "chunk0, chunk1, chunk2..." Then all of that geometry goes into a DOPNET based on this RBD node. This is obviously an "RBD Fractured Object" setup. After that I have a "dopimport" node that reads the transformation data back to the SOP level and the chunks are animated in respect to what happens in the DOP network.

At this level I am trying something simple. I want all my objects to become blue after they impact with something.

So I have a pointSOP with the following expression in its $CB field:

if (dopnumrecords("/obj/geo1/dopnet1", stamp("..","objid",0), "Impacts", "Impacts") > 0, 1, 0)

Obviously the "stamp" does not work here. How can I read the impact data for each of my chunks. Like "chunk1" and so on.

`primgrouplist("../RBD")` will give me the names of my groups... which are the names of my RBD objects as well... I feel that might be usefull... but could not implement it.

In the old days, when we used to read in the DOP objects with an object merge... this would have worked... probably.

Anyway... just trying to remember some DOPs stuff... and trying to avoid watching all these DOPs tutorials again... :)

Cheers.

Link to comment
Share on other sites

Here you are a quick solution. The sphere gets blue only when they have at least one impact, but with some boolean data creation in dops, or with a feedback sop, you'll be able to switch the color definitively after the first impact. If there's somethings you don't understand in the hip file, i'll can explain you...

SopImpacts.hip

Edited by Div
Link to comment
Share on other sites

Thanks Div,

It works. I was suspecting that there should be some kind of a loop. :)

Is there a way of keeping the ball blue after the first impact? I mean which is the actual data that keeps the records of each impact... The "Impact" data is coming on and off during each impact... Is there a data that just goes 1,2,3 after each impact? The incosistent "impact" data makes my blue balls flicker... and not stay blue, I guess.

Cheers.

Link to comment
Share on other sites

Yep, the impacts data only exists when there is an impact. To bypass this, you have to create your own data, using a modify data Dop. Here is the corrected scene, where i create a 'collided data' for the first impact, which stay true for the rest of the sim, so the balls stays blue. I've modified also at the sop level the switch expression in order to reference my created data.

SopImpacts2.hip

Edited by Div
Link to comment
Share on other sites

I am wondering... Why I can not use this to group objects inside my DOP sim.

I create an empty data called "collide"... I can see it in the RBD Detail view. I have a "Modify Data" node that sets a sub-data under "collide" called "status" to 0 at frame 1.

So I have this:

OBJ > collided > status=0

After the first impact I set the "status" to 1 with a "Modify Data" node that has this expression in its activation field:

dopnumrecords("/obj/geo1/dopnet1", $OBJID, "Impacts", "Impacts")

So I have this:

OBJ > collided > status=1

I can clearly see that the data is applied properly to each object.

But when I use this:

if(dopoption("/obj/geo1/dopnet1", $OBJNAME, "collided", "status") >0,1,0)

on the Group's activation field. It is not grouping the ones that hit the ground?!

Sorry, this is getting a bit abstract... but I will try to post a file soon.

Thanks.

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...