Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#4766 closed defect (fixed)

Light problem on some biomes

Reported by: fatherbushido Owned by: elexis
Priority: Should Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch:

Description (last modified by fatherbushido)

On r20135 with Islands random map, I can't see anything. Perhaps that's just a false alert (issue with my graphic drivers). In that case, sorry for the noise. Some examples:

Attachments (3)

screenshot0070.png (267.1 KB ) - added by fatherbushido 7 years ago.
screenshot0071.png (750.5 KB ) - added by fatherbushido 7 years ago.
screenshot0072.png (909.4 KB ) - added by fatherbushido 7 years ago.

Download all attachments as: .zip

Change History (11)

by fatherbushido, 7 years ago

Attachment: screenshot0070.png added

by fatherbushido, 7 years ago

Attachment: screenshot0071.png added

by fatherbushido, 7 years ago

Attachment: screenshot0072.png added

comment:1 by fatherbushido, 7 years ago

Description: modified (diff)

comment:2 by elexis, 7 years ago

Replay?

comment:3 by elexis, 7 years ago

Ah, it's the Move environment biome constants from JS to JSON. part of r20129. I forgot that the environment setters are not only direct copies but compute something:

function setPPSaturation(s)
{
	g_Environment.Postproc.Saturation = s * 2;
}

I couldn't reproduce the alien abduction scenario on the first screenshot and the biomes look indistinguishable from a22 ones on many zoom levels. I expect all differences to be fixed by addressing that issue though.

(15 environment functions are copy functions, 5 are not)

Last edited 7 years ago by elexis (previous) (diff)

comment:4 by elexis, 7 years ago

Milestone: BacklogAlpha 23
Summary: Light problem on some mapsLight problem on some biomes

Ok the alien abduction biome is Desert. I didn't notice these things as I had GLSL disabled.

There are two nearby options how to proceed:

1) Use the JS function calls that consume arguments between 0 and 1
Advantage: These PostProcessing and FogFactor values can be compared across maps and biomes.

2) Use the JSON values computed from those JS functions
Advantage: JSON should be used where possible and JS only for actual biome dependent code logic.

And a more evolved option:

3) Remove the computation in the setter functions completely
Advantage: Values can be compared across maps and biomes and numbers are only in JSON

In fact Skirmish and Scenario maps already specify the computed numbers (not the 0 to 1 range), for example <FogFactor>0.000996094</FogFactor>

3)b) Move the computation to the Renderer function that consume the numbers and change the every map of every map type to consume numbers between 0 and 1.

I'm not sure if 3)b) is something we actually want to go into. At least it should be clear now that the JSON/XML numbers are different from the JS function numbers, so there is no danger of confusion.

If someone thinks that's an improvement we should, it can be done (but will require changing hundreds and hundreds of maps for no reason IMO).

Hence going with the 9 hunk patch (2) instead of the 150 hunk patch (3b) until someone cares.

Thanks for reporting!

comment:5 by elexis, 7 years ago

Also, there is #4626 to disable fogging entirely (and I'm surprised we don't have a ticket for fog being too thick on too many maps, it wasn't reported rarely).

comment:6 by elexis, 7 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 20140:

Fix missing conversion of biome environment constants in rP20129 as reported by fatherbushido, fixes #4766.
Remove wrong defaultbiome copypasta.

comment:7 by fatherbushido, 7 years ago

Thx, works fine

comment:8 by elexis, 6 years ago

In 21333:

Fix bloom on Persian Highlands following rP21090, refs #4766, #4954.

Note: See TracTickets for help on using tickets.