Bill Currie
3e74aa5303
Add trace-qf-bad.c to Makefile.am and testclip.c.
2011-09-27 17:09:04 +09:00
Bill Currie
e23ee07b6f
Ensure id's trace is properly initialized.
2011-09-27 15:38:28 +09:00
Bill Currie
32ff639bf3
Add an old qf version of trace.c
...
This version is broken (it's the one "fixed" by commit 981622f9
), but it
does behave correctly for hipnotic's bobbing water. The question is, why?
2011-09-27 13:00:19 +09:00
Bill Currie
9daa0b7bde
Rename the empty and solid flags, and use them correctly.
...
seen_empty and seen_solid much better reflect their meanings, and also use
them correctly (eg, visiting an empty node does not clear seen_solid).
Hipnotic's bobbing water is still broken, though.
2011-09-27 12:33:50 +09:00
Bill Currie
a7482570b6
Document the geometry in the tests.
2011-09-27 12:30:21 +09:00
Bill Currie
aa6b7ef7e8
Add some water based tests.
...
Unfortunatly, they haven't uncovered the bug.
2011-09-26 21:02:54 +09:00
Bill Currie
800e8cb3da
Make the id trace code more readily usable in the engine.
2011-09-26 19:56:00 +09:00
Bill Currie
ae0dc6f06b
Disable the "shouldn't happen" code.
...
It causes the tests to fail, and doesn't affect the problem I'm currently
facing.
2011-09-26 19:56:00 +09:00
Bill Currie
baf9b7c181
Make the test nodes a little easier to read.
2011-09-26 19:56:00 +09:00
Bill Currie
683adf1850
Print the name and texture number for model skins.
...
Use SYS_GLT (1024) for gl texture debugging.
2011-09-26 13:03:53 +09:00
Bill Currie
521f482806
Fix an off-by-one error that caused uvs to wrap.
2011-09-25 20:52:28 +09:00
Bill Currie
1277c17cd9
Give the 24-8 bit converter a massive speedup.
...
The biggest part of the speedup is reading from blender's image only once
(it seems that every read does so from GL rather than memory: ouch). Also,
cache the results for each color.
2011-09-25 20:50:32 +09:00
Bill Currie
2e2484250c
Add some notes about modelgen's commands.
2011-09-24 21:31:02 +09:00
Bill Currie
50795b8239
Calculate the model "size".
...
The size is actually the average area in quake units of the mesh's
triangles. Again, my results are slightly smaller (0.025).
With this, all calculable fields are set. Only eye position, flags and
synctype remain.
2011-09-24 13:18:23 +09:00
Bill Currie
07b5db64c6
Calculate the bounding radius.
...
The calculated radius is a smidge (0.05) smaller than the original
(invisibl.mdl), but I think that's due to the difference in source data: id
used the original models, I'm using their output.
2011-09-24 13:03:18 +09:00
Bill Currie
3b33d8dade
Make the basis shape key active on import.
...
Blender must have an active shape key before shape key animation will work.
This fixes the models being locked to the first frame until a shape key is
selected via the UI.
2011-09-24 11:43:06 +09:00
Bill Currie
bd840726c2
Fix the mangled faces.
...
I /did/ see the warning about vertex index 0 in the obj importer script,
but I didn't take it seriously enough. This fixes both the twisted texture
on a couple of faces, and the truly mangled tris when exporting (using
invisibl.mdl for testing).
2011-09-24 09:00:14 +09:00
Bill Currie
a1d9e752cd
Fix the messed up UVs.
...
I had forgotten to invert the t axis.
2011-09-23 19:58:26 +09:00
Bill Currie
a80eef8bc4
Get the exporter mostly working.
...
There seems to be some problems with the UVs, only one frame is exported,
and various model params don't get set (eye position, size, bounding
radius, synctype, flags), but the size and shape look right in qf :).
2011-09-23 19:01:31 +09:00
Bill Currie
8ccb07d959
Make the MDL classes a little more usable.
...
This really eased the writing of the exporter :)
2011-09-23 19:00:39 +09:00
Bill Currie
8bec9cb203
Clean up export_mdl() a little.
2011-09-23 13:00:46 +09:00
Bill Currie
4a3731652e
Fix the exported skin conversion.
...
I must remember to test language features in python 3 :P
2011-09-22 14:08:10 +09:00
Bill Currie
40f46f2ea3
Complete mdl writing.
...
Except for the normal index in the frame bounds (and potentially frame
names with junk after the terminating nul), the output is identical to the
input for:
mdl=MDL().read("invisibl.mdl")
mdl.write("test.mdl")
2011-09-22 11:44:08 +09:00
Bill Currie
e35dd29a2d
Don't use Vector in mdl.py
...
This will make testing of the MDL class a little easier (independent of
Blender).
2011-09-22 11:43:57 +09:00
Bill Currie
a58f9582b0
Try to write out the skin.
...
Something's not working as all I get is a black texture, but the basics
(MDL writing) seem to be ok.
2011-09-22 00:58:57 +09:00
Bill Currie
ba4ccaf816
Check that all faces are triangles.
2011-09-21 22:34:23 +09:00
Bill Currie
57aa19bd44
Rename qfmdl to io_mesh_qfmdl.
...
This fits in better with the blender addon naming scheme.
2011-09-21 20:18:23 +09:00
Bill Currie
c3b358f470
Clean up the intra-package import lines.
2011-09-21 19:17:16 +09:00
Bill Currie
84f65a0171
Get the "front end" working nicely.
...
Proper enable/disable of export, file filtering and no exceptions :)
2011-09-21 19:17:16 +09:00
Bill Currie
2ca39e7f75
Start working on the exporter.
2011-09-21 17:37:32 +09:00
Bill Currie
4b9a421928
Split out the MDL class.
...
I will need it for the exporter.
2011-09-21 12:34:09 +09:00
Bill Currie
af4a91accf
Do a tiny bit of cleanup.
2011-09-20 19:32:49 +09:00
Bill Currie
b00e865d4c
Make the importer work in both 2.58 and svn blender.
2011-09-20 18:58:45 +09:00
Bill Currie
67ba9129ed
Report bad mdl files.
2011-09-20 13:34:12 +09:00
Bill Currie
9a4e5aef53
Read strings as strings rather than bytes.
2011-09-20 13:33:41 +09:00
Bill Currie
a32e45d2d5
Refactor the import code.
...
This should make things a little more maintainable.
2011-09-20 12:44:37 +09:00
Bill Currie
d90fd4cee9
Fix a mistake found by a debug build of blender.
2011-09-18 18:49:16 +09:00
Bill Currie
c65522b5cf
Add key frames for all shape keys.
2011-09-18 15:37:17 +09:00
Bill Currie
94ac2fa675
Remove a debug print
2011-09-18 10:37:28 +09:00
Bill Currie
b57e098e93
Rewrite the frame group to action conversion.
...
Now it works :) Mostly :/ Need to figure out how to "finalize" the action.
Also, blender occasionally loses my skin texture :(
2011-09-18 09:58:59 +09:00
Bill Currie
dbb1df70b5
Fix frame merging for mdlv3 files.
...
v3 files have no name fields in the frames, so we need to store the
generated name.
2011-09-18 09:18:49 +09:00
Bill Currie
ad8afec84c
Merge multiple frames into a single frame group.
...
But only if they seem to be related (ie, the frame name is the same up to
the number). This will later become optional, but it allows me to test
some of the frame group code.
2011-09-17 23:41:35 +09:00
Bill Currie
dc76ad6556
Create actions for frames and frame groups.
...
Simple frames get a one key action, groups get an action with a key per
subframe.
2011-09-17 23:13:21 +09:00
Bill Currie
644f4db9d1
Add support for v3 (qtest) mdl files.
...
Finally, I can see the dragon in all its... glory?
2011-09-17 09:05:07 +09:00
Bill Currie
f7de55ed5e
Create a shape key for every frame and subframe.
...
Shammy has no frame groups :(. Need to find a model with groups.
2011-09-16 20:59:39 +09:00
Bill Currie
b0af18478b
Be a little more direct in object linking and materal adding.
2011-09-16 19:14:31 +09:00
Bill Currie
de24fa99a8
Break out the skin/material setup code.
2011-09-16 17:57:07 +09:00
Bill Currie
41213f2c30
Make the skin show in blender's 3d view.
...
Much thanks to ideasman_42 for showing me which code I needed to grok to
get it working.
2011-09-15 22:45:23 +09:00
Bill Currie
320f613263
Give the uvlayer texture a name.
2011-09-15 20:39:26 +09:00
Bill Currie
257fefca38
Link the first skin to the imported object.
...
The texture doesn't display properly in 3d space in texture mode yet.
2011-09-15 19:52:18 +09:00