Page 4 of 7

Re: Blender 2.5 Exporter [Official]

Posted: Sun Aug 21, 2011 4:29 pm
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. :-)

Re: Blender 2.5 Exporter [Official]

Posted: Sun Aug 21, 2011 6:46 pm
by jacmoe
Woo-hoo. :)

Re: Blender 2.5 Exporter [Official]

Posted: Mon Aug 22, 2011 12:32 am
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.

Re: Blender 2.5 Exporter [Official]

Posted: Mon Aug 22, 2011 3:12 pm
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. :-)

Re: Blender 2.5 Exporter [Official]

Posted: Mon Aug 22, 2011 11:52 pm
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!

Re: Blender 2.5 Exporter [Official]

Posted: Tue Aug 23, 2011 2:11 pm
by kromar
where can i find that script? i searched the whole repo but i can not find anny commit of that script:/

Re: Blender 2.5 Exporter [Official]

Posted: Tue Aug 23, 2011 2:17 pm
by jacmoe

Re: Blender 2.5 Exporter [Official]

Posted: Tue Aug 23, 2011 7:19 pm
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.

Re: Blender 2.5 Exporter [Official]

Posted: Fri Sep 16, 2011 11:52 pm
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.

Re: Blender 2.5 Exporter [Official]

Posted: Sat Sep 17, 2011 5:28 pm
by jonim8or
What does the console window say? 'cause if a plugin can't be enabled, that's often due to a bug somewhere.

Re: Blender 2.5 Exporter [Official]

Posted: Sun Sep 18, 2011 1:32 pm
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?

Re: Blender 2.5 Exporter [Official]

Posted: Sun Sep 18, 2011 8:57 pm
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.

Re: Blender 2.5 Exporter [Official]

Posted: Mon Sep 19, 2011 10:05 am
by jonim8or
in blender:
Help->toggle system console

Re: Blender 2.5 Exporter [Official]

Posted: Mon Sep 19, 2011 1:25 pm
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

Re: Blender 2.5 Exporter [Official]

Posted: Mon Sep 19, 2011 7:39 pm
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

Re: Blender 2.5 Exporter [Official]

Posted: Tue Sep 20, 2011 12:54 pm
by jonim8or
copying text: right-click in terminal, select "Mark", select text, press enter.
But the image gives enough info for now.

Re: Blender 2.5 Exporter [Official]

Posted: Tue Sep 20, 2011 9:48 pm
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.

Re: Blender 2.5 Exporter [Official]

Posted: Sun Sep 25, 2011 6:57 pm
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 :) :)

Re: Blender 2.5 Exporter [Official]

Posted: Thu Sep 29, 2011 11:13 am
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. :-)

Re: Blender 2.5 Exporter [Official]

Posted: Thu Sep 29, 2011 4:07 pm
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?

Re: Blender 2.5 Exporter [Official]

Posted: Thu Sep 29, 2011 7:53 pm
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!

Re: Blender 2.5 Exporter [Official]

Posted: Thu Sep 29, 2011 9:46 pm
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.

Re: Blender 2.5 Exporter [Official]

Posted: Fri Sep 30, 2011 3:55 am
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 :)

Re: Blender 2.5 Exporter [Official]

Posted: Fri Sep 30, 2011 4:19 am
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.

Re: Blender 2.5 Exporter [Official]

Posted: Fri Sep 30, 2011 10:57 am
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*