[b][color=#FF8000]Fix[/color][/b] wrote:For what i know (LuckyBoy may correct me if I'm wrong here There are 2 lightmaps : the one on your computer (also used on solo tracks), and the one saved in the map.Gbx, shared and downloaded by other users in multiplayer.
-You compute in very high and ultra, you have nice antialisaing, bounces, etc... and your lightmap is stored as .dds and is 4096x4096 or 2048x2048 big.
-When you save your map, it's a 1024x1024 .jpg version that is saved. so, if you map is very big, You'll have artifacts that will show up because of the lower texel ratio.
[b][color=#FF8000]LuckyBoy[/color][/b] wrote:What we call lightmap is the storage of ambient and local lighting.
This information is quite complex to compute (ambient requires many samples from the whole scene, several bounces, each local light requires shadow), and because game content can be very different in maniaplanet (can be quite complex in geometry and local lights number), we made the choice of precomputing this data.
(Some games dynamically compute this data, but quality is reduced, for instance 1 bounce and only for sun, and only few local close shadows)
Then lightmap are stored to disk to be re-used during multiplayer.
Yet they can be stored in 2 ways:
a) a "local" full res. (2k or 4k for ultra), full bump (3 maps), cache stored in "ProgramData\ManiaPlanet\Cache\"
size is around 5.5Mb (20Mb for ultra).
By "local" I mean the cache WILL NEVER be transfered by P2P.
b) a "embedded" small res. (1k), bump intes (1 average map, 1 bump_intens map), cache embedded in the map file
size is around 500Kb.
cache (b) is required to play the map in multiplayer, this is the default behaviour.
cache (a) may be used even in multiplayer, only if this cache has been computed locally before.
About quality difference, obviously due to it's smaller storage (smaller res. and heavier compression), embedded cache quality is lower.
But it's important to note that compute quality and storage quality are two different things, when lightmap are computed in a given quality (say high for instance), both local and embedded cache are updated (embedded is stored when map is saved) from the same compute quality, yet embedded cache looses quality due to its compression.
Again about quality, in the screens you give, one can see horizontal red lines on the dark wall, this is due to block margin in the lightmap space. The cause is the image compression (jpg or webp) which doesn't like sharp color variations, and because beside this block wall side may be allocated the opposite side (facing to more light), the 2 sides blurs on each other.
This compute a lightmap local light list each time a map is loaded (never stored to disk), to renderWhat does the "light index of lightmaps" setting do? I didn't check it when I did my test.
dynamic local speculars.
Another interesting thing is you can let ManiaPlanet calculate lightmaps in a batch job:[b][color=#FF8000]Fix[/color][/b] wrote:Ultra is really better : more bounces, more sampling.
It's smoother, more accurate and can fix a lot of contrasted noisy effects (especially in tunnels).
[b][color=#FF0000]jonthekiller[/color][/b] wrote:It's already possible. It will compute all maps in My Maps folder.slugish wrote: Additionally, I have a request. Since each recent update has required the recomputation of shadows for maps, is there a way to compute shadows on maps in a specified folder via the command line? I realize that I can compute shadows on all user maps, and did it this way for the last update. It is just somewhat confusing to move all of my maps to a backup folder and place only the ones needed in the maps folder to be computed. I have many half-finished and proof of concept maps that I don't need to recompute each time.
LmQuality (Fast, Default, High, Ultra).Code: Select all
ManiaPlanet.exe /computeallshadows /useronly /collections=Storm /LmQuality=High
It will launch the game and compute all maps.
[b][color=#FF8000]Alinoa[/color][/b] wrote:About the LP computing, Jon explained it well and you can also specify some options. For example:
/useronly (only lightmaps calculated on players' tracks)
/LmQuality=Fast
/LmQuality=Default
/LmQuality=High
/collections=Storm
/collections=Storm,Canyon
w1lla wrote:How to launch it? Try a .bat file
Note: Please do not forget to update the drive and the folders accordingly to your own system in the batch!Code: Select all
SET CurrentDir=%~dp0 cd "C:\Program Files\ManiaPlanet" "C:\Program Files\ManiaPlanet\ManiaPlanet.exe" /LmQuality=Fast pause
niarfman wrote: There is the possibility to use a batch script to make run the shadows calculation for all the maps which are located in the subfolder GameData\Maps of the location of ManiaPlanet.exe.
It is also possible to create a shortcut to the executable ManiaPlanet.exe and to adapt it like this:The time necessary for the lightmap (shadows) calculation in Ultra mode is about 15 to 20 minutes for each map.Code: Select all
Target: "C:\Program Files\ManiaPlanet\ManiaPlanet.exe" /LmQuality=Fast Start in: "C:\Program Files\ManiaPlanet"
Using a GeForce will be (edit: somehow) faster than using a Radeon. The script is optimized for nVidia-cuda !
A map where the lightmap already has been calculated with a specific quality will not be updated when you launch the script again. It will be considered as already processed.
A map where the lightmap quality was already calculated with a lower quality will be processed again with the requested quality.
A map which was already calculated with a higher quality will not be taken into account.
jonthekiller wrote:The game is more optimized for Nvidia, the studio works with Nvidia cards essentially.
[b][color=#FF8000]LuckyBoy[/color][/b] wrote:To make things a bit clearer, computed shadows with at least "Fast Quality" are saved as separate files in your cache folder (also used by p2p downloads), if the current map is "bound to a file" (this is the case when you just load a map from a file, but not when you've edited a loaded map and not saved it yet).eyebo wrote:High and Ultra shadows are always saved in your cache. So these will disappear if you clear your cache. Only default quality shadows are saved in map files. This is apparently desired functionality, from what communications I've had with Nadeo about it. The higher quality shadows in the cache still provide more calculations for the default shadows saved in the map file. So quality is still increased by calculating them. But this would explain why the shadows might disappear after cleaning your cache.zarexz wrote:Shadows also seem to get lost after cleaning your cache but I can't put my finger on it yet.
Fortunately, if you load a map, edit it, compute shadows, and then save, the locals cache will be saved at the map save point (because they're up-to-date).
Indeed if you clean your cache, you'll loose all your local shadow caches, but the embedded caches in the map won't be lost. This mean you'll still be able to play with the maps on multiplayer, but in the map editor, the compute dialog will display that nothing has been computed (this dialog ignores the embedded cache).
Thanks
Current games for the /collections= switch are:[b][color=#FF8000]Fix[/color][/b] wrote:The screenshots show no normal map bumpmapping, so it's not the highest.
lightmap bump is automatically ON with the very nice settings (oops my bad, a while while ago it was a separate checkbox), but you can have a temporary lightmap that stores local light specularity.
(not saved on disk because it is heavy, so it's computed everytime you open a map, but it looks sexy).
launcher>advanced>compatibility>lightindex (bellow ultra lightmap)
Canyon
Stadium
Storm
HaagseSmurf wrote:We used this code for our Royal Server and computed all maps (thx to W1lla)
orCode: Select all
ManiaPlanet.exe /computeallshadows /useronly /fullcheck /LmQuality=High
orCode: Select all
ManiaPlanet.exe /computeallshadows /useronly /fullcheck /LmQuality=Default
Good luckCode: Select all
ManiaPlanet.exe /computeallshadows /useronly /fullcheck /LmQuality=Low