Blender 2.5 Exporter [Official]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
GenesisRage
Halfling
Posts: 73
Joined: Sun Dec 14, 2008 4:25 am

Re: Blender 2.5 Exporter [Official]

Post by GenesisRage » Fri Apr 08, 2011 4:54 pm

i think having the ability to select multiple objects and set the settings would be a nice (compared to selecting each object individually.)
but i also think having a global default might help transitioning from 2.49 to 2.57, as 2.49 and the other unofficial 2.5x exporters rely on global settings.
it would be more work (not sure how much), but possibly a combination:
1) set global/default properties (similar to 2.49)
2) set group properties (as tp stated)
3) and set individual objects
0 x
IRC Nick: Jake-GR

grol
Gnoblar
Posts: 9
Joined: Wed Apr 07, 2010 9:27 am

Re: Blender 2.5 Exporter [Official]

Post by grol » Mon Apr 11, 2011 11:22 pm

Good news!

Still in 2.49 because of the exporter ...

Thanks!
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Tue Apr 12, 2011 4:32 pm

@GenesisRage: I'm not sure about group properties. That might be confusing though I can see how it can be useful. I think for starters I will implement individual properties first. Then look into how to introduce global/default properties. If it works out well, then we can figure out how to make group properties work without confusing everybody. :P But first thing first, we need to get the exporter to actually export something. :)
0 x

GenesisRage
Halfling
Posts: 73
Joined: Sun Dec 14, 2008 4:25 am

Re: Blender 2.5 Exporter [Official]

Post by GenesisRage » Tue Apr 12, 2011 8:36 pm

@lf3thn4d: sorry was not the most clear, what i meant about group, is not objects grouped, but a way to set the "individual properties" for all objects selected
but yes, something that actually exports should be higher on the to-do list hehe
0 x
IRC Nick: Jake-GR

vel42
Gnoblar
Posts: 1
Joined: Wed Apr 13, 2011 8:53 pm

Re: Blender 2.5 Exporter [Official]

Post by vel42 » Wed Apr 13, 2011 9:06 pm

@lf3thn4d: Thanks for your work on the exporter.

Since you are starting development on it, one thing to consider would be memory usage. When I tested the blender2ogre exporter with high vertex count models, ie from MakeHuman, it would fail while in the mindom XML parser with presumably an out of memory errors. Minidom seems to be prepackaged with the Blender distribution. I haven't dug deep into this problem and isn't sure if it's particular to blender2ogre's algorithms or mindom's. But googling on mindom does reveal some memory usage complaints. So it might be worthwhile to even port from the previous Blender 2.49 exporter's XML parser in lieu of using mindom.

And for the real reason I'm posting: when exporting skeleton animations could you export animation tracks only for those bones specified in the Action Editor. The previous 2.49 exporter's behavior is in-deterministic - probably from changes from rest bone transformation. This is important while mixing animations. Unintended bone tracks cause the skeleton to explode while in accumulation mix mode.
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Fri Apr 22, 2011 6:28 pm

@GenesisRage:
I'm not sure if that is a proper behavior but I'll probably have a button to allow propagating of the active object data over to the other selected objects.

@vel42:
Thanks for the head-up on minidom. I think I will most likely just simply print out the XML file directly without a DOM. I think DOM is overkill for XML export.

About the animation tracks, the previous version was designed to export the baked version of the track instead of fixed keyed track as defined in the skeleton animation key. The reason was that in certain occasion we want to make use of IK for certain animation. Such animation wouldn't fit well if we try to use the animation key directly. However I do agree that there needs to be more flexibility on the exporting of skeletal animations. We should be able to "cull" away bones that we do not want exported for example. Probably we also need more states to be set on individual bones to decide if they follow the exact animation key or baked with a fixed time step.
0 x

User avatar
Jason Rogers
Kobold
Posts: 32
Joined: Fri Apr 09, 2010 8:10 am

Re: Blender 2.5 Exporter [Official]

Post by Jason Rogers » Mon May 02, 2011 8:34 am

Wheeeeee! *Fires up Blender again*

Sorry. Excited. :oops:

I've been waiting for this lol :D

I've managed to get a couple of models exported using the other available options but had quite a few hiccup's along the way.. Just want something that's straight-forward :) (but then.. don't we all?)

on a side note.. can anyone point me in the right direction to write a "simple" (re-usable?) shader to get tangeant normal maps working..? (preferably for D3D)
..Yes i have searched (before i get a slap on the wrist) but everything i have found seems to be over-the-top for my needs (or is it always going to be like that?)
0 x
<MetalPig> a world without undo-redo is a world I dont want to live in.
<JayRogers> wish reality had an undo function.. the redo function seems to be working fine though, i can screw up as many times as i want.

zeromath
Gnoblar
Posts: 21
Joined: Mon Jul 05, 2010 5:19 pm

Re: Blender 2.5 Exporter [Official]

Post by zeromath » Sun May 08, 2011 10:39 am

any progress/update?
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Mon May 09, 2011 3:28 pm

Slight progress. I'm building up the base global settings and export UI. The new python API needs some time to get used to. Especially since they changed their API documentation system. Somehow I find it rather hard to find information on the new API. It's still not completely documented. *_*
0 x

User avatar
quiasmo
Kobold
Posts: 28
Joined: Thu Jun 03, 2010 6:59 pm

Re: Blender 2.5 Exporter [Official]

Post by quiasmo » Wed May 11, 2011 8:37 pm

Hey lf3thn4n,
I want to contribute to the exporter development.
PM me if you can use me in your dev. team.
Cheers.
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Thu May 12, 2011 1:23 am

Hey quiasmo,

That's great. Which part are you willing to work on? I'm planning to split up the exporter work into a few phases:
Mesh export
Skeletal export
Morph / Shape key export
Material export
- Rendering material
- Game material
- Custom material

Right now, I'm working on the base core setup to allow abstraction of these into their own components. I've just got the main settings UI 90% done. Once this is done, I'm going to construct the base classes for all the said parts and commit to the repository.

P.S.
Just to show that I've actually made progress, here's a screen shot of the main settings UI. I'm trying to retain as close to the look as the old UI where possible. ;)
Image
0 x

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Thu May 12, 2011 7:47 am

I think we should consider merging the projects -- seems insane to duplicate the effort.

Having the functionality to export dotScenes doesn't seem like something that hurts much -- I suppose it is easy to modularize out in any case, and left out from some release if not wanted. But probably is just a piece of code that can be there for those who use it, no? It's not like it would add any dependencies or such, .scene is just simple xml and the exporter needs to write xml in any case for meshes and skels too.

I suppose Brett made the current exporter in one file 'cause it makes it easy for end users to install. I don't know if there is a nice solution for that already in the Blender add-on system etc. Certainly it can be made a package like the 2.4 exporter is, it was always just a bit more cumbersome to install because of that.

So, would splitting the functionality of blender2ogre to separate modules, which also your GUI can then use, be a good idea? Both projects could focus on improving the same base lib for the export code, but have different ui configs if those are needed for single mesh vs. full scene export? Or perhaps unify the UI too, I think most people want the same things of it anyway.

Our team (here at Playsign, in collab with some others who also need this) could probably work towards this in coming weeks if we can roughly agree on a plan.
0 x
~Toni

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Thu May 12, 2011 4:16 pm

Yes, It does seems to be duplicated efforts. I wouldn't mind if the core part can be abstracted out. We can make it into modules that can be shared. My only concern is that it would be a problem if certain implementations ends up conflicting. An example would be the material export. My goal is to provide abstraction layer where export of material flows through 3 different paths. Looking at Blender2Ogre exporter, it's using it's own custom properties for exporting materials. This part will most likely not be sharable. Even then, who shall have ownership of the core module? Ogre3D?

What we can do is to ask Brett if he has any way to modularize the export code. If we can come up with a general agreeable guidelines and features for the core modules, and also figure out a way to share modules, we can definitely cut down efforts on this. Though I do have a feeling that it may not work out as well as it sounds. Especially when it comes to making the exporter a clean easy install and update. If we have to share core modules, that would mean breaking API changes would be a problem. Plus users will have to download and install the core modules and their exporter of choice.

About the scene export, I have mixed feeling on this. Mainly because not all ogre users use the dotscene format. I for one do not use the dotscene format in my company projects. We're using our own custom scene format specialized for our own level editor. Hence I personally feel the two should not belong together. But heck, who knows better than the users? :-)

I don't think unifying UI would work out though. My concept of the UI part is largely thought out on a per-mesh basis and reusing of blender's build in properties as much as possible. From what I understand, Brett's work is more of a complete scene + mesh export system. I'm not trying to scrutinize his work here (infact I think he's doing a good job for building a complete dotscene oriented exporter), but there are many parts of his design that would not fit what I feel should be a lean and mean mesh exporter that does actual mesh export. In that sense, I believe this is a conflict in the direction of what I intended the ogre mesh exporter to be.
0 x

User avatar
Shockeye
Gremlin
Posts: 154
Joined: Mon Nov 24, 2008 10:34 am
Location: 'Straya

Re: Blender 2.5 Exporter [Official]

Post by Shockeye » Sun May 15, 2011 2:49 am

Speaking purely out of ignorance of Python & Blender's use of it, could you guys work out some plugable framework which allows different scene exporters to be used togther with the one mesh exporter, and a standard UI? Not everyone uses dotScene, but even those don't might want to create an export for their own format. If there was a standard interface, they wouldn't have to code the UI side of things (unless they required some special data input, but maybe there could be a way to add these on a per plugin basis to the interface)
So you'd have one UI/dialog for exporting an individual mesh, one for scenes, one backend for exporting the mesh, and one or more scene exporters(dotScene by default, plus any user created ones) which would call the mesh exporter multiple times for the whole scene.
Sorry if I'm talking crazy talk. It would be relatively easy to do in C++, but I don't know what Python offers in language features for making plugins & interfaces ...

(Me, I just want the mesh exporter!)
0 x

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Sun May 15, 2011 8:44 am

It would certainly be possible. Python basically provides everything, with regards to structuring code, than C++ (and more). It has functions, classes, maps etc. It being dynamically typed means that everything is always implicitly an interface, so for example if a GUI is made for some scene exporter, someone can actually always replace the underlying exporter just by implementing the same interface.

Whether it's a good idea in this case requires some thinking.

I don't actually see single mesh exporting and scene exporting hugely different UI-wise .. blender2ogre works so that if you want to export a single mesh, just select one mesh and press export. If you want to export many, select many, or the full scene.

But then again I haven't implemented either of these two UIs, so am not the right person to talk about it really.

Thanks for the idea, to me it seems initially a good one - let's hear what others think.
0 x
~Toni

jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm

Re: Blender 2.5 Exporter [Official]

Post by jonim8or » Mon May 16, 2011 1:23 pm

I guess there's a one way dependency here: scene exporter requires mesh exporter.

So the mesh exporter could have a function export(meshname, settings) which could be called both from the GUI (when exporting a single mesh) , or from a scene exporter (when exporting a dotscene file).
The settings variable could be a dictionary containing all the settings from the gui.
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Blender 2.5 Exporter [Official]

Post by jacmoe » Mon May 16, 2011 2:14 pm

Am I missing something?
The scene exporter for Blender (in ogreaddons) has always been separate from the meshes exporter..
It never needed any cooperation - however it does need to be updated for 2.5.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d » Mon May 16, 2011 6:19 pm

Hmmm.. I'm afraid I have to agree with jacmoe on this one.

I've thought it through a bit, even though it seemed duplicated efforts, one issue I still do not like is the idea of having a shared module which would require users to install two script plugins. This feels like the shared GTK for windows libraries that is never really shared by all GTK based apps due to API and distribution issues. I think the best workaround is to keep them separate with the support for other scripts to call a special export mesh operator as mentioned by jonim8or. It is my aim to focus on mesh export and make it a good and commercial grade exporter for the Ogre3D users. What one does with dotscene format is none of my concern at the moment. Having it as part of the mesh exporter is definitely out of the question imho.
0 x

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Mon May 16, 2011 9:27 pm

Well wasn't the whole point to separate scene and mesh importing? So there doesn't need to be many mesh exporters. So it seems that we agree.

I guess the question is whether the current exporter is a good starting point, and if you'd like us to help with getting it out from the code that also has dotscene etc. things.
0 x
~Toni

GenesisRage
Halfling
Posts: 73
Joined: Sun Dec 14, 2008 4:25 am

Re: Blender 2.5 Exporter [Official]

Post by GenesisRage » Tue May 17, 2011 1:34 am

think the point that lf3thn4d is trying to make, he is building a .mesh exporter and not even dealing with .scene
so if we want it, will likely need to be made by a 3rd party

and am the only one that gets giddy with excitement when i see a new post for this thread?
0 x
IRC Nick: Jake-GR

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Tue May 17, 2011 1:53 am

Well, both mesh exporting and dotscene exporting for 2.5 is already made in blender2ogre.

I understood that he wants a mesh exporter only, without scene things, and a gui focused solely on that. Which is reasonable. So am just thinking if we should use the existing exporter as the basis for that.
0 x
~Toni

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Blender 2.5 Exporter [Official]

Post by jacmoe » Fri May 20, 2011 1:34 pm

Dude: this is the original - one and only - Ogre Blender exporter.
And it has always been solely focused on mesh export.
And that's definitely the way it's going to stay.

And - furthermore - the Blender scene exporter (not this one) has been in ogreaddons for years - and has been used by a lot of people.
As a natural companion to this (meshes exporter).

It's not anyone's fault that the new 'kid on the block' got the so-called bright idea to put everything into one big script..

Why anyone would want to base anything on that is beyond me. :)

