Symbolic Posted July 23, 2009 Share Posted July 23, 2009 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. Quote Link to comment Share on other sites More sharing options...
Div Posted July 24, 2009 Share Posted July 24, 2009 (edited) 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 July 24, 2009 by Div Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 24, 2009 Author Share Posted July 24, 2009 Thanks Div! I will have look at it now. Cheers. Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 24, 2009 Author Share Posted July 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
Div Posted July 24, 2009 Share Posted July 24, 2009 (edited) 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 July 24, 2009 by Div Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 24, 2009 Author Share Posted July 24, 2009 Hey! That works really good. Thanks! Very nice example. Very educative as well. so "Modify Data" in DOPs is like "AttributeCreate" at SOP level. Cool Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 24, 2009 Author Share Posted July 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
Symbolic Posted July 24, 2009 Author Share Posted July 24, 2009 Ok. Ok. I have to put my grouping expression in the "expression" section of that group... not in the activation Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.