lugnut Posted November 16, 2017 Share Posted November 16, 2017 Hi- I'm manipulating objects in a sim with a sop solver, based on their dop object names. The simple case is to say, turn on or off the @active attrib in a bullet sim base on the object name. Right now I'm adding a string attrib with the name to the packed primitives on the SOP side, before they get made into an RBD packed object and checking that name the sop solver in the sim, using a point wrangle to make changes, etc. It occurs to me though that OBJID is and the object name are both available but I can't figure out how to read them while in the sop solver. I know I can use a function like dopoptions to get the name but that requires me to have the OBJID of the dop oject that the sop solver is working on and I can't figure out how to get that in the sop solver itself. In short, what node/expression will get me access to the object's name or id in the sop solver inside a dop sim? Thanks Quote Link to comment Share on other sites More sharing options...
galagast Posted November 16, 2017 Share Posted November 16, 2017 (edited) If you're using the RBD Packed Object DOP, I believe you're best option is the one you're using now.. the point attributes. $OBJIDs does not represent a unique ID for each packed primitive. It represents a simulation object's unique ID. In the attached file, I've setup a Packed version and Fractured version. Inside the DOP network, if you look at the Geometry Spreadsheet, this is what it would look like comparing the two: For Packed Objects, you'll get just one simulation object. But for a Fractured Object, you'll get each piece as a separate simulation object. EDIT: I accidentally hit the submit button >__< As for accessing the OBJID, use the Fractured Object method. The Sop Solver already has code on how to access it on the dop_geometry SOP inside. (see the stamp function) As an example, in the attached file, I used a Sop Solver to isolate OBJID 8 and shrunk it down during the sim. A drawback with the Fractured Objects method is that it can be slow to process thousands of simulation objects. That is why the packed method was introduced a few versions ago. As another note, the option to choose which method to use also appears whenever using the RBD Fractured Object shelf button: H16.5.268 Indie - dop_objid.rar Edited November 16, 2017 by galagast 1 Quote Link to comment Share on other sites More sharing options...
lugnut Posted November 20, 2017 Author Share Posted November 20, 2017 Jeff, thanks for your thorough reply. The stamp expression in the switch node is what I'm looking for. I do understand the packed/non-packed difference but was just looking for a way to differentiate by objects. Thanks! 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.