directy import .blend flles to ogre3d
-
ogx
- Gnoblar
- Posts: 7
- Joined: Mon Sep 05, 2005 9:02 am
directy import .blend flles to ogre3d
hi everyone,
Im newbie here and i like to konw how can import .blend files directly to ogre3d.
I can find the dotScene xml and .mesh export script to ogre but it would
be a very good alternative if ogre see the .blend files like crystal space, cel, and crystalBlend project.
http://www.crystalspace3d.org/tikiwiki/ ... ystalBlend
Im newbie here and i like to konw how can import .blend files directly to ogre3d.
I can find the dotScene xml and .mesh export script to ogre but it would
be a very good alternative if ogre see the .blend files like crystal space, cel, and crystalBlend project.
http://www.crystalspace3d.org/tikiwiki/ ... ystalBlend
-
fp12
- Halfling
- Posts: 99
- Joined: Sat Jul 09, 2005 12:11 am
- Location: Nantes - France
- Contact:
Hi !
Sorry but actually Ogre uses its own optimized format (.mesh) that can be exported from Blender, XSI, Max, ...
All you have to do when you use Blender is just using the export script (python) to xml, then run a converter to .mesh and that's finished ! Then you can import it in your app with Ogre
Sorry but actually Ogre uses its own optimized format (.mesh) that can be exported from Blender, XSI, Max, ...
All you have to do when you use Blender is just using the export script (python) to xml, then run a converter to .mesh and that's finished ! Then you can import it in your app with Ogre
- jmonw
- Goblin
- Posts: 232
- Joined: Sat Apr 23, 2005 3:21 am
- Location: Atlanta, GA
Note: The exporter to .mesh does not come with Blender. It is available in the CVS, though.
Best of luck.
Best of luck.
- abhinavxrai
- Halfling
- Posts: 54
- Joined: Wed Jan 25, 2006 7:47 am
- Location: Victoria, Canada / Israel / New Delhi, India
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
Here is the Ogre Blender-tools summary page in wiki: http://www.ogre3d.org/wiki/index.php/Tools:_Blender
It has the download link for the dotscene exporter. The Ogre Mesh exporter is part of the Ogre tools: http://www.ogre3d.org/index.php?option= ... tcat&cat=5
It has the download link for the dotscene exporter. The Ogre Mesh exporter is part of the Ogre tools: http://www.ogre3d.org/index.php?option= ... tcat&cat=5
- abhinavxrai
- Halfling
- Posts: 54
- Joined: Wed Jan 25, 2006 7:47 am
- Location: Victoria, Canada / Israel / New Delhi, India
To import .material into Ogre
Ok so I got the OgreXMLConvertor that converts .mesh.xml to .mesh files. I have successfully imported the files into OGRE from blender and everything seems to work. Yipee!
However, the script in Blender that exports into xml files - also creates a Scene.material file that contains the data for textures, colors, etc. for all the objects.
I was wondering if someone had an idea of how to import and use this .material file in OGRE.
What if I import only a few objects and not all of them? Would the .material file import and work completely?
Thank you for your help!
However, the script in Blender that exports into xml files - also creates a Scene.material file that contains the data for textures, colors, etc. for all the objects.
I was wondering if someone had an idea of how to import and use this .material file in OGRE.
What if I import only a few objects and not all of them? Would the .material file import and work completely?
Thank you for your help!
"Every new begining comes from some other begining's end."
Signatures with small Font are AWESOME
Signatures with small Font are AWESOME
- NeOmega
- Halfling
- Posts: 86
- Joined: Mon Apr 04, 2005 2:30 am
- Location: Washington State, USA
http://www.ogre3d.org/docs/manual/
here is the manual
http://www.ogre3d.org/docs/manual/manual_15.html#SEC24
is a section about materials
here is the manual
http://www.ogre3d.org/docs/manual/manual_15.html#SEC24
is a section about materials
- jacmoe
- OGRE Retired Moderator

- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
- abhinavxrai
- Halfling
- Posts: 54
- Joined: Wed Jan 25, 2006 7:47 am
- Location: Victoria, Canada / Israel / New Delhi, India
Media path eh? I'm not quite sure what that exactly is.
I was checking the API for Ogre and I do see materials and Material and MaterialManager - is this how to import materials into Ogre? Or maybe I'm going in the wrong direction?
Since, I'm a newbie, could someone explain how this works?
EDIT:
Nevermind, did some exploring and I found what "jacmoe" was trying to say. Stupid me. I was searching for something else.
Thank a lot though jacmoe.
I was checking the API for Ogre and I do see materials and Material and MaterialManager - is this how to import materials into Ogre? Or maybe I'm going in the wrong direction?
Since, I'm a newbie, could someone explain how this works?
EDIT:
Nevermind, did some exploring and I found what "jacmoe" was trying to say. Stupid me. I was searching for something else.
Thank a lot though jacmoe.
Last edited by abhinavxrai on Wed Feb 15, 2006 9:20 am, edited 1 time in total.
"Every new begining comes from some other begining's end."
Signatures with small Font are AWESOME
Signatures with small Font are AWESOME
- abhinavxrai
- Halfling
- Posts: 54
- Joined: Wed Jan 25, 2006 7:47 am
- Location: Victoria, Canada / Israel / New Delhi, India
So I placed the .material file in the required folder, however, my objects still dont get their textures.
I am not loading all the objects contained in the original model, only a few.
So how does OGRE know what material to add to what object? I mean what .material file?
Is there any kind of setup that is required?
I am not loading all the objects contained in the original model, only a few.
So how does OGRE know what material to add to what object? I mean what .material file?
Is there any kind of setup that is required?
"Every new begining comes from some other begining's end."
Signatures with small Font are AWESOME
Signatures with small Font are AWESOME
- abhinavxrai
- Halfling
- Posts: 54
- Joined: Wed Jan 25, 2006 7:47 am
- Location: Victoria, Canada / Israel / New Delhi, India
Ok I know this might be getting annoying, but please bear with me. I'm a poor newbie
So, I tried loading different models and this is what I found. No textures are being loaded, however, the models that have a base color, are being loaded perfectly fine.
Is it because the location of the texture image file is different? If yes, where do I place the images? If no, then im confused! Any ideas?
So, I tried loading different models and this is what I found. No textures are being loaded, however, the models that have a base color, are being loaded perfectly fine.
Is it because the location of the texture image file is different? If yes, where do I place the images? If no, then im confused! Any ideas?
"Every new begining comes from some other begining's end."
Signatures with small Font are AWESOME
Signatures with small Font are AWESOME
- haffax
- OGRE Retired Moderator

- Posts: 4823
- Joined: Fri Jun 18, 2004 1:40 pm
- Location: Berlin, Germany
- x 8
- Contact:
abhinavxrai, look in your Ogre.log. It tells you what materials Ogre expects and didn't find or compile and the reason for it.
Materials are referenced in the mesh files. The meshes (or better submeshes) know which material they have to use.
One common error in this regard is to forget to initialise all resource groups. Did you call ResourceGroupManager::initialiseAllResourceGroups() *after* you added all pathes where to look for your resources, but *before* you create entities?
Materials are referenced in the mesh files. The meshes (or better submeshes) know which material they have to use.
One common error in this regard is to forget to initialise all resource groups. Did you call ResourceGroupManager::initialiseAllResourceGroups() *after* you added all pathes where to look for your resources, but *before* you create entities?
-
P
- OGRE Expert User

- Posts: 421
- Joined: Fri Jan 07, 2005 9:49 pm
- Location: UK
- x 2
- Contact:
The default material is defined at submesh level, you can see it when opening your .mesh.xml with and editor.
First thing would be to open ogre.log, if a material or an image isn't found, It will be written inside the log.
To render using a texture you need your mesh to have at least one set of uv coordinate.
edit : too slow
First thing would be to open ogre.log, if a material or an image isn't found, It will be written inside the log.
To render using a texture you need your mesh to have at least one set of uv coordinate.
edit : too slow