It would be a good idea if *someone* created a generic scene exporter plugin for Blender, based on that and the old one in ogreaddons SVN.
It won't go into the meshes exporter, of course.
But it would be a very useful addition to our Blender using people.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Fri May 20, 2011 7:01 pm

Huh? AFAIK this thread is about a new 2.5 exporter, which doesn't exist yet. Apart from the GUI part which got recently written.

Blender 2.5 is a rewrite which changed much of the py api, the gui / tool system is new etc. Mesh API more similar though, but AFAIK all exporters are basically rewritten.

Current Blender 2.5 Ogre exporter (blender2ogre) wasn't about combining old codes for fun, it was made because people needed a 2.5 exporter.

edit: and no I don't mean to say anything about how this should be made, was just asking some questions and thinking about how it would be good. seems certainly clear enough, am sure will be nicely done no matter how ends up. which kind of codes and libraries etc. are best to use it, and what the current ones do, haven't even checked, have mostly just used these relatively happily. also as libs btw too, the old mesh export in some custom server side mesh generation services. i'm sure the new stuff will allow all that and more nicely too.
0 x
~Toni

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: Blender 2.5 Exporter [Official]

Post by jacmoe » Fri May 20, 2011 7:52 pm

You are missing one important thing: it's part of the official Ogre code base.
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

antont
Gnoblar
Posts: 22
Joined: Fri Mar 11, 2005 8:12 am
Location: Oulu, Finland
Contact:

Re: Blender 2.5 Exporter [Official]

Post by antont » Fri May 20, 2011 8:05 pm

I don't see how that matters, I think it just about the code.
0 x
~Toni

Post Reply