How to load Normal, Specular material with Ogre

Problems building or running the engine, queries about how to use features etc.
Post Reply
Garibalde
Halfling
Posts: 69
Joined: Thu Apr 16, 2009 2:38 am
Location: Montreal, Quebec
x 2
Contact:

How to load Normal, Specular material with Ogre

Post by Garibalde »

I have a cube model with Specular.jpg and Normal.jpg and Diffuse.jpg
I would like to load the cube in Ogre with all these effects.

My current material file from export with OgreMax for the Cube provides the following:

Code: Select all

material Material#25
{
	technique
	{
		pass
		{
			ambient 0.5 0.5 0.5 1
			diffuse 0.5 0.5 0.5 1
			specular 0.9 0.9 0.9 0.05 25

			texture_unit
			{
				texture Diffuse.jpg
			}

			texture_unit
			{
			}
		}

	}

}
How do I add the normal and specular to this material? Shouldn't OrgeMax provide all these during export.. seems the texture_unit is empty after diffuse.jpg. Can I fix this manually if so how do I do that?

Thanks
Garibalde
VIRMED Simulation Technologies Inc.
http://www.virmed.com
xrgo
OGRE Expert User
OGRE Expert User
Posts: 1148
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile
x 168

Re: How to load Normal, Specular material with Ogre

Post by xrgo »

Ogre 1.X uses fixed function pipeline, so you can't have normal maps without shaders (I think specular should work, not sure)...
So you have to use a material that uses shaders, see the samples, I think there are some shaders around that support normals
OR!! use RTSS, it will generate the shaders for you, but I have no experience with it... so I am not sure how easy or well will work
OR!! use ogre 2.1, will work out of the box, but you have think PBR
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to load Normal, Specular material with Ogre

Post by paroj »

for using normal maps see "RTShader::NormalMapLighting" part in the ShaderSystem sample. Specular maps are currently not supported by the RTSS. Feel free to extend ;)
Post Reply