Something that should be addressed (new map format)
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Something that should be addressed (new map format)
Ok, after doing a lot of experimention I have found what was washing out my textures...
It was the ground ambient color. I set it to 0 0 0 and all of a sudden everything looks uber sexy, however, there is a problem. Everything is very very dark.
To combat that I raised the sun position to a whopping 8 (y coord). Now everything looks absolutely awesome, however, one problem always leads to another.
In my experience with the old map format shadows on units (building shadows still work) dissappear if the sun position is above 1 (y coord), in the old format it wasn't that big of a deal. In the new format it is. It's a huge deal in fact.
Ground ambience actually serves a purpose now (though dubious at best). In my opinion the intensity of the sunlight must be given one hell of a serous kick in the ass.
I'm not real stock full on solutions atm, but I'm hoping that JC will catch what I'm trying to get across, know what is the cause, and what to do to correct it.
Also, raising the sun height poses yet even another problem. The higher the sun is, the more your sun direction ceases to matter. At a sun height of 8 it really doesn't matter where it's pointing because the shadows aren't really cast hardly any. Therefore the luminosity of the sun must be given a heck of a boost, so that it is more intense at lower heights.
At a sun height of 1, the sun should be as bright as it is now with a height of 10 (a la, high noon).
It was the ground ambient color. I set it to 0 0 0 and all of a sudden everything looks uber sexy, however, there is a problem. Everything is very very dark.
To combat that I raised the sun position to a whopping 8 (y coord). Now everything looks absolutely awesome, however, one problem always leads to another.
In my experience with the old map format shadows on units (building shadows still work) dissappear if the sun position is above 1 (y coord), in the old format it wasn't that big of a deal. In the new format it is. It's a huge deal in fact.
Ground ambience actually serves a purpose now (though dubious at best). In my opinion the intensity of the sunlight must be given one hell of a serous kick in the ass.
I'm not real stock full on solutions atm, but I'm hoping that JC will catch what I'm trying to get across, know what is the cause, and what to do to correct it.
Also, raising the sun height poses yet even another problem. The higher the sun is, the more your sun direction ceases to matter. At a sun height of 8 it really doesn't matter where it's pointing because the shadows aren't really cast hardly any. Therefore the luminosity of the sun must be given a heck of a boost, so that it is more intense at lower heights.
At a sun height of 1, the sun should be as bright as it is now with a height of 10 (a la, high noon).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
I understand that that is how it is coded, but that is not the case. There is a breakdown somewhere. 2 1 0 is nowhere near as bright as 2 10 0.jcnossen wrote:I'm not entirely sure what the problem is...
SunDir is the sun direction, which is normalized directly after loading it.
A sundir of (2 10 0) will be directly converted to (0.19 0.98 0) on start, so sundir.y > 1 can never really happen.
1 in this case should be as bright as 10 (the reason I say that is because in my experience, in the new map format, 10 is as bright as the original texture. I have an example at home that I will upload tonight).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
2 10 0: sun shines with an angle of 78,7, sin 78,7 = 0,98
2 1 0: sun shines with an angle of 26,6. sin 26,6 = 0,45
0,98/0,45 = 2,18.
What I just did was calculate the difference in lighting intensity with the two sun angles, if it would be a flat map. The 2 1 0 screenshot might well be a factor 2,18 darker than the 2 10 0 screenshot, so the lighting model really seems to work correctly.
I'll post a new map renderer build in a moment, I have the map lighting completely finished with specular lighting now, and it's looking very nice.
2 1 0: sun shines with an angle of 26,6. sin 26,6 = 0,45
0,98/0,45 = 2,18.
What I just did was calculate the difference in lighting intensity with the two sun angles, if it would be a flat map. The 2 1 0 screenshot might well be a factor 2,18 darker than the 2 10 0 screenshot, so the lighting model really seems to work correctly.
I'll post a new map renderer build in a moment, I have the map lighting completely finished with specular lighting now, and it's looking very nice.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
wow sweet :)
umm, atm I'm feeling a little dumb... Does what you said above point towards an issue or towards something else. I'm confused because you said that it defaults the height to 1 (or at least thats what I thought you meant), were you meaning something else than what I got from it?

Edit: Ok I just reread your post twice, and now I understand what you meant. Umm, so how do I get more luminosity without massively raising the suns y position?
umm, atm I'm feeling a little dumb... Does what you said above point towards an issue or towards something else. I'm confused because you said that it defaults the height to 1 (or at least thats what I thought you meant), were you meaning something else than what I got from it?



Edit: Ok I just reread your post twice, and now I understand what you meant. Umm, so how do I get more luminosity without massively raising the suns y position?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
SunDir does. not. change. the luminosity. All it changes is the angle of the sun.
What changes luminosity are those four tags:
GroundAmbientColor=0.1 0.1 0.1; //ambient (non sun lit) color of ground (and grass trees etc)
GroundSunColor=0.9 0.9 0.9; //color of ground where fully sun lit (added to ambient)
UnitAmbientColor=0.1 0.1 0.1; //ambient (non sun lit) color of units (and wreckage etc)
UnitSunColor=0.9 0.9 0.9; //color of units where fully sun lit (added to ambient)
So change both "...SunColor" to some very high values for stronly lit map and units, and with high "...SunColor" values and low "..AmbientColor" you get some strong contrast between lit area and shadow area.
If the XAmbientColor is higher or equal to XSunColor, then there is no difference between sun-lit and shadow, and map gets all ugly. Make sure that
XAmbientColor < XSunColor
and that :
XAmbientColor + XSunColor < 1
What changes luminosity are those four tags:
GroundAmbientColor=0.1 0.1 0.1; //ambient (non sun lit) color of ground (and grass trees etc)
GroundSunColor=0.9 0.9 0.9; //color of ground where fully sun lit (added to ambient)
UnitAmbientColor=0.1 0.1 0.1; //ambient (non sun lit) color of units (and wreckage etc)
UnitSunColor=0.9 0.9 0.9; //color of units where fully sun lit (added to ambient)
So change both "...SunColor" to some very high values for stronly lit map and units, and with high "...SunColor" values and low "..AmbientColor" you get some strong contrast between lit area and shadow area.
If the XAmbientColor is higher or equal to XSunColor, then there is no difference between sun-lit and shadow, and map gets all ugly. Make sure that
XAmbientColor < XSunColor
and that :
XAmbientColor + XSunColor < 1
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43