IGUIImage converts good qualitiy into bad :(

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
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

IGUIImage converts good qualitiy into bad :(

Post by Peter Müller »

Look at these pictures:

Image:
Image

Menu:
Image

I loaded the picture with setImage().
Can I load also good qualitiy with IGUIImage?[/img]
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Use images in sizes of base2 or quality will go down as the texture is loaded into video memory.

It also looks like your getting some majorly poor diffusion. Irrlicht used to load all textures in 16 bit mode even when video was set to 32 bit. There is a fix floating around here to fix it in 0.5 , but I thought that Niko corrected it in 0.6.
Crud, how do I do this again?
Ranix
Posts: 2
Joined: Fri Mar 26, 2004 4:19 am
Contact:

Post by Ranix »

I'm having the exact same problem. The texture quality doesn't change when I switch the video mode from 16 to 32 bit.

Any help would be appreciated.
thk.
Ranix
Posts: 2
Joined: Fri Mar 26, 2004 4:19 am
Contact:

Post by Ranix »

It looks like the quality of loaded images (.jpg, .gif) degrades SEVERELY when rendered with DirextX but it's perfect with OpenGL. OpenGL hates fonts though! What's a guy to do?

Software rendering runs these 2d elements fine, though...
thk.
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

@saigumi:
Use images in sizes of base2 or quality will go down as the texture is loaded into video memory.
How? Is it described in the documentation (I didn't look it up so far)?
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

To the power of two, he means. 2x2, 2x2x2, 2x2x2x2 etc. The X and Y of your pic should be to the power of two because textures load better at that size. That's why most people jam loads of small images into a 256x256 texture.
Guest

Post by Guest »

Oh, yea, I understand.
You mean textures with eg. 128x128, 256x256, 512x512 pixles? But do you real think, this will increase the quality?

But I'll trie it. Thanks!
Guest

Post by Guest »

Well, it definatly does. The optimum size is 256x256 or lower, you seem to lose quality when you use sizes of 512x512 or bigger, I don't know why. It's not a problem of Irrlicht, any textures you make for any game ( that I have seen ) need this, I think it is something to do with the way graphics are stored in the 3D cards memory.
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

I got it!
You must set driver->setTextureCreationFlag(USE_ALWAYS_32BIT, true) und disable OPTIMIZE_FOR_SPEED and USE_ALWAYS_16BIT).

Thanks to all who helped me!
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Cleves
Posts: 224
Joined: Mon Sep 08, 2003 6:40 pm

Post by Cleves »

Then what?
You can load every size you want without losing picture quailty? :D
rt
Posts: 150
Joined: Sun Nov 30, 2003 6:54 am
Location: canada
Contact:

Post by rt »

[subliminal message]use PNG images[/subliminal message]

http://irrlicht.sourceforge.net/phpBB2/ ... .php?t=517
Peter Müller
Posts: 292
Joined: Sun Mar 14, 2004 5:28 pm
Location: Germany
Contact:

Post by Peter Müller »

@cleves:
I think it increased the quality, but I'm not sure. Perhaps I only thought it
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Post Reply