tanzola Posted November 15, 2019 Share Posted November 15, 2019 Hello, I'm sure my title for this post could be clearer, so for visualization purposes, say I have a field of discs that are RBD Packed Objects on the XZ plane, and above them there's a sphere with gravity: Normally the sphere would fall onto the discs and the discs would act more or less like a ground object, but I'm trying to have the discs raise up depending on each one's respective distance to the sphere. So far I've found that the positions of the discs (RBD Packed Objects) can be controlled in a sop solver within the dopnet, but I have no idea how to reference the position of the simulated geometry (the sphere) to inform the discs' positions. Can anyone show me the way? My ultimate goal is to eventually replicate the desired effect with the sphere being a vellum object.. would that require a different workflow? Here's my setup so far that may or may not save you a minute: sample.hipnc Thanks for taking a look! Quote Link to comment Share on other sites More sharing options...
jimeng20 Posted November 15, 2019 Share Posted November 15, 2019 I cant upload the file since Im at work, but I downloaded your file and tested around. Correct me if I'm wrong, you wanna simply just store the distance between sphere and the discs somewhere. So here's my thought: Make your sphere a packedobject too, connect a sopsolver with the multisolver, and in sopsolver, you can actually use object mask in DOP import node. So in your DOP import node, use 0 as the object mask to get your discs, and copy a DOP import then use 1 as the object mask to get your sphere. Then under it just use a wrangle like: f@dist = distance(@P, point(1,"P",0)); Then you can see the distance attribute is stored in the discs object. If you wanna stored the distance in sphere, you need to create an array attribute, and append the array with the distance for each disc ptnum. Hope this can help you. Quote Link to comment Share on other sites More sharing options...
tanzola Posted November 16, 2019 Author Share Posted November 16, 2019 (edited) Hey Jie, Thank you for the response. Conceptually that all makes sense. I'm still pretty new to dops and I can't seem to get the dop import node working in the sop solver. If you find the time, would you mind elaborating on the setup required in order to have the dop import node work by changing the 0 to a 1 in the mask parameter? Merging the rbd objects before the multisolver seemed like an intuitive solution, but I can't seem to get that working. Thanks again!! Edited November 18, 2019 by tanzola Quote Link to comment Share on other sites More sharing options...
tanzola Posted November 18, 2019 Author Share Posted November 18, 2019 (edited) Got it working for the most part.. Here's what I came up with: sample_03.hipnc The sop solver references the rbd_spheres object. If anyone knows of a better flow, please let me know! Edited November 18, 2019 by tanzola Quote Link to comment Share on other sites More sharing options...
rayman Posted November 18, 2019 Share Posted November 18, 2019 Check this: sample_03_simple.hipnc First of all - before making a rbd sim make sure that all of your objects have proper names. I know you don't use constraints, but lets keep it consistent! No need for a sop solver, use Geometry wrangle - much faster and cleaner. Also it is a good practice to update the velocity when moving the position. Oh, and make the caps regular Static Object - you are gonna manipulate them manually inside the DOPS. 1 Quote Link to comment Share on other sites More sharing options...
tanzola Posted November 19, 2019 Author Share Posted November 19, 2019 Hey Pavel, Thanks so much for taking the time. This info will really help me a lot. I've never encountered the Empty Data and Enable Solver nodes before, but I think I understand. It seems like the Enable Solver tells Geometry Wrangles which objects to apply to by entering the names set by the Empty Data node.. And I'm not sure how the names will come into play, but hope to remember that tip when I get into constraints. Thanks a ton!! 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.