Page 1 of 1

Bitmap does not show on model.?

Posted: Mon Apr 03, 2006 7:34 pm
by L0ngman
I exported a .mesh with .material from 3dmax and the xml converted it all ok.

Have put .mesh file in /media/models/
Have put .material file /media/materials/scripts/
and put .TGA bitmap in /media/materials/textures/

This is my material script:
material myTexture
{
technique
{
pass
{
ambient 0.8 0.0862745 0.223529
diffuse 0.8 0.0862745 0.223529
specular 0.9 0.9 0.9 0.0
emissive 0.0 0.0 0.0
texture_unit
{
texture PAT0127.TGA
}
}
}
}

Have my resources cfg file setup like this:
FileSystem=../../../../media
FileSystem=../../../../media/materials/programs
FileSystem=../../../../media/materials/scripts
FileSystem=../../../../media/materials/textures
FileSystem=../../../../media/models

The model displays the ambient/diffuse/specular colour shows, but the texture does not, even though the ogre log shows that the bitmap has been loaded:-
19:04:42: Mesh: Loading morphSpheres.mesh.
19:04:42: D3D9 : ***** Dimensions altered by the render system
19:04:42: D3D9 : ***** Source image dimensions : 123x121
19:04:42: D3D9 : ***** Texture dimensions : 128x128
19:04:42: Texture: PAT0127.TGA: Loading 1 faces(PF_R8G8B8,123x121x1) with 7 generated mipmaps from Image. Internal format is PF_X8R8G8B8,128x128x1.

Any help on why the texture part isn't showing would be appreciated.

Rich.

Posted: Mon Apr 03, 2006 8:44 pm
by Jerky
I would first change the resolution to 128x128. If that doesnt work, I would say try converting it to a differnt type, like png, just to test. If it works after that, then there is a problem with your targa file.

texture does not show up

Posted: Tue Apr 04, 2006 2:44 pm
by L0ngman
I changed the bitmap to another, jpegs this time, and edited the .material file.

None of the textures showed up, one made the model darker(odd), but couldn't see any texture.

Posted: Tue Apr 04, 2006 2:54 pm
by Nuker
Change the filename in the material script exactly to the filename of the texture (case sensitive) ...

Perhaps it works ...

C YA - []Nuker

Posted: Tue Apr 04, 2006 3:47 pm
by Lee04
UV mapping OK?
(OK some people will miss this....)

Posted: Tue Apr 04, 2006 5:31 pm
by Jerky
Jerky wrote:I would first change the resolution to 128x128.
Did you try my first suggestion? Some graphics cards do not like using textures that are not of the power of 2 (128x128, 256x256, 512x512, etc.).

Re:Textures not showing.

Posted: Tue Apr 04, 2006 7:01 pm
by L0ngman
Thanks for all the suggestions.

It seemed to be the scale of my model and tiling of the textures, combined with the mip maping or texture / anti aliasing of the engine. The texture was tiled so much and blurred it was barely visible.