Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
PhyllisL
Gnoblar
Posts: 6
Joined: Thu Sep 02, 2010 4:56 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by PhyllisL » Tue Sep 14, 2010 9:46 pm

Thanks.. seems to work.. did not know about control click trick..
0 x

PhyllisL
Gnoblar
Posts: 6
Joined: Thu Sep 02, 2010 4:56 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by PhyllisL » Fri Sep 17, 2010 6:16 am

Right XMLConverter not working on Mac.. problem.. do not really want to have to port stuff to windows
0 x

racoon
Gnoblar
Posts: 15
Joined: Fri Jul 23, 2010 6:34 pm

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by racoon » Fri Sep 17, 2010 11:05 am

mkultra333 wrote:
syndicatedragon wrote:
cyrfer wrote:@syndicatedragon: You are asking how to delete faces in Blender? This is the wrong forum for that. However, I recommend you select your object, go into "Edit Mode" (by clicking the mesh in the tree view, or TabKey), choosing "face select" mode (instead of vertex or others) at the bottom of the 3D viewport, start right-clicking (to select) on faces in the 3d scene and hit DeleteKey (I think). [edit]The faces in Blender are often quads, which the exporter has to split to make triangles. Maybe this is why you think there are twice as many faces as necessary.[/edit]
I'm wondering why a cube, when exported, apparently has 24 vertexes. Even if it had to make triangles, there should still only be the original 8 vertexes, right?
I'd guess the cube is not set to be smooth, so instead of 6 verts with normals pointing out from the corners, each face has 4 private verts with normals pointing straight out in the direction of the face.

As for the broken export with subsurfaces, try and find some way to convert the subsurfaces to actual mesh triangles and see how the export goes.
Hi mkultra33,

I am havving the same problem. I am importing an .obj to blender (where one vertex is part of many faces). When I import it to blender and export it to Ogre I got for each face 3 new vertices.
So my model is not "Smooth". Can you give me a hint how to make it smooth in Blender???

Thanks

raccon
0 x

User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1865
Joined: Sun Mar 08, 2009 5:25 am
x 17

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by mkultra333 » Sat Sep 18, 2010 3:22 am

To make the verts common to all faces they touch and with normals that point out at an angle to each face (so smooth looking), go to edit mode and with the all the verts selected, press the "set smo" button down the bottom left. It's next to a "set solid" button, which does the opposite (makes new verts for every face with face specific normals.)
0 x
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by lf3thn4d » Sat Sep 18, 2010 9:57 pm

PhyllisL wrote:Right XMLConverter not working on Mac.. problem.. do not really want to have to port stuff to windows
Hi, I do not have a Mac so I can't support this. But if you can tell me how to make it work, I'm willing to make support for it. ;-)
0 x

PhyllisL
Gnoblar
Posts: 6
Joined: Thu Sep 02, 2010 4:56 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by PhyllisL » Wed Sep 22, 2010 5:03 pm

I think someone with a mac needs to help on this. I am running the exporter on OS 10.6.4 on Blender2.49..The exporter works fine. The problem is completing the last step of converting the meshes to a Unix Executable file so they can be read in Orge. I run the OrgeXMLConverter in terminal.. navigate to folder .. I was told to type ./Orgexmlconverter filename.mesh and then run .. when I do that I get error that says Orgexml no such file.. when I drag the converter into the terminal window then the mesh file it runs but comes back with a bus error .. there was another thread that had same issue .. someone posted a recompiled converter.. tried that with same resulting errors.. There is a converter log file that gets created but I'm a newbe in coding so can't tell from that where problem is.. Any help on this would be greatly appreciated.
0 x

User avatar
LiMuBei
Goblin
Posts: 297
Joined: Mon Jun 09, 2008 3:56 pm
Location: Karlsruhe, Germany

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by LiMuBei » Sun Sep 26, 2010 12:43 am

Maybe post the converter log here so people can have a look at it. Then maybe try to export a simple cube and see if that works to narrow down the error.
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by zeromath » Tue Sep 28, 2010 7:54 pm

Hi again. Thanks for helping me with my problem before, now I got a new problem:

I tried to export the meshes with skeletal animation, but the bones won't play in ogre. The animation list don't even show.

I hope this screenie helps:
bfly.png
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by zeromath » Wed Sep 29, 2010 10:55 am

Nvm.
0 x

User avatar
Maxym
Halfling
Posts: 43
Joined: Mon Feb 23, 2009 10:29 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by Maxym » Thu Sep 30, 2010 9:28 am

