Been whipping together an obj loader in csqc, possibly with some stickphysics get "ragdolls" beyond segmented stuff or other things that involve morphing a model. But mainly just done for fun.
Download: http://gameconsortium.com/files/CSQCobjLoader.zip
Some pictures (not using textures yet):
Column
QTest Shambler
Textured QTest Shambler
Textured QTest Knight
CSQC OBJ reader/writer
CSQC OBJ reader/writer
Last edited by Chris on Sat Aug 16, 2008 5:40 pm, edited 3 times in total.
-
- Posts: 399
- Joined: Thu May 15, 2008 10:46 pm
- Location: its a secret
I'll be supporting the vert groups obj has, and from there it'll allow indexing specific parts of items for morphing. the 3d rotation of all verts might get a little tricky but at a minimum do simple morphs on the body, or write it into some sagdoll-esque pseudo constraint system except not having it need to be segmented.
Don't know right now, didn't do it for any immediate practical purpose.
At a minimum it'll allow people from all different model editors to quickly see how their model looks ingame textured without converting to one of the quake formats.
(However it does not store smoothing groups / vert normals, like md5).
Also for the most part its lower poly models simply because to store the obj from a file either requires parsing a few relatively lengthy strings (slow and so terribly ugly) or an extremely large amount of globals (which is whats happening now). And since I'm using fte fast arrays it has to be field array floats, since field array vectors (as useful and better a solution as they are) are not accessible.
I'll clean up the code in the next couple days and release it implemented into some scratch DP project and also as a standalone qc file for people to give a whirl (granted anyone cares to use it).
Don't know right now, didn't do it for any immediate practical purpose.
At a minimum it'll allow people from all different model editors to quickly see how their model looks ingame textured without converting to one of the quake formats.
(However it does not store smoothing groups / vert normals, like md5).
Also for the most part its lower poly models simply because to store the obj from a file either requires parsing a few relatively lengthy strings (slow and so terribly ugly) or an extremely large amount of globals (which is whats happening now). And since I'm using fte fast arrays it has to be field array floats, since field array vectors (as useful and better a solution as they are) are not accessible.
I'll clean up the code in the next couple days and release it implemented into some scratch DP project and also as a standalone qc file for people to give a whirl (granted anyone cares to use it).
My plan was since obj's support face groups to have predefined group names for constraints of a normal bi pedal body like "left_leg", "right_leg", etc.
Then from there have it update the origin to the offset of the particle and do some 3d rotation math so all verts move there. Of course this infers coding true ragdoll bodies to begin with which to be honest doesn't sound extremly appealing. Rather do simple constraints or some cheap sagdoll like effect.
What I'd like to use it for the most though would be some facial customization things like oblivion style RPG face creation allowing extending cheek bones, nose sizes, brow, etc.
That is relatively simple and doesn't rely on an extremly high poly model or one that reacts to already computational heavy physics in qc.
Which most likely will be my little attempt next.
I wish someone would show some interest and possibly try to implement some use of it or with the other shared entities thing for csqc, but no one has stepped up and found any will to do it so other than that I have no interest in continuing it.
Then from there have it update the origin to the offset of the particle and do some 3d rotation math so all verts move there. Of course this infers coding true ragdoll bodies to begin with which to be honest doesn't sound extremly appealing. Rather do simple constraints or some cheap sagdoll like effect.
What I'd like to use it for the most though would be some facial customization things like oblivion style RPG face creation allowing extending cheek bones, nose sizes, brow, etc.
That is relatively simple and doesn't rely on an extremly high poly model or one that reacts to already computational heavy physics in qc.
Which most likely will be my little attempt next.
I wish someone would show some interest and possibly try to implement some use of it or with the other shared entities thing for csqc, but no one has stepped up and found any will to do it so other than that I have no interest in continuing it.
I was wondering if you'd do it on a per-vertex basis because it might be too heavy for poor ol' QC.
How would you align the model to the particles? I wasn't sure what you meant, but it seemed to me like you would align the particles to the model, which doesn't entirely make sense to me seeing as you need to apply physics on the particles.
Going a bit offtopic here, but like I mentioned to you before in a chat, I'm very interested in hearing about your escapades with stick-physics, as my attempt to align models properly to the particles kind of failed.
How would you align the model to the particles? I wasn't sure what you meant, but it seemed to me like you would align the particles to the model, which doesn't entirely make sense to me seeing as you need to apply physics on the particles.
Going a bit offtopic here, but like I mentioned to you before in a chat, I'm very interested in hearing about your escapades with stick-physics, as my attempt to align models properly to the particles kind of failed.
I was once a Quake modder