Blender importer [WIP]
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
Ok. This thread gets confusing.
Just to make it clear: Not the plugin crashes, but the OgreXmlConverter.exe does. When you don't let the plugin convert the mesh.xml without calling OgreXmlConverter.exe everyhting works fine.
Since this OgreXmlConverter.exe bugs gets on my nerve I will look into it this evening.
Just to make it clear: Not the plugin crashes, but the OgreXmlConverter.exe does. When you don't let the plugin convert the mesh.xml without calling OgreXmlConverter.exe everyhting works fine.
Since this OgreXmlConverter.exe bugs gets on my nerve I will look into it this evening.
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
- walaber
- OGRE Expert User
- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
Well, this is the downloadable version of the tool. Build OgreXmlConverter yourself and it will work fine. The binary download is still version 1.0.3.randall wrote:The same here.Strange. When I use the OgreXmlConverter.exe from the command line tools download, I get an access violation on conversion of the mesh.
walaber, glad you found it useful.
The animation import is not forgotten. I just wait till Python API access to the armature system is ready in Blender 2.40. Don't want to implement this twice.
- walaber
- OGRE Expert User
- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
@Jerky- yes. after this incident I upped it to 5 temporary files, all 10 minutes apart, so I have 50 minutes to realize my mistake however I think every time you save it copies the pre-save to the latest backup file, so if I were to save 5 times after making a mistake that would be a problem
@haffax- indeed. I'm looking forward to 2.40's animation improvements as well! no rush, my game doesn't have too much animation yet, so it's not a large chore to rebuild the armature and animations.
@haffax- indeed. I'm looking forward to 2.40's animation improvements as well! no rush, my game doesn't have too much animation yet, so it's not a large chore to rebuild the armature and animations.
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
Getting an error in the Blender log:
MeshConverter.exe is a fresh build from CVS. Python is 2.3. Any ideas?
Code: Select all
Reading mesh file I:\ProjectWish\Ogre\MeshViewer\g_Group4405.mesh.xml...
Traceback (most recent call last):
File "<string>", line 493, in fileselection_callback
File "<string>", line 390, in collect_materials
AttributeError: 'module' object has no attribute 'compile'
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
I don't really have an idea what could be wrong. The line it fails, it is accessing the regular expression module re. So maybe it is not part of your python installation or not installed properly?
Here is the log of an python interactive shell session.
lines starting with >>> is user input. Please try if you get similiar output. If not, then maybe your installation is faulty. If it looks similiar, then I don't have a clue.
Here is the log of an python interactive shell session.
lines starting with >>> is user input. Please try if you get similiar output. If not, then maybe your installation is faulty. If it looks similiar, then I don't have a clue.
Code: Select all
ActivePython 2.3.5 Build 236 (ActiveState Corp.) based on
Python 2.3.5 (#62, Feb 9 2005, 16:17:08) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> print re
<module 're' from 'C:\Python23\lib\re.pyc'>
>>> foo = re.compile('.*')
>>> print foo
<_sre.SRE_Pattern object at 0x008C9EC8>
>>>
-
- Gnoblar
- Posts: 22
- Joined: Fri Mar 11, 2005 8:12 am
- Location: Oulu, Finland
- x 1
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
-
- Gnoblar
- Posts: 22
- Joined: Fri Mar 11, 2005 8:12 am
- Location: Oulu, Finland
- x 1
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- walaber
- OGRE Expert User
- Posts: 829
- Joined: Sat Oct 02, 2004 2:20 pm
- Location: California, USA
- Contact:
-
- Gnoblar
- Posts: 22
- Joined: Fri Mar 11, 2005 8:12 am
- Location: Oulu, Finland
- x 1
- Contact:
oh gee, i did not even notice this was the importer thread, sorry :)
how do you end up with Ogre models that you dont have in some modeller format that Blender supports (like .blend or .obj?)? i find it surprising that there is a need for importer. but can well believe that it is practical to be able to just open and edit the already ogre-prepared models..
i'd hope you'd take a look at the new Mesh module in 2.40, although in some cases you might be still better of with NMesh like before. iirc the vertex groups are somehow there too.
the armature setters are still open for feedback, feel free to influence to get it in a nice shape for you.
how do you end up with Ogre models that you dont have in some modeller format that Blender supports (like .blend or .obj?)? i find it surprising that there is a need for importer. but can well believe that it is practical to be able to just open and edit the already ogre-prepared models..
i'd hope you'd take a look at the new Mesh module in 2.40, although in some cases you might be still better of with NMesh like before. iirc the vertex groups are somehow there too.
the armature setters are still open for feedback, feel free to influence to get it in a nice shape for you.
~Toni
- Jerky
- Orc Shaman
- Posts: 791
- Joined: Wed Mar 02, 2005 4:13 am
- Location: Springville, Utah
- Contact:
BTW, for anyone with similar problems as I was having, my problem was python. I had version 2.4 installed, even though that version of blender (2.37) did not support it. I had to install python 2.3.5 and add its directories to my PYTHONPATH system environment variable to get it all working correctly. After that was in, every importer/exporter works flawlessly (or as they should ).
- CaseyB
- OGRE Contributor
- Posts: 1335
- Joined: Sun Nov 20, 2005 2:42 pm
- Location: Columbus, Ohio
- x 3
- Contact:
I don't know if this is dead or not, but I tried using the Importer with Blender 2.40 and I got the following error
I have no idea what that means!
Code: Select all
Traceback (most recent call last):
File "<string>", line 109, in ?
ImportError: No module named glob
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
This project is not dead, I just don't have the time for it right now, though I am in the process of integrating Skeleton import.
The importer works just fine with Blender 2.40/2.41.
In your case the problem seems to be, that you don't have Python 2.4 installed or not properly setup so, that Blender finds it. You need to set the PYTHON environment variable to point to your python.exe.
The importer works just fine with Blender 2.40/2.41.
In your case the problem seems to be, that you don't have Python 2.4 installed or not properly setup so, that Blender finds it. You need to set the PYTHON environment variable to point to your python.exe.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Is that true?Using Python version 2.4
Reading mesh file d:\ogredist\samples\common\bin\release\TestLevel.xml...
Mesh with 0 shared vertices.
Submesh 0 with 15 vertices and 12 faces...
done.
Submesh 1 with 30 vertices and 42 faces...
done.
Submesh 2 with 27 vertices and 20 faces...
done.
Submesh 3 with 22 vertices and 12 faces...
done.
Submesh 4 with 14 vertices and 12 faces...
done.
Submesh 5 with 12 vertices and 12 faces...
done.
Submesh 6 with 29 vertices and 20 faces...
done.
Submesh 7 with 28 vertices and 16 faces...
done.
Submesh 8 with 28 vertices and 20 faces...
done.
Submesh 9 with 22 vertices and 20 faces...
done.
Submesh 10 with 95 vertices and 60 faces...
done.
Submesh 11 with 24 vertices and 12 faces...
done.
Submesh 12 with 48 vertices and 24 faces...
done.
Submesh 13 with 121 vertices and 200 faces...
done.
Submesh 14 with 32 vertices and 24 faces...
done.
Submesh 15 with 32 vertices and 24 faces...
done.
Traceback (most recent call last):
File "<string>", line 504, in fileselection_callback
File "<string>", line 289, in CreateBlenderMesh
RuntimeError: object data material lists can't have more than 16 materials
Funny thing is that testlevel.material only contains 7 materials.
But the level.mesh.xml does indeed have more than 16 submeshes.
Is that a limitation of Blender itself? Or did I find a bug in the importer script?
I wanted to clean up the dotsceneoctree testlevel, because OPCODE tells me that the model has 1239468 degenerate faces.
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
This is a bug in the script and marked as todo.
I made a quick fix for this, but couldn't yet test, if this fixes the issue.
If you could please test this, then I can commit it to the CVS.
http://www.rafb.net/paste/results/yA7DFt91.txt
I made a quick fix for this, but couldn't yet test, if this fixes the issue.
If you could please test this, then I can commit it to the CVS.
http://www.rafb.net/paste/results/yA7DFt91.txt
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Now I get this:
Code: Select all
Using Python version 2.4
Reading mesh file d:\ogredist\samples\common\bin\release\TestLevel.xml...
Mesh with 0 shared vertices.
Submesh 0 with 15 vertices and 12 faces...
done.
Submesh 1 with 30 vertices and 42 faces...
done.
Submesh 2 with 27 vertices and 20 faces...
done.
Traceback (most recent call last):
File "<string>", line 505, in fileselection_callback
File "<string>", line 292, in CreateBlenderMesh
AttributeError: material already in the list