[F_]aths Profile Blog Joined February 2010 Germany 3934 Posts Last Edited: 2012-08-22 21:39:05 #1









Even though texture resolultion is set to "Ultra", the scene looks flat. This is because the Starcraft textures are intended to be used with bumpmapping. The bumpmappig technique uses a so-called normal map which contains angles instead of colors. This allows per pixel lighting: The angles from the normal map are compared to the angle of the directional light source to create light and shade effects. This requires and additional texture access (for the normal map) and some pixel shader calculations to perform a 'dot product' of the normal map's angles and the angle of the directional light. The result is a value which is used to be multiplied with the color from the base map's texture. Values below 1.0 darken the pixel's brightness, values above 1.0 make the pixel brighter. The new "low" mode looks as if bumpmappig is performed:











What you see however is rather static bumpmapping. The new alternate texture set was created with the assumption a particular angle for the directional light. The bumpmapping calculation was performed and the result was rendered into the resulting texture which is now used as the new base map. (Thanks to TL-user Existor who found that these textures are provided with patch 1.5 and not created during the map loading screen.)



Let's compare the difference to real bumpmapping. This is the new "low" setting in from another angle:











If you compare the images carefully, you see that the shiny and the dark areas stay where they are. They don't change in spite of the image rotation. In reality, they should change because the angle of the directional light is the same while the virtual camera (to record this image) has been rotated.



This is how the medium detail setting looks:











The bumpmapping effect seems to be much more subtle. The reason is that the medium details setting performs dynamic bumpmapping, it actually shades every pixel in real time considering the angle of the directional light source and the normal map which stores angle information for the according base map. On this angle the directional light source hits the surface in a way which does not produce too much shiny pixels, hence the subtle effect.



Also, "mid" uses per-pixel shading for minerals instead of just a base map, and shadow mapping is used. (Objects cast shadow, shaped by their own shape.) For shadow mapping, the client renders an additional depth buffer from the view of the light source and transforms it into screen space. Now the renderer can detect if a pixel is hit by the directional light and therefore fully lit, or not, and therefore just got the so called "ambient light" value.





Want the old mode back?



To restore the old mode for "low", change the Starcraft graphic option to "low", apply the change, then close Starcraft. Go to your documents folder and open the "Starcraft II" subfolder This is the old low mode:Even though texture resolultion is set to "Ultra", the scene looks flat. This is because the Starcraft textures are intended to be used with bumpmapping. The bumpmappig technique uses a so-called normal map which contains angles instead of colors. This allows per pixel lighting: The angles from the normal map are compared to the angle of the directional light source to create light and shade effects. This requires and additional texture access (for the normal map) and some pixel shader calculations to perform a 'dot product' of the normal map's angles and the angle of the directional light. The result is a value which is used to be multiplied with the color from the base map's texture. Values below 1.0 darken the pixel's brightness, values above 1.0 make the pixel brighter. The new "low" mode looks as if bumpmappig is performed:What you see however is rather static bumpmapping. The new alternate texture set was created with the assumption a particular angle for the directional light. The bumpmapping calculation was performed and the result was rendered into the resulting texture which is now used as the new base map. (Thanks to TL-user Existor who found that these textures are provided with patch 1.5 and not created during the map loading screen.)Let's compare the difference to real bumpmapping. This is the new "low" setting in from another angle:If you compare the images carefully, you see that the shiny and the dark areas stay where they are. They don't change in spite of the image rotation. In reality, they should change because the angle of the directional light is the same while the virtual camera (to record this image) has been rotated.This is how the medium detail setting looks:The bumpmapping effect seems to be much more subtle. The reason is that the medium details setting performs dynamic bumpmapping, it actually shades every pixel in real time considering the angle of the directional light source and the normal map which stores angle information for the according base map. On this angle the directional light source hits the surface in a way which does not produce too much shiny pixels, hence the subtle effect.Also, "mid" uses per-pixel shading for minerals instead of just a base map, and shadow mapping is used. (Objects cast shadow, shaped by their own shape.) For shadow mapping, the client renders an additional depth buffer from the view of the light source and transforms it into screen space. Now the renderer can detect if a pixel is hit by the directional light and therefore fully lit, or not, and therefore just got the so called "ambient light" value.To restore the old mode for "low", change the Starcraft graphic option to "low", apply the change, then close Starcraft. Go to your documents folder and open the "Starcraft II" subfolder and look for the Accounts folder and then go into the subfolder (a long number) and edit "Variables.txt". The new low mode is active with the line



alternateLowTextures=1



To restore the old mode, set it to 0 (zero).



alternateLowTextures=0



Save and close the file and launch Starcraft.





File format differences of the texture sets



The new low textures with included static bumpmapping only support low, medium and high texture resolution which can be set independent of the other settings. For ultra texture resolution you need to use at least "medium" graphics setting because only those textures support resultions of 1024x1024 per tile. The new alternate textures just offer 512x512 resolution per tile at maximum. For the default camera angle, 512x512 is good enough and you will notice no differences.



The new alternate low textures also come without an alpha channel while the standard textures come with alpha. The alpha channel is usually used for transparancy effects, but the alpha value for ground textures seems to be used for some lighting calculations and not for transparancy effects.





Benefit of the new mode



It is now possible to get at least static bumpmapping without an addtional texture access during the actual rendering of the game. On most low-end GPUs, texture access is quite costly because texture access requires precious bandwidth and video memory (while pixel shader calculations only require GPU-internal bandwidth.) While "low" also skips on shadow mapping and other neat technologies, the bumpmapping was the most obvious one. Patch 1.5 now allows graphics roughly comparable to "mid" because it uses textures which include a pre-made (and therefore, static) bumpmapping-like effect.



You actually get more details / content with the new low mode because the premade bumpmapping effect hints the non-uniform height of the surface.





What are the differences of high, ultra and extreme?



With "high", local light sources are supported. Any object which is rendered has a triangle shape, a square consists of two triangles. Since it would be quite an effort to consider each possible light for any processed triangle, a technique called "deferred lighting" (or "deferred shading", as a broader term) is used. In a nutshell, this reduced the lighting calculation to one combined pass (instead of one pass per light source) for the cost of some additional calculations for an additional buffer which stores the lighting information. With "high", vespene carrying worker units create a glow.



"Ultra" uses high dynamic range rendering. Instead of using a framebuffer target with 8 bit for each color component (red, green, blue) a target with 16 bit per component is used. To show this frame, it is converted into an 8-bit-per-component target, but until then, all lighting information is stored in higher precision. This allows a more accurate final image. Also some additional features like colored shadows are enabled. "Ultra" also enabled Parallax Mapping, an addition to bumpmapping which changes texture coordinates on a per-pixel-basis to create an apparent dent in the ground after a nuke hit.



"Extreme" does not affect actual ingame graphics beside single player 3D cutscenes and the 3D background of the main menu. With "extreme", indirect shadows are rendered with a trick. The cost to compute actual indirect shadow casting is unacceptable, so the game performs a check of the pixel's depth value (z-value) compared to it's neighbor's depth values. If a pixel is within an edge (surrounded by pixels which are closer to the camera) it is considered to be in an indirect shadow and therefore darkened.

and edit "Variables.txt". The new low mode is active with the linealternateLowTextures=1To restore the old mode, set it to 0 (zero).alternateLowTextures=0Save and close the file and launch Starcraft.The new low textures with included static bumpmapping only support low, medium and highwhich can be set independent of the other settings. For ultra texture resolution you need to use at least "medium" graphics setting because only those textures support resultions of 1024x1024 per tile. The new alternate textures just offer 512x512 resolution per tile at maximum. For the default camera angle, 512x512 is good enough and you will notice no differences.The new alternate low textures also come without an alpha channel while the standard textures come with alpha. The alpha channel is usually used for transparancy effects, but the alpha value for ground textures seems to be used for some lighting calculations and not for transparancy effects.It is now possible to get at least static bumpmapping without an addtional texture access during the actual rendering of the game. On most low-end GPUs, texture access is quite costly because texture access requires precious bandwidth and video memory (while pixel shader calculations only require GPU-internal bandwidth.) While "low" also skips on shadow mapping and other neat technologies, the bumpmapping was the most obvious one. Patch 1.5 now allows graphics roughly comparable to "mid" because it uses textures which include a pre-made (and therefore, static) bumpmapping-like effect.You actually get more details / content with the new low mode because the premade bumpmapping effect hints the non-uniform height of the surface.With "high", local light sources are supported. Any object which is rendered has a triangle shape, a square consists of two triangles. Since it would be quite an effort to consider each possible light for any processed triangle, a technique called "deferred lighting" (or "deferred shading", as a broader term) is used. In a nutshell, this reduced the lighting calculation to one combined pass (instead of one pass per light source) for the cost of some additional calculations for an additional buffer which stores the lighting information. With "high", vespene carrying worker units create a glow."Ultra" uses high dynamic range rendering. Instead of using a framebuffer target with 8 bit for each color component (red, green, blue) a target with 16 bit per component is used. To show this frame, it is converted into an 8-bit-per-component target, but until then, all lighting information is stored in higher precision. This allows a more accurate final image. Also some additional features like colored shadows are enabled. "Ultra" also enabled Parallax Mapping, an addition to bumpmapping which changes texture coordinates on a per-pixel-basis to create an apparent dent in the ground after a nuke hit."Extreme" does not affect actual ingame graphics beside single player 3D cutscenes and the 3D background of the main menu. With "extreme", indirect shadows are rendered with a trick. The cost to compute actual indirect shadow casting is unacceptable, so the game performs a check of the pixel's depth value (z-value) compared to it's neighbor's depth values. If a pixel is within an edge (surrounded by pixels which are closer to the camera) it is considered to be in an indirect shadow and therefore darkened. You don't choose to play zerg. The zerg choose you.