Material and OgreQt

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
Post Reply
Posts: 1
Joined: Wed Aug 21, 2013 4:51 pm

Material and OgreQt

Post by Fabien »

Hi all,

I'm using Ogre in a Qt application, based on this example ... age=qtOgre
It works pretty well but I have some issues with the appearence of my meshes.

For instance, the "sibenik.mesh" provided in the samples, appears black. If load this mesh in a standard Ogre application (without Qt), the mesh looks fine with the good texture (see Figures)
Sibenik mesh in Ogre
Sibenik mesh in Ogre
ogre_standard.jpg (136.34 KiB) Viewed 1175 times
Sibenik mesh in Ogre Qt
Sibenik mesh in Ogre Qt
ogre_qt.jpg (116.47 KiB) Viewed 1175 times
The problem seems to be related to the .material file. If I removed the line "ambient 0 0 0 1" in the file sibenik.material, some colors appears on the mesh. But it does not look as it should be.

Besides I have observed another issue with the transparency. In a Ogre application I can display a semi-transparent red cube with this material file.

Code: Select all

material Fabien/TransparencyRed
			ambient 0.4 0.1 0.1 0.3
			diffuse 1.0 0.4 0.4 0.3
			specular 1.0 1.0 1.0 1.0 64.0
			emissive 0.1 0.0 0.0 0.3
			scene_blend alpha_blend
			depth_write off
But this works with OgreQt only if I remove the line "scene_blend alpha_blend". Otherwise the cube is invisible.

I guess something is wrong in the initialization of OgreQt but I don't know why.

Posts: 29
Joined: Thu Jun 07, 2012 7:22 pm
Location: Brazil
x 9

Re: Material and OgreQt

Post by fernandot »

Try to set the locale before reading the .material...


Once I had a problem similar to that when my program was reading the numbers on .mateiral considering "," instead of "."

Post Reply