Sign in to follow this  
Marco H

Textures are looking pretty bad - what to do?

Recommended Posts

Hello again, I have got another problem: in my game, all textures look like being drawn with only 256 colors, but in fact I have set the color-depth to 16bit. What could I be doing wrong? I checked all my texture-loading-methods and everything is set to good quality. So does anyone have an idea what could be going wrong? Thanks in advance, Marco

Share this post


Link to post
Share on other sites
It is the following:

	static PIXELFORMATDESCRIPTOR pfd=
{
sizeof(PIXELFORMATDESCRIPTOR),
// set size
1, // version number
PFD_DRAW_TO_WINDOW |
// visible in windows
PFD_SUPPORT_OPENGL |
// OpenGL has to be supported
PFD_DOUBLEBUFFER,
// Double Buffering has to be supported
PFD_TYPE_RGBA,
// RGBA support
bits,
// color-depth, where I set 16bit or 32bit
0, 0, 0, 0, 0, 0, // don't know
0, // no alpha buffer
0, // ignore Shift Bit
0, // no Accumulation Buffer
0, 0, 0, 0, // don't know
16, // 16Bit Z-Buffer (Depth Buffer)
0, // no Stencil Buffer
0, // no Auxiliary Buffer
PFD_MAIN_PLANE,
// where to draw later
0, // don't know
0, 0, 0 // also don't know
};


Is there something wrong? To be honest, I do not know much about Windows initialisation...

Share this post


Link to post
Share on other sites
I think that what you call "256 colors" are instead 16 bits color.
They are not as bad as using 256 colors, but they sure look bad.
As lc_overlord suggests, try setting bits to 32.

Share this post


Link to post
Share on other sites
The value of bits is 16, but even if I set it to 32, it still looks quite bad. I have a screenshot for you, perhaps you see anything...

http://flyserver.homelinux.com/marcoh/imgs/tex_quality.jpg

As you can see, the background has a bad quality, but the picture is not stretched or anything, just the normal size.

Share this post


Link to post
Share on other sites
What does your glTexImage call look like? I bet it looks like:
glTexImage2d(GL_TEXTURE_2D, 0, 3, width, height, 0, format, type, pixels);
or
glTexImage2d(GL_TEXTURE_2D, 0, 4, width, height, 0, format, type, pixels);
3 and 4 are deprecated as values for internal format. You should be using the symbolic constants. 3 is equivalent to GL_RGB and 4 is equivalent to GL_RGBA. Both of these tell OpenGL that you just want the listed components, and don't care about how many bits it uses for storage. Try GL_RGB8 or GL_RGBA8, which hint to OpenGL that you want 24/32 bit colour internally, although you are not guaranteed to get what you ask for.

Enigma

Share this post


Link to post
Share on other sites
Instead of using glTexImage2d I am using gluBuild2DMipmaps(), perhaps that plays a role (I also tried unsing GL_RGBA8, but it had no effect)? What other reason could exist for those bad textures?

I checked all my drawing code, but there is nothing to change. All textures are loaded with high quality and the correction hint is set to nicest...

...anyone has another idea?

Share this post


Link to post
Share on other sites
No idea, You could try to look at the settings in your graphics card driver, if anything there is set to 16 bit instead of 32 bits, change it.

IF that does not work, scan trough your code looking for things that are set to 16 bits.

If nothing works then you have to send in two screenshots(one at 16 bit color mode and one at 32).
allso the relevant raw texture(or a part of it if it's big).

You would allso have to post some source code, the PFD part and the texture generation part(the one with gluBuild2DMipmaps).

Perhaps then one of us could figure out something.

Share this post


Link to post
Share on other sites
Yes, that worked for me. Changing the display settings from fast to quality really had a good effect on the textures.

But only in fullscreen mode, as the else the color depth of the desktop is used (yes, I am using 16bit color depth, but I checked it in both modes before).

Good to know how powerful this nVidia console is, I always thought, that between the setting "quality" and "fast" is no visible difference...

...thanks for all you help :) Really nice forum.

Share this post


Link to post
Share on other sites
Quote:
Original post by Marco H
Good to know how powerful this nVidia console is, I always thought, that between the setting "quality" and "fast" is no visible difference.


It depends a little on the card, but if you have a GF6800Ultra card like me, there isn't mutch difference, but on older models there can be some differences.

It's allso so powerfull that you can make games look better than they ever where designed to be by adding FSAA and ansiotropic filtering(of cause, that requires atleast a fx card or higher).

BTW, you sould be using 32bits on your desktop, there is no reason not to.
32 bits can actuarly be faster than 16 since there is no need for dithereing images.

Share this post


Link to post
Share on other sites
Quote:
Original post by lc_overlord
It depends a little on the card, but if you have a GF6800Ultra card like me, there isn't mutch difference, but on older models there can be some differences.

I have a GeForce 4 ti 4800SE. It is a nice card, probably one of the best DirectX8 cards, but is does not support DirectX9 effects. But it is enough, as most actual games run with proper speed at proper resolution.

And thanks for the 32bit-on-desktop-tip, I have changed it now :)

Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this