Jump to content
EN
Play

Forum

Baked shadows in HTML5


 Share

Recommended Posts

Unfortunately, this feature was removed with the release of Hopper.

If you've ever played on Rio (either MM or standard) in HTML5, you might have noticed that graphically, it looks better than the other maps. Not all shadowed areas are the same color - crevices and corners where props meet are shaded darker, just like in real life. In addition, shadows will still be rendered even if the "dynamic shadows" graphics option is turned off in settings. You might also have noticed better performance compared with other maps of a similar size.

This is because Rio uses baked shadows, whereas other maps use realtime shadows. That is, while on other maps, shadow and lighting information is updated every frame (which incurs a significant performance cost), Rio's lighting information is precomputed and stored in a set of textures, called lightmaps, which are then projected onto all the surfaces of the map. Here's what one of Rio's lightmaps looks like (1024x1024):

Spoiler

lightmap-0_comp_light.webp

This feature was actually first added to the Arena map in update 593, described as a "experimental optimized lighting system," and was then added to Rio in update 604. The very first version of Iran, released in 2010, also had lighting effects baked into its textures, although it has now since been removed and replaced with a version without them.

Baked lighting can allow for more advanced graphical effects (such as radiosity and ambient occlusion) while still offering better performance than the current realtime lighting approach. Hopefully, other maps will receive the same treatment.

Edited by ThirdOnion
  • Like 9

Share this post


Link to post
Share on other sites

Baked shadows should be a graphics option, which would apply during loading time of a match. This would mean either creating a bunch of lightmaps or having an algorithm to bake the shadows in during loading so that the light maps don't need to be drawn.

Share this post


Link to post
Share on other sites

9 hours ago, DeathIsImminent said:

Baked shadows should be a graphics option, which would apply during loading time of a match.

Baking is a very resource intensive process and can take a very long time (hours), so creating lightmaps during loading times would be unfeasible. Lightmaps are typically generated during development and then shipped.

Edited by ThirdOnion

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...