1

I'm extending Wavefront OBJ to use bones with it. Here's my example:

bn my_bone 0.0 0.0 0.0
wgh 1 1.0
wgh 2 1.0
wgh 3 1.0
wgh 4 1.0
wgh 5 1.0

bn my_bone2 1.0 0.0 0.0
prt my_bone
wgh 11 0.1
wgh 12 0.2
wgh 13 0.3

Here's the description:

Bones:

bn [bone name] [x] [y] [z]

Parents:

prt [parent name]

Weights:

wgh [vertex index] [weight]

What I want to ask is:

  1. Can my new commands cause any conflicts with the standard?
  2. I've tested my new OBJ files in Visual Studio's graphic editor, Mixed Reality Viewer and Blender, and they just ignored my commands. I wonder if there are any programs throwing errors when reading my new OBJ files. I want my new OBJ files operate as an ordinary OBJ files in other programs.
  3. What are the additional feature I have to consider to implement bones?
  4. It will be used for games using CUDA or Direct3D. I'm going to implement this by using matrix. Is there any more efficient way especially in GPU or Direct3D?

I know other formats like FBX, I just want to use bones with OBJ.

paxbun
  • 316
  • 1
  • 2
  • 9

1 Answers1

1
  1. As long as your line header is not part of the standard then it will be perfectly fine, but see 2).

  2. Most existing OBJ readers are designed to only parse standard headers (since the parser needs to know the line format and how to handle the resulting data), so you may have to roll out your own (not too difficult, lots of tutorials around).

  3. You need more than a single point to specify a bone. At the very least you also need its endpoint. If you are planning to do forward or inverse kinematics you additionally need to specify its local axes and rotation limits. Also a set of weights for skinning if you're not planning to generate these at runtime.

  4. Matrix representation is a widely used technique, because it involves simple linear algebra which can easily be vectorized and optimized; however certain applications may require more advanced techniques e.g. Dual Quaternions for visually more appealing skinning effects.

meowgoesthedog
  • 14,670
  • 4
  • 27
  • 40