Skybox bit depth.

Discuss artwork in all of its forms here, from level design to GUI button themes. New MODs planning, work-in-progress and other samples are welcome in this forum as well.
Post Reply
HWGuy
Posts:95
Joined:2011-05-31, 07:37
Skybox bit depth.

Post by HWGuy » 2012-03-24, 01:36

Right now my skyboxes look pretty bad because of the low bit depth, they're 24-bit pngs but the game looks to turn them down to 16-bit which makes them pretty ugly.

Anyone know a fix for this?

In the future HDR skyboxes would be nice, although they use a fair amount of vram.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Skybox bit depth.

Post by Carsten » 2012-03-24, 10:57

HWGuy wrote:Right now my skyboxes look pretty bad because of the low bit depth, they're 24-bit pngs but the game looks to turn them down to 16-bit which makes them pretty ugly.
Is this the same with the sky textures that ship with the DeathMatch demo? (they're 24-bit png's as well)

All graphics output is reduced to 16 BPP if you set a 16 BPP video mode in the game menu (Options, Video Settings). Please check this setting, the Cafu engine does not do this on purpose.
Best regards,
Carsten
HWGuy
Posts:95
Joined:2011-05-31, 07:37

Re: Skybox bit depth.

Post by HWGuy » 2012-03-24, 11:55

Ya bit depth is correct.
http://i.imgur.com/TsRpW.jpg
Here's on the tech demo map, very obvious banding on the gradient background, the original PNGs are just fine.
I'm guessing it's because the engine converts it down too much, gotta change that so the renderer has a better image to display.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Skybox bit depth.

Post by Carsten » 2012-03-24, 13:05

Ah, I see. Texture compression is the problem.
Please add noCompression to the cubeMap spec in the material definition, e.g.:

Code: Select all

Textures/SkyDomes/PK_BrightDay2
{
    AmbientShader A_SkyDome
    LightShader   none      // == noDynLight

    // The '#' in the next line is auto-replaced with the relevant suffixes (_px, _ny, ...).
    cubeMap Textures/SkyDomes/PK_BrightDay2#.png, wrapS clampToEdge, wrapT clampToEdge, noCompression

    // [...]
}
Best regards,
Carsten
HWGuy
Posts:95
Joined:2011-05-31, 07:37

Re: Skybox bit depth.

Post by HWGuy » 2012-03-24, 23:48

Ahh, there we go, looks perfect now.

You might as well svn that change, even midrange 2003 graphics cards have enough vram to fit a big uncompressed skybox.
Segway - When Cafu stable comes out, will you then have two svn branches? Stable and testing would be good since experimental patches can be played with and ensured to work perfectly before committing to stable.
User avatar
Carsten
Site Admin
Posts:2170
Joined:2004-08-19, 13:46
Location:Germany
Contact:

Re: Skybox bit depth.

Post by Carsten » 2012-03-25, 11:28

HWGuy wrote:You might as well svn that change, even midrange 2003 graphics cards have enough vram to fit a big uncompressed skybox.
Well, I'm somewhat reluctant doing that:
The OpenGL API provides no way to learn the used amount of physical video RAM, and at the same time our "other" textures, which are all loaded to video RAM at the same time, require a big amount as well.

The proper solution would be to provide a "Video Quality" setting in the game options menu, but currently I have no spare time to implement it myself.
Segway - When Cafu stable comes out, will you then have two svn branches? Stable and testing would be good since experimental patches can be played with and ensured to work perfectly before committing to stable.
The plan is to just tag one of the current revisions in trunk as "stable", then proceed development normally.

However, we're planning to switch from Subversion to Git in the future, which will make both branching as well as local development (that is, development separately from the official Cafu Subversion repository) much easier: See the recently updated FAQ How do I locally clone the Cafu source code repository? for some details.
:up:
Best regards,
Carsten
HWGuy
Posts:95
Joined:2011-05-31, 07:37

Re: Skybox bit depth.

Post by HWGuy » 2012-03-25, 14:40

Good to hear you're moving to Git, much better than Svn.

Could have a little patch so noCompression flag is simply ignored when graphics are set to medium/low... I'll bother someone to look into it when they have the time.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests