Blender 2.5 Exporter [Official]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d »

Hey guys, I've just managed to get my code committed into the trunk. I had some local mercurial repository problem which caused me to have to re-pull the ogre repository. It's placed in Tools\Blender2.5Export. To test it, you can place those files in blender's scripts directory like so: <path-to-scripts-dir>\addons_contrib\ogre_mesh_exporter\<put all source here>.

It's nothing but pure interface right now though. No export code yet. I'll be committing to the trunk on all my changes for now on. :-)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Blender 2.5 Exporter [Official]

Post by jacmoe »

Woo-hoo. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
merlinblack
Goblin
Posts: 224
Joined: Thu Mar 15, 2007 10:05 am
Location: Sydney, Australia
x 7

Re: Blender 2.5 Exporter [Official]

Post by merlinblack »

jacmoe wrote:Woo-hoo. :)
+1 to that! :D

One thing I thought would make the exporter even more versatile, is to keep the UI part and the actual exporting as separate as reasonable. That way people like myself who are writing "scene" exporters (mine use Lua files as a format) could call the 'backend' of the exporter to export meshes automagicaly.
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Image
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d »

Yes, that's actually essentially the idea. I will be making the mesh export part with it's own operator. So any other scripts can simply call the operator to execute which will export all selected meshes. :-)
User avatar
merlinblack
Goblin
Posts: 224
Joined: Thu Mar 15, 2007 10:05 am
Location: Sydney, Australia
x 7

Re: Blender 2.5 Exporter [Official]

Post by merlinblack »

lf3thn4d wrote:Yes, that's actually essentially the idea. I will be making the mesh export part with it's own operator. So any other scripts can simply call the operator to execute which will export all selected meshes. :-)
Awesome!
lf3thn4d wrote:To test it, you can place those files in blender's scripts directory like so: <path-to-scripts-dir>\addons_contrib\ogre_mesh_exporter\<put all source here>.
And don't forget to go into the user preferences and tick the box to enable it! :wink:



Just had a wee play, and have to say I like it (despite it not doing anything yet :P ). The per object overrides are obviously that, and the push pins make it obvious what is or isn't overridden too. The actual exporter panel is a little crowded unless you make it bigger when using the default blender window sizes however.

Blenders tool tips are going to make things easier aren't they!
"He'd never realized that, deep down inside, what he really wanted to do was make things go splat."
Terry Pratchett, Reaper Man
Image
User avatar
kromar
Gnoblar
Posts: 13
Joined: Tue Aug 23, 2011 12:52 pm
x 1

Re: Blender 2.5 Exporter [Official]

Post by kromar »

where can i find that script? i searched the whole repo but i can not find anny commit of that script:/
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Blender 2.5 Exporter [Official]

Post by jacmoe »

