2D graphic problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
baobab

2D graphic problem

Post by baobab »

Hello,

I am trying to draw some simple Bitmap with the 2D tutorial.
When I draw my bitmap under photoshop, they are pretty smooth and good looking.
But when I load it with the 2D function they appear blurry. Like if resolution have been changed...

I mean when i load a 800x600 bitmap in a 800x600 window, my graphics looks very bad.
It exactly the same with

Does anyone already have this problem ??
jordanXXX
Posts: 13
Joined: Sun Apr 25, 2004 4:28 am

Post by jordanXXX »

just make a 1024X1024 bitmap then it will be better :)
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

1. Don't save in BMP, the format isn't good for texture quality.
2. It's best to split up textures into smaller files rather than one big texture. 4 textures at size 200x150 looks better than one texture at size 800x600.

Using a bigger texture won't help because you can't scale a texture in Irrlicht, even if you could it would look blurred.
Evil Mr Sock
Posts: 37
Joined: Fri Jul 02, 2004 5:36 pm
Location: Albany, NY
Contact:

Post by Evil Mr Sock »

no, I have this problem too, and the responses so far aren't making sense. I'd appreciate this issue being reexamined.

First off, bitmaps are the best format for QUALITY (not performance), hands down, no excuses, because there is zero compression - all the information is saved for each pixel, in order, no matter what its contents or location. The issue isn't with textures, it's with displaying straight bitmaps.

Secondly, it's not a scaling issue - that's exactly the point, the images aren't being scaled and they look like poop. Here's a before and after (yes the graphics are laughable, i'm just throwing in demo art at this point...)

The left is Irrlicht, with 3 layers of bitmaps and a font on top. The right is Photoshop, same files, same font, same setup. Anyone who know what causes this, please respond.

Image
------------------------------------------
A monkey poured coffee in my boots.
------------------------------------------
the_viking
Posts: 23
Joined: Fri Aug 06, 2004 12:28 pm

Post by the_viking »

First that i am thinking about this is that the renderer uses a lower mip map from that texture... The blocking could be switched off by using 32bit instead of 16bit for textures.

If you made the font with the IrrFontTool and under WindowsXP, try switching off XP's Build-in font smoothing... ( Display Properties => Display => "Effects..." ) and rebuild the font, irrlicht clampes grey to black-and-white BITmaps for fonts.. anywhere there was a thread for customizing the renderer to use also smoothed fonts by enabling blending instead of alpha masking.
mister-me
Posts: 1
Joined: Wed Jul 07, 2004 1:12 am

Post by mister-me »

The problem with the image quality is most likely because you are not using a power of two for the image size. Just put that bitmap on the top left-hand corner of a blank 1024x1024 bitmap and it should look right in Irrlicht.[/img]
Amphine

Post by Amphine »

Is using large textures like this considered bad practice? I've read that compatibility issues with some graphics cards may be an issue. That is, some cards only support textures up to a certain size. Are most newer cards capable of supporting big textures?
Guest

Post by Guest »

Amphine wrote:Is using large textures like this considered bad practice? I've read that compatibility issues with some graphics cards may be an issue. That is, some cards only support textures up to a certain size. Are most newer cards capable of supporting big textures?
i believe older cards had a 256*256 limit on texture size. not sure how old exactly, pre gf2 or so i would guess.

( nb: i don't know how cards work, but . . . )

so it is possible that an old card might display a high res texture as is done above _if_ it were to resample the texture at every nth pixel; in order to reduce it's size to somthing below it's limit.

ie for a 256*256 limit, a card might take a 1024*1024 image and just take every 4th pixel to make a new 256*256 texture.
Guest

Post by Guest »

To summarize how to put all of these comments together, to fix the problem:

I was having EXACTLY the same problem with my background images and fonts -- both were fuzzy and looked like poo.

My background image was a 1024x768 bitmaps -- I broke it down into 3 1024x256 bitmaps (so everything would be a power of 2), and it looks much sharper.

Also, I turned off Clear Type font smoothing (Display Properties -> Appearances -> Effects), regenerated my font files, and then the fonts were perfectly visible, as well.

I now have high-quality bitmaps and fonts that look good.
Post Reply