CSQC OBJ reader/writer

Discuss anything not covered by any of the other categories.
Post Reply
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

CSQC OBJ reader/writer

Post by Chris »

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
Image

QTest Shambler
Image

Textured QTest Shambler
Image

Textured QTest Knight
Image
Last edited by Chris on Sat Aug 16, 2008 5:40 pm, edited 3 times in total.
Error
InsideQC Staff
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA
Contact:

Post by Error »

that's effin badass. I wanna see more of this!
MeTcHsteekle
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Post by MeTcHsteekle »

:shock: so its lika a models tester?

i wanna know wut else it does :D
bah
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Post by Chris »

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).
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Post by Chris »

updated:

added download for obj source and some test objs / textures / testmap.bsp
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

Awesome stuff mate! Was planning on attempting that myself, but you beat me to it, dangit! Anyhow, real cool!

I was wondering how you planned to do the particles for the stick physics, on a per-vertex basis or what?
I was once a Quake modder
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Post by Chris »

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.
Urre
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon
Contact:

Post by Urre »

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.
I was once a Quake modder
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

Hrm... Shared entity? :P
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Post by Chris »

It would of course be a shared entity. And not every vertex would be a valid particle, only the ones moving the mesh, so 1 for forearm, one for head, etc.
Post Reply