/* 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
x 12

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d »

merlinblack wrote: Just had a wee play, and have to say I like it (despite it not doing anything yet :P ). The per object overrides are obviously that, and the push pins make it obvious what is or isn't overridden too. The actual exporter panel is a little crowded unless you make it bigger when using the default blender window sizes however.

Blenders tool tips are going to make things easier aren't they!
Cool! Glad you liked the interface design. :-) Yes the main export panel is a little over crowded with default tool width. I personally wish we can have it in a custom space(blender's term for a window pane) by itself. Unfortunately that's not possible atm.

I've started working on basic mesh exporting. I'm also taking some time to plan ahead so that the animation export features will be much easier to implement. I actually have some new ideas on the mesh export part that will generate different mesh data compared to how it is done with the old exporter for blender 2.49. In short I'm working on a way to make shared vertex data as default. This should produce much more render state friendly meshes when artist builds meshes with many multimaterial parts. However when it comes to animations, we sometimes want to split them up to their own non shared version. I've came up with an idea of using the vertex grouping (+custom data to identify which vertex group) to auto split up independent submeshes with their own vertex data.

Here's a snip of what I've outlined on the exporter's mesh export comment (not commited yet. will be in when I get the base data struct with an initial static mesh export working):
# The exporter will try to share vertex data by default.
# Sharing of vertex data is important to keep render state update small.
# This means that even if we are using different material submeshes in a mesh,
# the mesh's vertex data only needs to be assigned to the GPU once as it's shared.
# However on some special occasions we would not want to share vertex data.
#
# In the case of animated meshes, we sometimes want to split the meshes
# depending on different animation type within a mesh.
#
# Imagine an animated character with skeletal and pose animation for facial expressions.
# To be optimal, the facial vertex pose animation should be keyed in it's own submesh
# so as to avoid updating a huge data set of vertex points in software mode.
# In hardware mode, this is also essential to split parts that has more complex vertex
# animations from the skeletal skinning only parts.
#
# In the case of a complex character with a lot of bones, hardware skinning may hit the
# limit of vertex shader registers for each bone matrix. To fix this, the mesh should be
# split into it's own individual submeshes in a way where the total number of bones
# affecting each submesh does not exceed the bone limit.
#
# In preparation of these cases, this exporter will take in to consideration of the
# vertex group settings. In the exporter settings, there will be a setting to specify
# the vertex groups that will be used to split meshes into it's own non shared vertex
# data sub meshes.
shenjoku
Gremlin
Posts: 193
Joined: Sat Aug 06, 2011 11:02 pm
x 6

Re: Blender 2.5 Exporter [Official]

Post by shenjoku »

How do you get this thing working? I've copied the files into the correct folder so it shows up on the add-ons screen but it won't let me check the box to enable it.
jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm
x 10

Re: Blender 2.5 Exporter [Official]

Post by jonim8or »

What does the console window say? 'cause if a plugin can't be enabled, that's often due to a bug somewhere.
User avatar
Shockeye
Gremlin
Posts: 154
Joined: Mon Nov 24, 2008 10:34 am
Location: 'Straya
x 1

Re: Blender 2.5 Exporter [Official]

Post by Shockeye »

I found this problem with Blender 2.59 but not 2.58a ( I have multiple installs of blender - I'm also still hanging onto 2.4x until this exporter is done :) )
I don't know yet whether this a version problem or maybe I did something different when installing the files. What version are you using?
shenjoku
Gremlin
Posts: 193
Joined: Sat Aug 06, 2011 11:02 pm
x 6

Re: Blender 2.5 Exporter [Official]

Post by shenjoku »

jonim8or wrote:What does the console window say? 'cause if a plugin can't be enabled, that's often due to a bug somewhere.
I can't even find the console window in 2.5 anymore since it doesn't open as a separate window anymore. How do you get to it?
Shockeye wrote:I found this problem with Blender 2.59 but not 2.58a ( I have multiple installs of blender - I'm also still hanging onto 2.4x until this exporter is done :) )
I don't know yet whether this a version problem or maybe I did something different when installing the files. What version are you using?
I'm using the latest 2.59 build.
jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm
x 10

Re: Blender 2.5 Exporter [Official]

Post by jonim8or »

in blender:
Help->toggle system console
Ologon
Halfling
Posts: 70
Joined: Sun Dec 02, 2007 11:10 am
Location: Italy
x 2

Re: Blender 2.5 Exporter [Official]

Post by Ologon »

Yay!! I was waiting for this exporter for a so long time :D
I tried the mesh + ogre scene one but I didn't really like it (Even if I do appreciate the effort from the developers), mainly because of the not so intuitive UI and some problems with exporting, which makes its usage not suitable for commercial applications.

I absolutely loved the blender 2.49 exporter (Still using 2.49 now) and I'll be using it till this new one is done.

Keep up the good work lf3thn4d! :D
shenjoku
Gremlin
Posts: 193
Joined: Sat Aug 06, 2011 11:02 pm
x 6

Re: Blender 2.5 Exporter [Official]

Post by shenjoku »

I can't figure out how to copy text from the console so here's a screenshot of the errors I'm getting. Ignore the last two location errors. Those are unrelated. This output happens when I try to check the checkbox to enable the plugin.
ConsoleErrors.png
You do not have the required permissions to view the files attached to this post.
jonim8or
Goblin
Posts: 287
Joined: Mon Dec 08, 2008 4:49 pm
x 10

Re: Blender 2.5 Exporter [Official]

Post by jonim8or »

copying text: right-click in terminal, select "Mark", select text, press enter.
But the image gives enough info for now.
shenjoku
Gremlin
Posts: 193
Joined: Sat Aug 06, 2011 11:02 pm
x 6

Re: Blender 2.5 Exporter [Official]

Post by shenjoku »

jonim8or wrote:copying text: right-click in terminal, select "Mark", select text, press enter.
But the image gives enough info for now.
That works for Windows consoles, but not Blender. It won't let me interact with the console at all.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: Blender 2.5 Exporter [Official]

Post by dark_sylinc »

Happy to see this is starting to see the light. The other blender exporter is far subpar to the Blender 2.49 exporter. Not suitable for a production environment.

Your exporter doesn't work in the latest SVN built (r40522). But that's not why I'm here. For your curiousity it says:

Code: Select all

RuntimeError: class OGRE3D_OT_export, function invoke: incompatible return value , str(, Function.result expected a set, not a str)

location:<unknown location>:-1

RuntimeError: class OGRE3D_OT_refresh_selection, function invoke: incompatible return value , str(, Function.result expected a set, not a str)

location:<unknown location>:-1
Why am I using SVN? because I thought the exporters were in better status actually; and I need to implement a custom constraint in C code for smoother animations. Seems I'll have to stick with 2.49 for the time being.

Edit: Found the GUI, it is being drawn, but on some buttons those errors appear.

Well, that's not why I'm here.

*** Feature request ***
This is purely a UI request. It applies for both the 2.49 exporter and the new one. Please, make a button to iterate through all existing actions and add all of them. Some of my models have 35 different actions, and I export around 29. It's easier to just add them all then remove the ones I don't need.
Also make sure they're added in alphabetical order. Thanks :) :)
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d »

Oh.. looks like python script api incompatibility on new blender release again. I will need to update my blender build again.

dark_sylinc:
1. I'm not too sure what that error's all about. But I think the latest stable 2.49 exporter is in the mercurial repository.
2. That's a good idea. I'll add a button to add all actions. :-)
xieu90
Gnoblar
Posts: 6
Joined: Wed Aug 04, 2010 1:24 pm

Re: Blender 2.5 Exporter [Official]

Post by xieu90 »

@lf3thn4d
the add all actions button was once requested by me in the past,too
did you forget it ? :D
anyways I'm happy now that it will surely be added
lucky that dark_sylinc requested it

Hi,
when you work on proper Blender Export Script, can you consider adding these 2 features ?
1. http://jmonkeyengine.org/groups/jmonkey ... der-plugin
2. may be a check box to export all animation, instead of choosing all animation manually.
your script is great. I'm looking forward the new version
Best wishes :)

can you consider of adding the 1. feature too?
TomaszCz
Gnoblar
Posts: 1
Joined: Thu Sep 29, 2011 7:44 pm

Re: Blender 2.5 Exporter [Official]

Post by TomaszCz »

Anyone knows when the exporter will be released?. I really can't wait and I don't know what to do. Is it a good idea to save mesh in new version (2.59) and then open in old one (2.49) and then export it in old stable plug-in? Will it work correctly? Please, answer asap. Thanks!
xieu90
Gnoblar
Posts: 6
Joined: Wed Aug 04, 2010 1:24 pm

Re: Blender 2.5 Exporter [Official]

Post by xieu90 »

I dont think anyone knows when this exporter will be released
personaly I think it will be around xmas or in next year

if you are in a hurry then model the mesh in new(2.59) then open the mesh with old one (2.49) do the animation there and export it from the old one.
I'm using that method and it works, but be sure to do all animation in the old one.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: Blender 2.5 Exporter [Official]

Post by dark_sylinc »

lf3thn4d wrote:1. I'm not too sure what that error's all about. But I think the latest stable 2.49 exporter is in the mercurial repository.
2. That's a good idea. I'll add a button to add all actions. :-)
1. Ooops. I meant "2.59". Was just a typo. The 2.49 exporter is very stable.
2. Great! Thanks :)
User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm
x 12

Re: Blender 2.5 Exporter [Official]

Post by lf3thn4d »

@xieu90: You did? I must have missed it or forgot about it. really sorry for that :-P my bad.
@TomaszCz: There's no real dateline when it will be finished. It'll be done when it gets done. The problem right now is that I'm swamped with contract works so I'm not able to do this at my 100%. :-( But I'm slowly working on it. I'm already at the basic mesh exporting phase at the current stage.
@dark_sylinc: Ah.. ok got confused for a moment. lol.
User avatar
LiMuBei
Goblin
Posts: 297
Joined: Mon Jun 09, 2008 3:56 pm
Location: Karlsruhe, Germany
x 10

Re: Blender 2.5 Exporter [Official]

Post by LiMuBei »

TomaszCz wrote:Anyone knows when the exporter will be released?. I really can't wait and I don't know what to do. Is it a good idea to save mesh in new version (2.59) and then open in old one (2.49) and then export it in old stable plug-in? Will it work correctly? Please, answer asap. Thanks!
I know it's not popular to say this in this thread, but there is another Blender 2.5 exporter that you can use until this one is done :D *ducks*