Bitmaps as textures

Problems building or running the engine, queries about how to use features etc.
User avatar
Snugglebear
Gnoblar
Posts: 22
Joined: Wed Oct 01, 2003 7:38 am
Location: California

Bitmaps as textures

Post 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.
User avatar
_mental_
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 419
Joined: Mon Jan 27, 2003 11:51 pm
Location: The Woodlands, TX

Post 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. :)
User avatar
Snugglebear
Gnoblar
Posts: 22
Joined: Wed Oct 01, 2003 7:38 am
Location: California

Post 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.
User avatar
leedgitar
OGRE Community Helper
OGRE Community Helper
Posts: 61
Joined: Wed Jan 22, 2003 1:58 am
Location: Baltimore, MD

Post 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... :)
User avatar
Snugglebear
Gnoblar
Posts: 22
Joined: Wed Oct 01, 2003 7:38 am
Location: California

Post by Snugglebear »

I usually kill trailing zeroes on habit. Numbering point releases past 9 makes no sense to me.
gpx1981
Gnoblar
Posts: 2
Joined: Thu Dec 25, 2003 9:15 am

Re: Bitmaps as textures

Post 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
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post 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.
gpx1981
Gnoblar
Posts: 2
Joined: Thu Dec 25, 2003 9:15 am

Post 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?
User avatar
Zongo
Gnoblar
Posts: 1
Joined: Sat Jan 24, 2004 8:59 am

Post 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
User avatar
Snugglebear
Gnoblar
Posts: 22
Joined: Wed Oct 01, 2003 7:38 am
Location: California

Post 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
Joe Yeh
Gnoblar
Posts: 1
Joined: Mon Aug 16, 2004 4:00 am

Post 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