http://www.codesuppository.blogspot.com/
Scroll down about 1/5 the way to where he talks about "Approximate Convex Decomposition". I'm curious if anyone has written a plug-in for Max/Maya that uses this specific code. I made a post not to long ago asking about a plug-in that'll take a mesh and convert it to a bunch of convex shapes. His code base does this, it just needs implementation.
Replies
probably not as good as the one you mentioned, as it says its still experimental, but maybe it helps to play around.
but thanks for your link anyway, cool stuff over there
edit: btw he wrote "My next little project is going to be to put the ConvexDecomposition library into a 3D Studio Max plug-in. As I become more comfortable programming in the Max SDK I hope to add more seamless support between CreateDynamics + PhysXViewer + NxuStream + COLLADA + 3D Studio Max."
so maybe we just wait for that
I am only just now learning how to program 3ds max plug-ins so I have kind of a steep learning curve to get over.
I will try to add at least a basic user interface and update it early this week.
I'm looking forward to testing and feedback. The tool works pretty well. It has been integrated into the latest Unreal editor and the feedback I have received from the artists is that they are very thrilled with the results.
Thanks,
John
You can find the plug-in (with source code) on my coding website. Please read the post that goes with it. It explains what more needs to be done to the plug-in to be really useful as a production tool.
http://codesuppository.blogspot.com/
btw, just a hint from an unexperienced maxsdk ui coder, it's much easier and faster to do the ui work in maxscript, and control the plugin via functionpublishing.
I'll try to compile for max5 and 6 (6compiled should work for all) tomorrow.
Thanks again!
CrazyButcher: You're doing 5 and 6... would it be much to ask to throw 7 in there as well? I know nothing about programming/max script and all that whiz-bang magic.
http://crazybutcher.cottages.polycount.com/wip/meshfw_plugins.zip
by the way John, you delete the source object, is that wanted ?
I changed it from _6up to see if it was a name error. I'm not familiar with Max errors, plug-in creation, or the like so any insight CrazyButcher would be great.
Thanks again John!
is msvcr71.dll in your max or system directory ?
The revised file is on my site at the previous link:
http://www.codesuppository.blogspot.com
It also shows a 'busy cursor' while it is working and color codes the results.
I *tried* to get it to put all of the output into a single group but, for some reason unknown to me, it didn't work. If anyone can explain what I did wrong I would appreciate it.
Let me know if it runs on Max6 and Max7. I would expect that it should.
The easiest way to test what the tool does is to simply make a torus and then try fitting against it with multiple recursion depths.
To clarify the purpose of this tool, it is to produce efficient and accurate physics collision models from an arbitrary input mesh.
Physics engines operate generally on collections of boxes, spheres, capsules, and convex hulls. Right now this tool just builds convex hulls. The hulls are put together into a single collision representation called a 'compound shape'.
One of the things I hope to work on soon is auto-generated pre-fracture so that getting a version of an object, like a chair or table, that can be broken into many pieces is a one-click operation.
I appreciate any input from plug-in gurus.
Finally, one comment I recieved (either in this thread or by email) was that I should do my UI in max-script. That would probably be an option if I knew how to program maxscript. However, I already know how to do dialog box programming and that is easy for me. Also, I really don't like having to install scripts in addition to a DLL. Simply installing a DLL only seems a lot cleaner.
Thanks,
John
Set concavityThreshold to 0 and set the merge threshold much lower, say 5%. Then bring it back up again as you iterate on the object.
The best recursion depth setting is about 7. Unless you want something really crude keep it at last at 4. To go above 7 is pushing thing a bit.
I'll try to fix the phantom node glitch.