Is there an SDK for the plugin side of this librarY? like all the commands i can use in maya with python, mel, etc?
i found some issues with the current plugin that make it unusable so im writing a production toolset, I fixed the object level transforms, created world constraints, integrated with voronoi shatter, and still need to handle dynamic switching from passive to active state.
also, is there a way to make a "sleeping" hardbody become active upon collision>? like an: "isColliding" flag for passive/active bodies - would be nice so that i can dynamically wake up pieces in a chain reaction type effect and at the same time turn off the constraints, im having to constrain my debris in world space since the maya plugin seems to be only written for world coordinates.
thanks.
hi. new user here with a Q
-
- Posts: 7
- Joined: Thu Oct 29, 2009 11:08 pm
Re: hi. new user here with a Q
anyone? id really like to get this figured out, unless there is a better way to activate rbs on collision.. or create a cluster of RBS that breaks up on impacts.
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: hi. new user here with a Q
Well all of the source code for the plugin (and Bullet) is available... see Extras > MayaPlugin under the source code; you should be able to find what you want from the plugin *Cmd and *Node sources.
The Bullet Physics engine itself offers what you are asking for (sleeping, compound rigid bodies) and a lot more, but unfortunately these features are not exposed by the Dynamica plugin... yet; you would need to address that at the C++ plugin level to expand/expose additional Bullet features to Maya. Volunteers are always welcomed.
The Bullet Physics engine itself offers what you are asking for (sleeping, compound rigid bodies) and a lot more, but unfortunately these features are not exposed by the Dynamica plugin... yet; you would need to address that at the C++ plugin level to expand/expose additional Bullet features to Maya. Volunteers are always welcomed.
-
- Posts: 7
- Joined: Thu Oct 29, 2009 11:08 pm
Re: hi. new user here with a Q
thanks for the reply! i was beginning to lose hope lol.RBD wrote:Well all of the source code for the plugin (and Bullet) is available... see Extras > MayaPlugin under the source code; you should be able to find what you want from the plugin *Cmd and *Node sources.
The Bullet Physics engine itself offers what you are asking for (sleeping, compound rigid bodies) and a lot more, but unfortunately these features are not exposed by the Dynamica plugin... yet; you would need to address that at the C++ plugin level to expand/expose additional Bullet features to Maya. Volunteers are always welcomed.
im cracking into the plugin code, i have some bugs to kill

speaking of bugs, im not sure if this is intentional, but it seems that the plugin resets all RB positions EXACTLY on the simulation start frame, while the desired behavior is to reset all rigid bodies when currentTime is <= rbSolver start time.
is there some kind of workflow im simply ignorant of here? currently im resetting RBs using some of my own python scrips, but i would imagine that if it was built into the plugin it would be more efficient... so is this a bug or feature?
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: hi. new user here with a Q
I don't know? I assume you're referring to this line in dSolverNode.cpp (dSolverNode::computeRigidBodies):stooch wrote:[...]it seems that the plugin resets all RB positions EXACTLY on the simulation start frame, while the desired behavior is to reset all rigid bodies when currentTime is <= rbSolver start time.[...]
Code: Select all
if(time == startTime) {
//first frame, init the simulation
-
- Posts: 7
- Joined: Thu Oct 29, 2009 11:08 pm
Re: hi. new user here with a Q
yeah thats exactly what im talking about, basically thats the behavior that i expect based on using all other solvers in maya
thanks for pointing out where i could find it, im still reading through the plugin code but ill definitelly share any findings as i work on integrating this into our pipeline.
thanks for pointing out where i could find it, im still reading through the plugin code but ill definitelly share any findings as i work on integrating this into our pipeline.
-
- Posts: 7
- Joined: Thu Oct 29, 2009 11:08 pm
Re: hi. new user here with a Q
ok so after more study, it appears that setting it to <= would be a bad idea since then the plugin will reinitialize the hard bodies every frame that is less than the plugin start time.
the better solution is to use this class:
MTime MAnimControl::animationStartTime
if: MTime MAnimControl::animationStartTime == current time, perform a hard body init.
that way hard bodies will initialize every time the playhead restarts OR hits the start frame setting on the dynamic solver.
but wont keep reinitializing the solver for 100 frames if your solver is set to start at frame 100.
are there any favorite compilers or IDEs that are being used for this project? id like to try my hand at compiling this..
also a little bit more comments on the code would be much appreciated, for example, id love to have an overview of what each module does, currently its taking alot of hunting on my end to piece all this together.
the better solution is to use this class:
MTime MAnimControl::animationStartTime
if: MTime MAnimControl::animationStartTime == current time, perform a hard body init.
that way hard bodies will initialize every time the playhead restarts OR hits the start frame setting on the dynamic solver.
but wont keep reinitializing the solver for 100 frames if your solver is set to start at frame 100.
are there any favorite compilers or IDEs that are being used for this project? id like to try my hand at compiling this..
also a little bit more comments on the code would be much appreciated, for example, id love to have an overview of what each module does, currently its taking alot of hunting on my end to piece all this together.
-
- Posts: 141
- Joined: Tue Sep 16, 2008 11:31 am
Re: hi. new user here with a Q
For Linux, just look at the makefile and ensure proper env. variable assignments.stooch wrote:[...]are there any favorite compilers or IDEs that are being used for this project? id like to try my hand at compiling this..
also a little bit more comments on the code would be much appreciated, for example, id love to have an overview of what each module does, currently its taking alot of hunting on my end to piece all this together.
For Windows, there is a Microsoft Visual Studio (2005 or later) solution file (BulletMayaPlugin.sln).
A bit of background, as I understand it: The plugin was written by Nicola Candussi under Disney; he applied some quick fixes and enhancements to it soon after they released it to open source late 2008. Disney released it to open source because they didn't have the resources to fully realize the project, hoping the open source community could pick it up and run with it. Last spring Herbert Law worked on trying to fix / add constraints support (I'm guessing just before leaving Sony for Palm). And now it appears Erwin (Bullet creator and lead) has assigned Roman Ponomarev (Sony, I think) to hopefully work on the plugin, but it seems he's been busy (for Bullet anyhow) working on the OpenCL branch.
So, right now, I don't think there is an expert resource available for the plugin (to add comments or offer guidance and such). I've been wanting to dive into the source myself... but... {insert any number of excuses here}. From the little I glanced at it seems there might be a thin "physics engine abstraction layer" in the plugin since it was originally meant to support multiple physics engines (but I'm not sure since I didn't really look into it).
Note that the source code for the Nima PhysX for Maya plugin is also available for reference. It could provide ideas (like perhaps to handle compounded physics shapes in Maya, or convex mesh reduction/simplification? edit: there's also Bullet Demo ConvexDecompositionDemo available).