Preview of the next Blender exporter

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Preview of the next Blender exporter

Post by reimpell »

Good news, everyone!
Instead of having to install a single Python file, you will soon have to deal with several files, that also need more space on your hard disk. Furthermore, I probably added tons of new and old bugs to the exporter. In other words: The preview-exporter contains all basic features now, most notably shape and armature animation export. :D

Image

Download: :arrow: preview-latest.tar.gz

Please test this exporter and report any problems here in the forum.

Some remarks on the current version:
  • Save before export, especially if you export several actions. Blender 2.42 seems to have a problem to restore to a given pose via Python.
  • All meshes are exported in the mesh object's coordinate system, the unnecessary additional export transformation is no longer available. Apply your object transformation before exporting, if necessary.
  • Keyframes are not yet optimized, so the resulting files tend to get large.
  • The exporter code is not yet optimized, so the export process may take a while.
  • All animations are sampled keyframe by keyframe. You don't need to bake any constraints.
Last edited by reimpell on Wed Sep 20, 2006 9:05 pm, edited 2 times in total.
Rackle
Gnome
Posts: 375
Joined: Sat Jul 16, 2005 1:42 am
Location: Montreal

Post by Rackle »

Some things are not said enough. So here: thank you for your continued work on this exporter.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

Many thanks for the kind words! Also many thanks to nfz, who did a fantastic job maintaining and implementing pose sampling for the old exporter!
RCRuiz
Kobold
Posts: 27
Joined: Mon Apr 11, 2005 1:11 am

Post by RCRuiz »

thanks for the script and sorry for repeat my requiest to you but tell me . . is there a way to include a second uvm info in there? I know that the oficial version of blender do not have multiple uvm but there I only need the format for the xml for a second uvm , I know pyton and the insides of blender so if I have to do a modification it will not be a big problem. . . I want this for light maps generated from blender

Un Saludo
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

RCRuiz wrote:I only need the format for the xml for a second uvm
Have a look at the correspondig dtd.
RCRuiz
Kobold
Posts: 27
Joined: Mon Apr 11, 2005 1:11 am

Post by RCRuiz »

That's it! Thanks a lot !

Un Saludo
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

I included a manual into the download. Also, the main script was renamed. Be sure to delete the old preview.py file in your Blender script directory if you install a newer version.
scardario
Kobold
Posts: 25
Joined: Sat May 13, 2006 1:28 am

Post by scardario »

thanks for the great job!
I have a 64 bit linux distro and the script runs fairly well altought it is not easy to configure in such a machine.
the only issues are the ones reimpell had metioned before regarding to the file size and the exporting time

thanks again, it's a really great tool for all the blenderheads working with Ogre
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

OK. This exporter is probably great. And probably the official one now?

I have a couple of questions, though:

What is the difference between this one and the other?

Are you the sole author of this exporter?
I am answering this because the Mesh and Armature Exporter is written by Jens Hoffmann, Michael Reimpell, Jeff Doyle, et al..

So, you didn't incorporate the changes/updates/improvements provided by nfz?

I am baffled, but grateful nonetheless. :wink:

<edit>
I am also wondering why the former official exporter isn't purged from the Wiki.
Makes no sense in having it there, because the CVS link points to the new exporter now.
</edit>
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
nfz
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 1263
Joined: Wed Sep 24, 2003 4:00 pm
Location: Halifax, Nova Scotia, Canada

Post by nfz »

jacmoe: reimpell's newest exporter is his own code and yes the wiki needs to be updated since the newest exporter is in cvs now.

The old exporter did not support Ogre pose and vertex animation and was extremely buggy in the skeletal animation export due to my adhoc additions.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I am baffled no more. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

jacmoe wrote:OK. This exporter is probably great. And probably the official one now?
Yes, it is the basis of all feature enhancements.
jacmoe wrote:What is the difference between this one and the other?
The old exporter code was a script that evolved over the years. Therefore, its design had several limitations. I decided to do a complete rewrite, and I think the design and code quality is greatly enhanced now. From the users perspective, the new exporter allows you to additionally export pose and morph animations.
jacmoe wrote:Are you the sole author of this exporter?
Yes, but it's released under the same open source license as OGRE itself. So everyone is invited to improve it! For example, the exporter could use a variable knot piecewise Catmull-Rom spline fitting algorithm to optimize the animation sampling keyframes.
jacmoe wrote:So, you didn't incorporate the changes/updates/improvements provided by nfz?
Are you missing a particular feature?
jacmoe wrote:I am also wondering why the former official exporter isn't purged from the Wiki.
It is still part of OGRE 1.2.x.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Thank you for the clarifications/explanations, reimpell! :)

I am truly grateful for your splendid work. Kudos for making sure that Ogre has excellent Blender support. 8)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Three chears to Reimpell and everyone else who has helped out with the script over the years :D .
Stach
Gnoblar
Posts: 5
Joined: Thu Jun 09, 2005 12:17 am
Location: Belfort (France)
Contact:

Post by Stach »

reimpell wrote:All meshes are exported in the mesh object's coordinate system, the unnecessary additional export transformation is no longer available. Apply your object transformation before exporting, if necessary.
I'm wondering why did you remove RotX.

It was really useful : OGRE and Blender y and z axes are inverted, and rotate meshes using the exporter was a good way to avoid a pitch(Degree(-90)) in code.

And rotating a mesh animated with skeleton is really tricky in Blender : Ctrl-A messes up everything.

Well, I'm grumbling :) You're work is great, also.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

Stach wrote:I'm wondering why did you remove RotX.
It caused a lot of unnecessary confusion for people trying to export scenes.
Stach wrote:It was really useful : OGRE and Blender y and z axes are inverted, and rotate meshes using the exporter was a good way to avoid a pitch(Degree(-90)) in code.
The best way to avoid any additional rotation is still to align in Blender whatever axis is parallel to your up-vector of your object coordinate system (F7, Draw Extra, Axis) to whatever axis is parallel to Blender's up-vector before starting to model your mesh. This way, Blender's notion of front, top, and side view still applies.
Stach
Gnoblar
Posts: 5
Joined: Thu Jun 09, 2005 12:17 am
Location: Belfort (France)
Contact:

Post by Stach »

Ok, i see.
It seems that Ctrl-A is no longer necessary to apply transformations on object, they are taken in charge directly.

Thanks for your answer !
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

Post by nikki »

Thanks for the work on the exporter, reimpell. I just love blender. I used to use 3ds max before, but now I use blender because it simply works better and faster.

And, python is the best (second only to C++)! :)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

nikki wrote:Thanks for the work on the exporter, reimpell.
I second that! :)
nikki wrote:I just love blender. I used to use 3ds max before, but now I use blender because it simply works better and faster.
I agree totally! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
boost
Greenskin
Posts: 112
Joined: Mon Jan 09, 2006 11:49 pm
Location: Barcelona; New Earth; Degova System

Post by boost »

Hi,

I dunno what I am missing but I can't get OgreXMLConverter to be executed. It's path has been added to system PATH variable (checked opening a dos box) and I have choosen Auto in the exporter preferences (and checked XMLConverter button of course). The Manual setting didn't worked, I get a line in log saying the converter is being executed but it doesn't occurs. BTW the old exporter doesn't call it either, having updated the path in the source code of the script.

Another thing I would like to ask, is if I'm right expecting to get two textures copyed when the Copy Textures option is selected, and the mesh material' has two textures assigned... currently only the second texture is copyed.

Thanks :)
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

boost wrote:It's path has been added to system PATH variable (checked opening a dos box) and I have choosen Auto in the exporter preferences (and checked XMLConverter button of course).
Many thanks for the trouble report! I haven't tested this on Windows, maybe I need to add the ".exe" extension to the call.
boost wrote:The Manual setting didn't worked, I get a line in log saying the converter is being executed but it doesn't occurs.
Do you call it with or without ".exe" extension?
boost wrote:Another thing I would like to ask, is if I'm right expecting to get two textures copyed when the Copy Textures option is selected
The script tries to copy every texture mentioned in the exported .material file. However, Blender's way of storing the external texture location is, at least in my opinion, suboptimal and the exporter fails unpredictable. If it fails, you should get a warning in the export log.

I will test all operating system dependent code on Windows next week and post an update on these issues.
User avatar
boost
Greenskin
Posts: 112
Joined: Mon Jan 09, 2006 11:49 pm
Location: Barcelona; New Earth; Degova System

Post by boost »

thanks for your fast reply :)

I call the converter including the .exe extension.

About the texture copying issue, after looking at the .material file I realised the exporter didn't include the second texture in the file, I guess that's why it doesn't gets copyed.

Both textures have 'map to' set to UV, dunno if this may be a problem.

Just in case it may help the blender file can be found here.
reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Post by reimpell »

boost wrote:Both textures have 'map to' set to UV, dunno if this may be a problem.
Many thanks for the file. I'll add support for multiple image textures per material as soon as possible. Please edit your material file by hand in the meanwhile.
User avatar
boost
Greenskin
Posts: 112
Joined: Mon Jan 09, 2006 11:49 pm
Location: Barcelona; New Earth; Degova System

Post by boost »

ok, thanks a lot for your support Reimpell :)
Stach
Gnoblar
Posts: 5
Joined: Thu Jun 09, 2005 12:17 am
Location: Belfort (France)
Contact:

Post by Stach »

Hi again.

I got another issue : my model has a parent armature used for animation. The exporter seems to still use the old global system coordinates for the animation. For example, when I want my model to jump (bttom to top), it is going front and back...

My model and my armature local coordinates are oriented the same way, so it's not a synchrony problem.

Any idea ?
Post Reply