Hi everyone,
in SDK i cant create new materials(bug or i dont know what - closing SDK while creating) so i write it.
i dont see any documentation about ogre meshes and lighting material files, so please help me
[java]
material Material/TEXFACE/windmill_diffuse
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.338824 0.338824 0.338824 1.000000
specular 0.500000 0.500000 0.500000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
lighting off
// Normal map
texture_unit
{
texture windmill_normal.tga
tex_coord_set 0
}
// Specular map
texture_unit
{
texture windmill_spec.tga
tex_coord_set 1
}
// Diffuse map
texture_unit
{
alpha_rejection greater 128
texture windmill_diffuse.tga
tex_coord_set 2
}
}
}
}
[/java]
without “lighting off” it just dont work(i see it gray). With “lighting off” it work like transparent normal(just as second transparent so i see it as "blue ;]).
[java]
Material Material/TEXFACE/windmill_diffuse : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
DiffuseMap : Models/objects/windmill/windmill_diffuse.tga
SpecularMap : Models/objects/windmill/windmill_spec.tga
NormalMap : Models/objects/windmill/windmill_normal.tga
GlowColor : 0.8 0.8 0.8 1.0
Specular : 0.4 0.4 0.4 1.0
Diffuse : 0.4 0.4 0.4 1.0
Ambient : 0.2 0.2 0.2 1.0
}
AdditionalRenderState {
}
}
[/java]
This is just gray(dont work)
if someone have good documentation/tutorial about doing material files with ligthing definition(for textures).
i will post my material it may help you:
Material lava : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
Shininess: 5.0
DiffuseMap: Flip Textures/LavaDiffuse.png
NormalMap: Flip Textures/LavaNormal.png
ParallaxMap: Flip Textures/LavaParallax.png
}
}
[java]Material Material/TEXFACE/windmill_diffuse : Common/MatDefs/Light/Lighting.j3md {
MaterialParameters {
Shininess: 5.0
DiffuseMap: Flip Models/objects/windmill/windmill_diffuse.tga
NormalMap: Flip Models/objects/windmill/windmill_normal.tga
}
}
[/java]
Still only “gray” ;/ i have name good becouse
[java]material Material/TEXFACE/windmill_diffuse
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.338824 0.338824 0.338824 1.000000
specular 0.500000 0.500000 0.500000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
lighting off
texture_unit
{
texture windmill_diffuse.jpg
colour_op modulate
}
}
}
}[/java]
it work for standard texturing…
yes i have tga and jpg file so it is nevermind
Edit:
Look like it work(only standard color texture), but i dont see diffrence from normal map(i mean i dont see normal map effects) ;/
[java]
material Material/TEXFACE/windmill_diffuse
{
receive_shadows on
technique
{
pass
{
ambient 0.500000 0.500000 0.500000 1.000000
diffuse 0.338824 0.338824 0.338824 1.000000
specular 0.500000 0.500000 0.500000 1.000000 12.500000
emissive 0.000000 0.000000 0.000000 1.000000
lighting off
texture_unit
{
texture windmill_diffuse.tga
}
normal_map
{
texture windmill_normal.tga
}
}
}
}[/java]