Blender is an open source 3D content creation suite.
Ogre 3D is a 3D library for multiple desktop and mobile platforms.
But is a problem between this tow way.
The last Blender 3D did not have yet a script to export the mesh to last Ogre 3D.
What we can do ?. It’s a simple way to make all working.
Use the old version of these two and you can also use old video cards.
After you make all settings of code::blocks to use all Ogre libraries, you need to use some tricks.
First, in your source code you need to tell about this:
Root* mRoot = new Root("plugins.cfg","ogre.cfg","ogre.log");
This means all three files are using the 3D engine.
On Linux first file – plugins.cfg it is on my distro:
# /etc/OGRE/plugins.cfg - ogre plugins installed on Debian systems
# Warning: this file is autogenerated but anything between this line and
# the line saying "-*- ogre-plugins -*-" will be copied as-is on updates.
# default plugins installed with the libogremain package.
# Don't edit anything starting from next line; it was autogenerated.
# -*- ogre-plugins -*- [Please, don't remove or modify this marker]
But is because I use a very old video card.
Let’s see the next file – ogre.cfg.
Render System=OpenGL Rendering Subsystem
[OpenGL Rendering Subsystem]
Display Frequency=58 MHz
RTT Preferred Mode=FBO
Video Mode= 600 x 400
sRGB Gamma Conversion=No
As we see it’s an easy way to set some settings like 600 x 400.
The ogre.log it’s used to show the problems.
Let’s see another step in the source code:
This load the file – resources.cfg.
Let’s see this file:
# Resource locations to be added to the 'boostrap' path
# This also contains the minimum you need to use the Ogre example framework
# Resource locations to be added to the default path
The YOUR-USER is your user home folder.
The YOUR-PROJECT it is the folder of project code::blocks.
The OGRE-FOLDER-MEDIA is a folder of all files is export by Blender 3D.
Let me show my simple example using NVIDIA FX video card.
The next image shows us one 3D object which is a mesh object.
After I make all materials and mesh with the same name.
I use the script to export ogre mesh using the 2.49a version.
The next two images show the settings I need to make to have a mesh.
Also, you keep just the object you need to export.
You can use the simple C++ source code to render with Ogre Engine.