Page 1 of 1

Bitmaps as textures

Posted: Fri Dec 19, 2003 11:59 pm
by Snugglebear
Just a quick question here. The past few weeks I've been working on a GUI as part of a larger app. Since I'm no artist, a lot of the textures I made up were quick & dirty bitmaps in windows paint. However, when used to texture things in the GUI, they would always come out pure white. Yes, the materials were setup correctly and overlays done properly. Conversion of the bitmaps to JPEGs or PNGs result in correct behavior, so it's not an issue anymore. Still, the question lurks whether OGRE can use bitmap textures or not.

OGRE 12.2, VC6, ATI R9700p, cat 2.9, Win2000, and all sorts of different driver settings and bitmap types were tried.

Posted: Sat Dec 20, 2003 12:42 am
by _mental_
The 0.12.x versions do not support BMP's but the CVS version does. If you need to use a stable copy of OGRE I wouldn't recommend getting the CVS copy, but If BMP support is all you need you can apply the patch to 0.12.2 from here:

http://sourceforge.net/tracker/index.ph ... tid=302997

I'd highly recommend using jpegs and pngs instead though. :)

Posted: Sat Dec 20, 2003 6:14 am
by Snugglebear
That makes sense. I know they're rarely used, but bitmap support is something that's common enough for me to assume it's always there. It will be several weeks before I'm stuck using them over JPEGs or PNGs, so I'll wait for 13.

PS: Just noticed that on upgrading to the Catalyst 3.1s for my dev box (R7200, Win2k) that the Water demo is now hosed for materials Water6 and Water8. The only thing they share is a lack of a base water texture, as apparently they're just reflection mapped surfaces. In the demo they show up as pure white unless lighting is changed, in which case some shadows appear.

Posted: Sat Dec 20, 2003 9:11 pm
by leedgitar
Snugglebear wrote: PS: Just noticed that on upgrading to the Catalyst 3.1s for my dev box (R7200, Win2k) ...
I hope you meant Catalyst 3.10... :)

Posted: Sun Dec 21, 2003 4:07 am
by Snugglebear
I usually kill trailing zeroes on habit. Numbering point releases past 9 makes no sense to me.

Re: Bitmaps as textures

Posted: Wed Jan 28, 2004 9:54 am
by gpx1981
Snugglebear wrote:Just a quick question here. The past few weeks I've been working on a GUI as part of a larger app. Since I'm no artist, a lot of the textures I made up were quick & dirty bitmaps in windows paint. However, when used to texture things in the GUI, they would always come out pure white. Yes, the materials were setup correctly and overlays done properly. Conversion of the bitmaps to JPEGs or PNGs result in correct behavior, so it's not an issue anymore. Still, the question lurks whether OGRE can use bitmap textures or not.

OGRE 12.2, VC6, ATI R9700p, cat 2.9, Win2000, and all sorts of different driver settings and bitmap types were tried.
I also have this problem.Does anyone know how to solve it?
My material script:

Code: Select all

material Demo/Char
{
	technique
	{
		pass
		{
			scene_blend alpha_blend
			
			texture_unit
			{
				texture char.png
			}
		}
	}
}
Thx

Posted: Wed Jan 28, 2004 6:48 pm
by sinbad
The OP was talking about BMPs and you're clearly using a PNG, so you don't have the same problem per se. I suspect you've got the texture name wrong or it's not on your resource path - check Ogre.log for texture loading errors.

Posted: Thu Jan 29, 2004 3:34 am
by gpx1981
sinbad wrote:The OP was talking about BMPs and you're clearly using a PNG, so you don't have the same problem per se. I suspect you've got the texture name wrong or it's not on your resource path - check Ogre.log for texture loading errors.

Sorry I didn't describe my problem well.My problem is that when I set material to a GUI element,it will become a little unclear.
Below is my screen shot:
Image
The upper one is a copy of my original png image and the lower one is a panel container on overlay.As you can see,the lower is not very clear. :(
The OP mentioned that his texture will become "pure white".That why I thought it may be the same situation.It seems I got wrong. :oops:
But my problem still there.Do I loss anything?

Posted: Thu Jan 29, 2004 6:30 am
by Zongo
This looks like some filtering issue to me. You should probably try to set "filtering none" in your material texture_unit. The default is bilinear and could get this kind of result if your UI is sampled between texels.

HTH,
Eric

Posted: Thu Jan 29, 2004 6:45 am
by Snugglebear
Yeah, that does look like a filtering issue. The one I got is where the poly covered by the texture would be white, and I mean pure white. If you try to render something without a texture it will default to covering the object with white. Here's a good example of it from my last problem of OGRE misidentifying the capabilities of a Radeon 7200 and thus disallowing cube mapping on the water material. You'll notice that while white, it's still lit like and shaded like normal.

Image

Posted: Thu Jan 06, 2005 2:45 am
by Joe Yeh
I found why the texture is unclear.
You can find it on

Code: Select all

 Ogre Forums Forum Index -> Help -> Displaying bitmap files without stretch/filter in overlays
Joe Yeh