PDA

View Full Version : P3D



phibermon
09-04-2010, 07:10 PM
Hi guys, just a quick update, I posted a while ago about the VFA window manager (which still needs work) and stated I was working on a 3D engine.

well I've been busy writing various parts I want in my engine, however certain things I've deemed more generic and useful to the community so I've been writing them as stand alone libraries that can be used without dependancies on the rest of the engine.

Specifically I've been working on model loading, bone animation and the such. I started out looking to extend glmodel, decided it needed a re-design to fit in my head better, then discovered george moshkins TDG (triple dash garlic engine), specifically the blender export code and his earlier attempts at hardware skinning (morphing mesh to current pose using vertex shaders, very fast).

Anyway, after learning the ropes I designed and have nearly finished a cross platform, compact solution to getting models into your games.

I discovered a GLSL testbed application called lumina in my travels that just happened to have an excellent blender export script that already optimized models for storage in a VBO. After some modification and some minor fixes, I can now export from blender either static models or rigged models with multiple actions. (and load them into the engine of course)

I read a white paper on double quaternions, this is a relativly new technique of handling rotations that provides a much more pleasing deformation of meshes (especially when twisting) by utilizing a second quaternion as the imaginary part in a higher order calculation, the dude that thought of it is a genius and I have a working implementation ready for you guys as well as it being switchable between regular quaternion rotation and more old school matrix based skinning.

things left to do :

Software skinning - I wanted to add it for completness even thou I'll probably not use it

Interpolation between keyframes - trivial

morphing between animations - quite simple, run the animations together, slowly lerp between their respective frames, scaling the delta(time) inversely. (eg, a walk cycle of 2 seconds, morphing into a run cycle of 1 second.... half way thru the lerp, both animations are 1.5 seconds long, this is how it's done according to an old john carmack interview I read)

targeting different animations to different parts of the armature(skeleton) - probably has some fancy name, but imagine using the legs from a running animation and the arms from a 'shooting gun' animation, you get me)

----


so yes, nearly complete, I won't be supporting anything other than the format that's exported from blender in the script because what's the point? just open it in blender and export, every common model format sucks for animation except for things like milkshape, md3/md4 etc and they cost money to use, blender is free)

if anyone wants more info then please post aaand


if anyone has similar goals in 3d at the moment and would like to work with me on a project please get in touch, we have a whole community here that could produce some amazing stuff if we worked together....

phibermon
09-04-2010, 07:16 PM
oh and just to note, I'm not trying to re-write the wheel, glmodel, glscene and various other engines have offered animation and such before, but they always need the rest of the engine or have a slow implementation.

I'm writing this to be stand alone and to use all the latest techniques I could learn, in my personal opinion it's currently the cleanest and powerful model library written for OP and certainly the only one that supports dual quaternions.

but then I'm vain so don't listen to me ;)

Brainer
09-04-2010, 07:26 PM
What API do you use? OpenGL or DirectX? If you use OpenGL, does the engine support the latest versions of the API?

chronozphere
09-04-2010, 07:29 PM
This is very interesting. I dont understand the dual quaternions yet (Hell, I still have to study quaternions themselves), but that's probably something I have to see for myself.

I'd like to have a look at the source. Are you going to release it soon? ::)

phibermon
09-04-2010, 07:30 PM
I'm currently using OpenGL and I'm fairly sure that it uses the latest techniques from opengl 3.x, the shaders use attrib arrays for things like position, normals/tangents, there's probably some initilization stuff that's legacy, if you have experience writing pure opengl 3 stuff then I welcome any contributions you may have, we all lack a robust model/animation system for our projects, I'd really like this to be as well written as possible for everyone if you can help.

phibermon
09-04-2010, 07:33 PM
I'm happy to share the code over msn (phibermon at hotmail.com) with anyone that wants to contribute or wants to have a play, I'm sure anyone that's looked into skinning in object pascal agrees that we could all do with a simple stand alone solution.

phibermon
09-04-2010, 07:44 PM
(sorry for the multiple posts)

I'll have a site set up soon and I'll be sharing anything I think is useful including the VFA window manager too but for now I'm just sharing over msn/mail with those that have an interest, I need input from other programmers before I release to ensure that the design is elegant and useful.