Sizing shapes for rag dolls automatically?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
needshelprendering
Posts: 25
Joined: Mon Sep 17, 2012 1:17 am

Sizing shapes for rag dolls automatically?

Post by needshelprendering »

Hello Norbo,

I have built a small editor for my game so I can create rag dolls for each of my characters. I import the character who is fairly high in the poly count and I want to create a rag doll out of simple shapes like boxes, circles, and all the other shapes. Maybe even a simple hull. Is Bepu able to do this for me automatically?

Examples of what I would like are available in the game Natural Selection. I included a photo of what it looks like:
Image

Also I would like to serialize these and save them as individual files. I know this can be done but I am just wondering if it is wise to do?

Thank you Norbo.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Sizing shapes for rag dolls automatically?

Post by Norbo »

The engine doesn't provide any automatic decomposition. There's techniques like V-HACD which can do automatic convex decomposition of complex shapes, but ragdolls tend to require very controlled pieces for gameplay purposes (upper arm, lower arm, chest, head, and so on) so general purpose decomposition isn't guaranteed to produce the desired results.

I would recommend using the simplest manual representation which is acceptable to the design for performance reasons. So, if boxes and spheres could work, create some metadata describing the shapes and use it to create the primitives at runtime. If the detail of a convex hull is required, make the simplest possible mesh for each part and import them for use in ConvexHullShapes.
Post Reply