Blender 2.49b IQM export problem

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Post Reply
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Blender 2.49b IQM export problem

Post by goldenboy »

I'm trying to export a rigged/animated model (automatic gun turret) from Blender to IQM format, using the official exporter.

When I load the resulting IQM into Noesis, the animation is broken - the mesh deforms incorrectly. Just look at it in Noesis, and it'll become clear.

It animates correctly in Blender.

WTF am I doing wrong? Here's a zip with the .blend and the .iqm.

http://www.quaketastic.com/upload/files ... roblem.zip

No error messages during export.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Half-solved (using 2.56 exporter).

The IQM exporter silently fails when the scale values on the object / armature have a "-" in front of them. Bad behaviour since that produces no visible anomaly in Blender.

Still no skin on the exported model.

Exporting to md5mesh/anim and converting to IQM via Noesis works (with skin).
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Post by toneddu2000 »

I'm far from my pc so I can't view your file. I'll try with some random hints.


FOR SKIN:
Have you tried to export the model to .iqe instead to .iqm and to convert it after with the command line exporter shipped in th iqm.zip file? Iqe are ascii files so you can just modify the path of the skin and export to iqm to see if it was an incorrect path problem.

to export from blender to iqe just name the ouput file .iqe

PS:did you make it work iqm on quake(i presume darkplaces)? Can you show how to do that, because I'm driving mad for three months! :)
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Everything works now, including skin. I had to hack the exporter myself, after Salzman told me where to look. The official script is set to export a Q3A shader name, which is useless for me (and you probably too). Salzman said he might think of an option for this in the next devkit release. My version simply uses the assigned image.

The script is here (Blender 2.57):

http://www.quaketastic.com/upload/files ... rt_rmq.zip

Put this in scripts/addons and enable it in User preferences - it says "RMQ support" in the extended description to distinguish it.

While exporting make sure that:

1. The x/y/z scale fields of object/armature have no negative numbers.

2. A material and texture are assigned to the object (names don't matter), and your image file is assigned to the texture (Image.filepath) so the export script can find it.

3. Your armature and object are selected in Object mode.

4. Your textures might need to be power-of-two.

5. Insert the names of your actions (anims) in the order you want them in the model.

You don't have to be on the last animation frame or anything for the export. There is no need to hack .iqe files, just export to IQM. Check in Noesis.

Alternative way to IQM file:

a) export to .md5mesh/.md5anims in Blender.

b) hack the correct texture path into the .md5mesh.

c) Use Noesis to convert from .md5mesh to IQM, using the -loadanim switch of the latest version to insert the .md5anims.
PS:did you make it work iqm on quake(i presume darkplaces)?
mh is in the process of adding an IQM loader to the RMQ engine (RMQe). He said it was pretty simple, it's still being tested atm. My models load in Darkplaces, yes (simply use .iqm instead of .mdl in the QC).

RMQ is open source, so one of the next demos (or engine releases) should have it.
because I'm driving mad for three months!
Hehe. I think we started doing it last week. The exporter was a bitch, yes. There were also severe bugs in the last IQM devkit. Check for new versions... :roll:

http://www.youtube.com/watch?v=jEyqin4g5FA
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Post by toneddu2000 »

The official script is set to export a Q3A shader name, which is useless for me (and you probably too). Salzman said he might think of an option for this in the next devkit release. My version simply uses the assigned image.
Wow,thanks!I never understood Q3a Shader name. I saw on Salzman's site there's an update dated 24/5, maybe he uploaded these bugfixes too?
. The exporter was a bitch, yes. There were also severe bugs in the last IQM devkit. Check for new versions...
May I ask you how did you code the model animations in qc?
Did you use standard $frame syntax (like standard quake, to be clear) or did you use anim new standard syntax like SteelStorm, Xonotic or The hunted cronicles by Chris Page?
Because I tried to create (just for test) a new version of the quake ogre (with standard animations - $frame) and animations don't work (it stands when it should run, when it dies stand still, etc.)
Any suggestion?
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

toneddu2000 wrote:
The official script is set to export a Q3A shader name, which is useless for me (and you probably too). Salzman said he might think of an option for this in the next devkit release. My version simply uses the assigned image.
Wow,thanks!I never understood Q3a Shader name. I saw on Salzman's site there's an update dated 24/5, maybe he uploaded these bugfixes too?

The only bugfix in there is the bone parenting issue, I think.
May I ask you how did you code the model animations in qc?
Did you use standard $frame syntax (like standard quake, to be clear) or did you use anim new standard syntax like SteelStorm, Xonotic or The hunted cronicles by Chris Page?
The IQM loader in RMQe isn't complete yet, it's still being implemented/tested.

Pretty sure we want to use the standard QC syntax. I don't see anything wrong with that; an .iqm has the names and framecounts of the animations saved inside the model, just like .mdl.

So why'd you need anything special?

It's always possible that a better way of doing it crops up, of course. We'll see what we end up with.
Because I tried to create (just for test) a new version of the quake ogre (with standard animations - $frame) and animations don't work (it stands when it should run, when it dies stand still, etc.)
Any suggestion?
In Darkplaces? That might need a .framegroups file I think. Ask Lord Havoc.

Do your animations display correctly in Noesis?
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Wait, I'm actually not sure if the animation names etc. are saved in the .iqm.

We'll see.
toneddu2000
Posts: 1395
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Post by toneddu2000 »

If animations worked I would remain on the $frame side, but, because they seem to rebel to my will, I just asked if there was another chance to use different animation code! :)
The only thing that I could say is that, with csqc, iqm could use skeletal animations and have different kind of animations for body parts (ALMOST like md3,just better :) )
But, I will be completely statisfied if I could just use my iqm models in dp with right animations.
Well I'll try noesis
thanks for the hint
Wait, I'm actually not sure if the animation names etc. are saved in the .iqm
I'll check it tonight, I'll save in .iqe format and I'll read if ther's a trace of animations names
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

I can't say if there is a better way to animate them, since we'e still working on it and aren't finished with the process of integrating iqm models.

So I can't say just how we're going to do it yet. :wink:
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

The intention is to stick with the $frame stuff because it makes things so much easier for integrating with an existing codebase (both QC and engine side). The caveat is - of course - that frames in the IQM will have to match with frames in the original MDL if the IQM is replacing an original MDL. If it's a new model that's not replacing existing content you can do what you want, of course, but $frame will keep things consistent (and mean that QC folks don't have to remember if they're setting up frames for an IQM or an MDL). I like consistent (witness my rants about new text file formats that don't use COM_Parse...)

Bottom line - I honestly don't care if an alternative may be technically superior. If it can't be integrated easily into an existing codebase, it will die. If something is to stand even a halfway decent chance of ever becoming a new standard, it must be reasonably painless to implement. And that includes for the copy 'n' paste folks as well as for more serious implementers (in fact it's the copy 'n' paste folks who do most to make something a standard by facilitating fast and widespread uptake).

So that's the intention (and the thinking behind it). How it's going to work out in practice - we'll see. ;)
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

The latest IQM devkit has an exporter option to save the skin to a simple image.

RMQ's IQM implementation uses $frame. You can drop in an IQM with the same animations and framecount to replace any .mdl (will be loaded instead).

Some bugs were fixed in IQM lately, and the version number was bumped to version 2.

If someone wants to peek at the code, you should kindly ask mh, who I'm sure will help you. We're very liberal with handing out code.
Post Reply