Hi all,

that's my very first time I use this exporter and I met interesting thing - there are two objects of the same size in Blender's window, but when I export them in turn one model is 100 times bigger then the other one. Does anybody know why it happens?


Thanks in advance,
Maxym

P.S. I didn't manage to read all 15 pages of the forum, so sorry in case if something similar has been discussed already.
0 x

User avatar
koirat
Orc
Posts: 446
Joined: Mon Feb 25, 2008 7:56 pm

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by koirat » Thu Sep 30, 2010 9:45 am

Is one of your model scaled in blender ?
If so you should apply scale to your object so it's scale is reseted to (1,1,1) and your underlying mesh is rescaled.
0 x
This is a block of text that can be added to posts you make. There is a 255 character limit.

User avatar
Maxym
Halfling
Posts: 43
Joined: Mon Feb 23, 2009 10:29 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by Maxym » Thu Sep 30, 2010 9:49 am

koirat wrote:Is one of your model scaled in blender ?
If so you should apply scale to your object so it's scale is reseted to (1,1,1) and your underlying mesh is rescaled.
And how can I check if its scale is not (1,1,1)? And how to apply that scale? (I'm not very familiar with Blender too :))
0 x

User avatar
Maxym
Halfling
Posts: 43
Joined: Mon Feb 23, 2009 10:29 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by Maxym » Thu Sep 30, 2010 3:43 pm

Maxym wrote: And how to apply that scale?
Now I know: Ctrl+A, 3 in object mode.

P.S. I know it's not a Blender forum ;)
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by zeromath » Sun Oct 24, 2010 12:58 pm

Hi again,

Thanks for helping me with the shrinking problem by pressing Ctrl+A. It works for meshes, but not for bones, the animation is messed up when I export them to ogre format. Is this a bug or is there something I'm not doing right?
0 x

User avatar
altren
Gnome
Posts: 317
Joined: Tue Oct 24, 2006 9:02 am
Location: Moscow, Russa
x 1
Contact:

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by altren » Thu Oct 28, 2010 1:32 pm

Small possible bug report:
when Extremity Points is not 0 and OgreXMLConverter is turned on script crashes in base.py (line449):

Code: Select all

basicArguments += ' -x ' + self.nuextremityPoints
because it can't concatenate str and int. I don't really need that, so I used 0, but I guess you should convert self.nuextremityPoints into string.
0 x
Image

r0ots
Gnoblar
Posts: 3
Joined: Sat Jun 12, 2010 1:04 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by r0ots » Sat Oct 30, 2010 12:14 am

Hi there,

I'm having a problem with the blender exporter. When I export a model, some parts are not connected anymore. It's not visible at first place(there is no visual discontinuity), but I made a propagation algorithm to know connected parts, and my mesh have 20, whereas in blender it has only 3. I saw that it is the exact inverse problem with people one or two pages before :D

Things I've tested :

- In blender, I select a vertex, then choose "Select Linked Vertices". The output is that I have 3 different parts (as said before)
- When I export it in .mesh, and then import it with the blender importer, I have 20 parts, like in my app.

I don't know exactly how my friend did that mesh, but He told me that he makes the mesh in blender, then export it to obj, makes the UV with an external tool, and reimport it in blender. At this moment, I have 3 parts.

The strange thing is, it looks like the different parts I have seems to be the differents part in UV mapping made in the external tool. Maybe this information of groups is somewhere in blender but I can't find it. So I think finding where these groups are stored will lead me to the solution, in that I can merge them (and hope it do not breaks the animation/UV mapping :( ). These groups are not blender "vertex groups".

I looked a bit at the outputed mesh xml, It have only one submesh.

I looked a bit in the meshexporter.py too, and it seems that there's no specific treatment to export faces (expect for the quads to triangle conversion). So no splits are made there. It appears so that some connection are lost in the process of getting these faces.

I hope I put all the relevent informations and someone can help me on this. Thx in advance.
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by lf3thn4d » Sat Oct 30, 2010 2:26 am

altren wrote:Small possible bug report:
when Extremity Points is not 0 and OgreXMLConverter is turned on script crashes in base.py (line449):

Code: Select all

basicArguments += ' -x ' + self.nuextremityPoints
because it can't concatenate str and int. I don't really need that, so I used 0, but I guess you should convert self.nuextremityPoints into string.
Good catch. Thanks. :-D

@r0ots: If your UV of adjacent faces points to diff coords or if your faces adjacent to each other is not smoothed (hard edged), the same vertex will be cloned and thus splitting the faces into many triangle islands.
0 x

r0ots
Gnoblar
Posts: 3
Joined: Sat Jun 12, 2010 1:04 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by r0ots » Sun Oct 31, 2010 12:58 pm

Arf, I was expecting a such behavior :(

I think it comes from the UV mapping, as the UV texture is split into several parts :
Image

So Is there a way to have it into one final piece without having to remap it?

Thx.
0 x

r0ots
Gnoblar
Posts: 3
Joined: Sat Jun 12, 2010 1:04 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by r0ots » Thu Nov 04, 2010 11:09 pm

Okay, I made a program that resolves this, it gets the xml generated by the exporter script, founds every pair of points that have the same position, found a triangle that has the first point of the pair and then adds a face with first/second/another point in the triangle.

I'm cutting a mesh by a plane in real-time so it was mandatory to have the mesh into one piece.
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by lf3thn4d » Sat Nov 06, 2010 7:30 pm

Hmm.. that works? Wouldn't that mess up your UV?
0 x

user
Gnoblar
Posts: 13
Joined: Mon Oct 18, 2010 12:18 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by user » Wed Nov 10, 2010 10:36 pm

Sorry, but I can't install this plugin. I use plugins tab in preferences window and specify the path to plugin, but it is not shown in plugins list even after blender restart. I've tried to copy entire folder to scripts folder as was said in the manual but the result stills the same.
Can anyone help me with this problem? (sorry for stupid questions)
Blender 2.54 beta.
0 x

materialDefender
Gnoblar
Posts: 1
Joined: Fri Nov 06, 2009 2:20 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by materialDefender » Fri Nov 19, 2010 3:53 pm

user,
To clarify, this version of the exporter is meant for Blender 2.49b. Work on a Blender 2.5/2.6? exporter will start once their python API has been declared stable which at the moment(25/08/2010) is not; they are still in beta. When work on the new exporter starts, I will put up another thread to distinguish both exporter as it will be a 100% rewrite. I will continue to support this exporter as best as I can until Blender 2.49 phase out.
Sorry, you'll have to export your files with 2.49b until Blender 2.5's API is solidified.

You may want to try using 2.5 to export with an third-party filetype and then import in 2.49. Opening 2.5* files with 2.4* does not work very well (for example, animation is messed up).
0 x

Endoperez
Gnoblar
Posts: 11
Joined: Fri Nov 12, 2010 11:08 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by Endoperez » Tue Nov 23, 2010 2:30 pm

lf3thn4d wrote:
altren wrote:Small possible bug report:
when Extremity Points is not 0 and OgreXMLConverter is turned on script crashes in base.py (line449):

Code: Select all

basicArguments += ' -x ' + self.nuextremityPoints
because it can't concatenate str and int. I don't really need that, so I used 0, but I guess you should convert self.nuextremityPoints into string.
Good catch. Thanks. :-D
I am trying to create extremity points for Ogre submeshes, would this option do that if it worked?

For some reason, I can't find any mention of extremities option for XMLConverter. This is the closest thing, and it seems to imply the extremities thing is just what I want, but that still won't tell me what would be a good number of extremity points...
0 x

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

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by lf3thn4d » Wed Nov 24, 2010 6:56 pm

Hey, really sorry for the late reply. I've been very busy lately with tight schedules. I do not have time to update a new fix release yet. But for a quick fix, you can temporary change the said line to:

Code: Select all

basicArguments += ' -x %d' % self.nuextremityPoints
That should fix it.
As for what is a good number, I'm not sure myself. Personally, I try to avoid needing such solution as it requires more sorting calculations during rendering. Having said that, I didn't look much into the extremity points system so I've no clue how it works. :-P
0 x

Endoperez
Gnoblar
Posts: 11
Joined: Fri Nov 12, 2010 11:08 am

Re: Latest Blender Export Script [Wed Aug 25, 2010 - v1.4]

Post by Endoperez » Thu Nov 25, 2010 8:55 am

lf3thn4d wrote:Hey, really sorry for the late reply. I've been very busy lately with tight schedules. I do not have time to update a new fix release yet. But for a quick fix, you can temporary change the said line to:

Code: Select all

basicArguments += ' -x %d' % self.nuextremityPoints
That should fix it.
Thank you a lot! I'm trying to make a transparent dome with other transparent objects inside it, and it looks like it's very hard to do well without submesh sorting.
0 x

Post Reply