Blender importer [WIP]
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
I just updated the importer to fix the two problems reported by dermont and discipline. The material creation is being worked on, but not activated in this version yet. I'll work on it tomorrow, with a bit luck I'll have it tackled then.
(As always it might take a while till this trickled down to public CVS.)
(As always it might take a while till this trickled down to public CVS.)
- discipline
- OGRE Community Helper
- Posts: 766
- Joined: Mon May 16, 2005 12:09 am
I had to comment out some lines that had '>>>>>' and '<<<<<' near the file path variables for it to work. I suppose this was by design so the user will put in the path for their OgreXMLConverter?
Anyway, other than that it worked fine. When I load the mesh, I still only get a grey untextured image in my 3d window. It appears that UV coordinates are tied to the mesh though. If I create a new material and load in an image, then specify the ninja's skin and it gets mapped properly. Then I can render just fine. Even after doing this I still only see a grey image, so maybe it is just blender on linux, or how the debian maintaner compiled it.
Thanks haffax!
Anyway, other than that it worked fine. When I load the mesh, I still only get a grey untextured image in my 3d window. It appears that UV coordinates are tied to the mesh though. If I create a new material and load in an image, then specify the ninja's skin and it gets mapped properly. Then I can render just fine. Even after doing this I still only see a grey image, so maybe it is just blender on linux, or how the debian maintaner compiled it.
Thanks haffax!
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
No these are conflict markers. They are there because there we conflicts between my changes and the changes you made to your local copy. There are specialised edit tools that help you visualize the conflicts. (At least for windows that is, but there are probably linux tools out there too.) These lines aren't part of the file in CVS. You'll see that when you do a fresh checkout of the file.discipline wrote:I had to comment out some lines that had '>>>>>' and '<<<<<' near the file path variables for it to work. I suppose this was by design so the user will put in the path for their OgreXMLConverter?
My update from last week, was solely there to fix the two reported bugs. Material import is not yet ready. This is rather tedious and I am a bit hampered by my limited Blender skills. (Oh. So many tiny buttons. )discipline wrote: When I load the mesh, I still only get a grey untextured image in my 3d window. It appears that UV coordinates are tied to the mesh though. If I create a new material and load in an image, then specify the ninja's skin and it gets mapped properly. Then I can render just fine. Even after doing this I still only see a grey image, so maybe it is just blender on linux, or how the debian maintaner compiled it.
Anyway I am very close now here on my local copy. The texture is there in rendering, but it ignores uv coords. Probably just one or two flags. Just hadn't had the time to look them up yet.
-
- Gremlin
- Posts: 164
- Joined: Wed Aug 18, 2004 6:41 pm
- Location: London
- Contact:
Hi haffax, some time ago I fixed up bob holcomb's bsp import script so that it imported textures properly. It had the same problem as yours. I think the problem was due to confusion between materials and UV textures.
Anyhow, take a look at my script - it may help you. There are some subroutines you can copy which do the image set-up.
It's here:
http://www.ijbrown.net/blender/bsp_import.zip
and the original discussion on elysun is here:
http://www.elysiun.com/forum/viewtopic.php?t=42385
Ian
Anyhow, take a look at my script - it may help you. There are some subroutines you can copy which do the image set-up.
It's here:
http://www.ijbrown.net/blender/bsp_import.zip
and the original discussion on elysun is here:
http://www.elysiun.com/forum/viewtopic.php?t=42385
Ian
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
- discipline
- OGRE Community Helper
- Posts: 766
- Joined: Mon May 16, 2005 12:09 am
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
I just committed a new version of the script.
Now render materials are created and I did a bit tidying-up in the script and added a new option for the log level. So output detail can be configured now.
The Ogre head rendered with Blender's built-in renderer:
ibrown, your script was very helpful. Thanks again.
Now render materials are created and I did a bit tidying-up in the script and added a new option for the log level. So output detail can be configured now.
The Ogre head rendered with Blender's built-in renderer:
ibrown, your script was very helpful. Thanks again.
Last edited by haffax on Sat Aug 27, 2005 12:49 pm, edited 1 time in total.
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
All Your Blend Are Belong To Us.
Guess I just have to learn Blender, then.
Guess I just have to learn Blender, then.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- discipline
- OGRE Community Helper
- Posts: 766
- Joined: Mon May 16, 2005 12:09 am
-
- Gremlin
- Posts: 164
- Joined: Wed Aug 18, 2004 6:41 pm
- Location: London
- Contact:
I'm glad it was helpful. The mesh import script is pretty important I think in the greater scheme of things - it allows more sharing of resources across projects and allows for migration from max to blender for projects that cannot afford max.haffax wrote: ibrown, your script was very helpful. Thanks again.
Ian
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
I recently commited a new bugfix release. Version 0.5.1 now imports Ogre meshes without normals or texture coordinates. Thanks to nfz for spotting this.
Today I started to work on skeleton import seriously. Depending on how much time I have at the weekend I can make skeleton import working next week. But I won't promise anything on this matter.
Today I started to work on skeleton import seriously. Depending on how much time I have at the weekend I can make skeleton import working next week. But I won't promise anything on this matter.
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
My guess is that it works with whatever Python Blender likes.tgraupmann wrote:It doesn't seem like this plugin likes Python 2.4.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
Where do you get the "OgreXmlConverter.exe"?
Also I think you should add error handling for if it can't find the PYTHON variable, it should check in a default place, and then fail.
Found it:
http://www.ogre3d.org/index.php?option= ... t=category
Also I think you should add error handling for if it can't find the PYTHON variable, it should check in a default place, and then fail.
Found it:
http://www.ogre3d.org/index.php?option= ... t=category
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Ogre - tools.tgraupmann wrote:Where do you get the "OgreXmlConverter.exe"?
Why? A succesful Python install makes use of a PYTHON envvar - if Blender is happy (Look at the Blender console) then Blender plugins are happy too.tgraupmann wrote:Also I think you should add error handling for if it can't find the PYTHON variable, it should check in a default place, and then fail.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
From the importer readme:jacmoe wrote:Why? A succesful Python install makes use of a PYTHON envvar - if Blender is happy (Look at the Blender console) then Blender plugins are happy too.
Note that you need Python 2.3.x for it to work. After installing python
create an environment variable called PYTHON that contains the full path to
your python.exe
("C:\python23\python.exe" for the default installation destination).
Last edited by tgraupmann on Sun Aug 07, 2005 5:41 pm, edited 3 times in total.
-
- Gnoll
- Posts: 696
- Joined: Sun Feb 20, 2005 5:28 am
- Contact:
The importer plugin crashes when I try to import this simple mesh:
http://www.tagenigma.com/qa/albatross_shield.mesh
http://www.tagenigma.com/qa/albatross_shield.mesh
- haffax
- OGRE Retired Moderator
- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 7
- Contact:
tgraupmann, the importer is happy with the python Blender is happy with. This means Python 2.3 for Blender 2.37. Python 2.4 will probably be used to for Blender 2.40. The PYTHON environment variable is (or probably was, since it now works without here) used by Blender to determine what python installation to use.
Anyway. Your mesh could be imported just fine here. It looks like this: http://img151.imageshack.us/my.php?image=shield9gm.jpg
What was the error messages? What does your Blender console window have to say about it?
Anyway. Your mesh could be imported just fine here. It looks like this: http://img151.imageshack.us/my.php?image=shield9gm.jpg
What was the error messages? What does your Blender console window have to say about it?
-
- 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:
- 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: