I'm working on a MD5 (currently md5mesh only) implementation for spring.
I have some problems to figure out what is what in S3DModel (3DModel.h) and how the "UnitModel-interface" works. Mainly it is due the lag of comments/documentation (yeah again docs and I know less docs/comments = better programmer) for 3DModel.h and related files...
Due gits log jk wrote this. Jk could you please add more comments or explain me how I can implement my MD5 data structure to the abstract S3DModel?
S3DModel is the common base for 3DO and S3O models. There are no "3DOModel" or "S3OModel" structures because both formats are piece hierarchies (trees), instead the specialization is present in S3DOPiece and SS3OPiece which extend S3DModelPiece (hence the S3DModelPiece* rootobject). MD5 models, being flat lists of meshes that have no parent / child relationships, do not fit in that design so well, so you'll probably want to insert some higher layer of abstraction above it. (For my own implementation I didn't care to do that part.)
Well so we need a general abstraction level which could be used for flat based model formats like MD5 and for trees/hierarchies like 3DO, S3O... Or two abstraction levels....
I don't think we need a new abstraction, AFAIK md5 uses bones which are nothing else than pieces.
Hm, I don't understand the construction of "struct S3DModelPiece", atm.
My vector math is a bit rusty (basically general math, too ) and this also does not help. I need to relearn it anyway so I will do it next week at work .
Could someone give me a list of thinks which I need to know like: - Vector - Quaternions
S3DModelPiece doesn't do any math, it just contains the piece information (max/min dims, offset to parent piece, is empty piece) loaded from the file. The math is done in LocalModelPiece. It is a local instance of the ModelPiece and contains per unit information of the piece instance (position, rotation, hidden, LODs). Also it doesn't use Quaternions, it uses simple radians for the rotations.
S3DModelPiece doesn't do any math, it just contains the piece information (max/min dims, offset to parent piece, is empty piece) loaded from the file. The math is done in LocalModelPiece. It is a local instance of the ModelPiece and contains per unit information of the piece instance (position, rotation, hidden, LODs). Also it doesn't use Quaternions, it uses simple radians for the rotations.
I know that S3DModel(Piece) contains only informations and don't do any math. But I need math to turn md5 flat structure to a tree structure. MD5 uses quaternions.
I don't think we need a new abstraction, AFAIK md5 uses bones which are nothing else than pieces.
Joints actually, the bones are implicit. But each joint only knows its parent joint (not vice versa), so the transformations cannot be applied the same way as in 3DO/S3O.
jK wrote:
But animations need a new system and I don't think adding those is possible with cob. So someone has to code a lua animation system to replace cob.
Indeed, animation control is the big sticking point. Making a player for them isn't so difficult (mine is mostly done, IIRC I had only blending left to add), but feeding it commands from the simulation would take more effort.
Agon: it's in C++, with a small quaternion library (which I'll integrate into Spring if you plan on continuing your work).
... Agon: it's in C++, with a small quaternion library (which I'll integrate into Spring if you plan on continuing your work).
If you already started work on MD5 for spring in C++ I don't need to add another implementation. It would be more efficient to help you or continue your work. How much did you finished? Yes, I plan to continue the work, the library would help.
Indeed, animation control is the big sticking point. Making a player for them isn't so difficult (mine is mostly done, IIRC I had only blending left to add), but feeding it commands from the simulation would take more effort.
If I understand correctly, from what little I know a call lua_*-like hack from COB could work... e.g. call md5anim_do_stuff()
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum