Bitmap does not show on model.?

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
L0ngman
Gnoblar
Posts: 13
Joined: Sun Mar 26, 2006 11:00 pm

Bitmap does not show on model.?

Post 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.
User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post 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.
Erik Briggs (Jerky)
My Blog
Project Wish
Image
L0ngman
Gnoblar
Posts: 13
Joined: Sun Mar 26, 2006 11:00 pm

texture does not show up

Post 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.
Nuker
Gremlin
Posts: 195
Joined: Fri Mar 04, 2005 9:59 am
Location: Germany, BY
Contact:

Post by Nuker »

Change the filename in the material script exactly to the filename of the texture (case sensitive) ...

Perhaps it works ...

C YA - []Nuker
http://www.consulting-reif.de

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is
winning."
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

Post by Lee04 »

UV mapping OK?
(OK some people will miss this....)
Ph.D. student in game development
User avatar
Jerky
Orc Shaman
Posts: 791
Joined: Wed Mar 02, 2005 4:13 am
Location: Springville, Utah
Contact:

Post 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.).
Erik Briggs (Jerky)
My Blog
Project Wish
Image
L0ngman
Gnoblar
Posts: 13
Joined: Sun Mar 26, 2006 11:00 pm

Re:Textures not showing.

Post 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.
Post Reply