Very dark spheremaps
Moderator: Mod Contributor
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Very dark spheremaps
The generated spheremaps in .pu/textures/backgrounds, which now are .dds mime type, are extremely dark; almost black, most of them.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Developer
- Posts: 2150
- Joined: Mon Apr 23, 2007 1:17 am
- Location: Pennsylvania
- Contact:
the sphere maps that are generated are not dds, they are png files. They are generated from dds files, which barely differ from the originals. I didn't see such a variance in the generated spheremaps.
can you post a side by side on here? they are pngs so it shouldn't be hard. just do one with the current backgrounds, delete ~/.vegastrike/textures/backgrounds then replace the background images with the previous versions, then regenerate the spheremaps.
can you post a side by side on here? they are pngs so it shouldn't be hard. just do one with the current backgrounds, delete ~/.vegastrike/textures/backgrounds then replace the background images with the previous versions, then regenerate the spheremaps.
Ed Sweetman endorses this message.
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Very true; my mistake. They are png's. Still, they are darkened for no good reason I can see. The shader could do a better job of darkening environment mapping, at floating point precision. Darkening the generated spheremaps at 8-bit per channel is plain dumb and should be stopped, and change the shaders instead.safemode wrote:the sphere maps that are generated are not dds, they are png files.
Examples: I'll just show the "front" texture for each background, to save time and bandwidth, but you'll get my meaning:
Blue front:
Generated blue light:
Orange front:
Generated orange light:
Somered front:
Generated somered light:
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Developer
- Posts: 2150
- Joined: Mon Apr 23, 2007 1:17 am
- Location: Pennsylvania
- Contact:
ok, so just so it's clear. This has nothing to do with DDS.
I dont mind the idea of fixing the brightness of the generated files, I just dont want to be attacked by people thinking it's a DDS related problem and then someone get all trigger happy and replace the background images with png's.
I dont mind the idea of fixing the brightness of the generated files, I just dont want to be attacked by people thinking it's a DDS related problem and then someone get all trigger happy and replace the background images with png's.
Ed Sweetman endorses this message.
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
No, that's right; this is unrelated to dds.
Just the code darkening the backgrounds. It's a mightily BAD idea. Wasting one or two bits of color precision out of a scant 8 is dumb, dumb, DUMB!
No wonder specular reflections look like crap in vegastrike...
Those spheremaps should, in fact, be normalized up to maximum brighness possible without saturating, and it should be the shader that turns down the brightness, at its higher internal precision. That's why GPU's do all their calculations at higher precision, and then dither the result before quantizing back to screen bit-depth; so that there's a single point where quantization happens. 8-bits per channel for textures is bad enough, but what we're doing is putting horrible quantization right at the input; --using only 6 bits per channel of the 8 available.
Just the code darkening the backgrounds. It's a mightily BAD idea. Wasting one or two bits of color precision out of a scant 8 is dumb, dumb, DUMB!
No wonder specular reflections look like crap in vegastrike...
Those spheremaps should, in fact, be normalized up to maximum brighness possible without saturating, and it should be the shader that turns down the brightness, at its higher internal precision. That's why GPU's do all their calculations at higher precision, and then dither the result before quantizing back to screen bit-depth; so that there's a single point where quantization happens. 8-bits per channel for textures is bad enough, but what we're doing is putting horrible quantization right at the input; --using only 6 bits per channel of the 8 available.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Lead Network Developer
- Posts: 2560
- Joined: Sun Jan 12, 2003 9:13 am
- Location: Palo Alto CA
- Contact:
Keep in mind that the code for that was probably written back in the day before shaders were used for general things like this.
Definitely should be possible to do this in a shader... what should happen if shaders are disabled (an old card, etc)? Is there any other way of darkening them on the GPU without the shader?
Definitely should be possible to do this in a shader... what should happen if shaders are disabled (an old card, etc)? Is there any other way of darkening them on the GPU without the shader?
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Touche. Sorry about the ranting.ace123 wrote:Keep in mind that the code for that was probably written back in the day before shaders were used for general things like this.
I'm kind of rusty on OGL, but I'm 99% sure it should be easy. Perhaps using gamma control while writing the background.Definitely should be possible to do this in a shader... what should happen if shaders are disabled (an old card, etc)? Is there any other way of darkening them on the GPU without the shader?
If worse comes to worst, in the absence of shaders, one could darken the loaded texture in code, prior to sending it to ogl. Important thing would be to darken by a power of two (50% or 25%) and use dithering. I got code for you, if you need, for dithering a color so that more precision is reserved for luma at the expense of increased chroma jitter; since our eyes are much more sensitive to luma artifacts than chroma ones.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
I just heard a rumor there's a "reflection" attribute in xmesh. If it's true, envColor is set in code to 1,1,1,0; if false then 0.5,0.5,0.5,1.0. envColor is used to modulate env mapping color. Not sure how this is handled when there's no shader support, but in any case, change that to if false 0.25,0.25,0.25,1.0 and you can crank up the spheremap colors, I venture.
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
-
- Elite
- Posts: 8014
- Joined: Fri Sep 05, 2003 4:03 am
- Location: Montreal
- Contact:
Alright, I have a proposal to deal with the problems of dark textures and color precision across the board. But it deserves its own new thread, so here it is:
http://vegastrike.sourceforge.net/forum ... hp?t=10973
http://vegastrike.sourceforge.net/forum ... hp?t=10973
Latest version of Cinemut Opaque
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.
Latest version of LaGrande noodleworks (scroll down).
An evolving La Grande How-To...
The non-working, but latest, CineMut test_bike
PU (Privateer: Parallel Universe's Home). WC or Privateer Drayman for you?
WCpedia --The Wing Commander Encyclopedia-- From Angel Deveraux through Belisarius to Zachary Banfeld...
WC Nexus forum, the Moonbase Tycho of WC fans.