Shadow calculation and lightmaps explained

Talk about the track editor here

Moderator: English Moderator

User avatar
Zell
Posts: 205
Joined: 15 Jun 2010, 11:11
Location: Israel

Re: Shadow calculation and lightmaps explained

Post by Zell »

Hi. I finally got to computing shadows - it takes 3-5 minutes per map on high settings on my current setup.

Unfortunately 2 maps which are used in competitions today - Ironfist Spitfire and by Tatar - have passwords on them so I cannot go into the editor to calculate shadows... :|
Is there a way I can do this without having to create a .bat file?
Image [CMC]Zell
Windows 7 64bit
CPU: Intel i5-3550 @ 3.3GHz | GPU: Nvidia GeForce GTX 570 | RAM: 8GB DDR3 1600MHz
SSD: Cruzer M4 128GB | Display: 22" 1080p native resolution
User avatar
niarfman
Posts: 287
Joined: 07 Dec 2012, 10:46

Re: Shadow calculation and lightmaps explained

Post by niarfman »

Indeed, use the ingame script instead of the editor (see the first post of this thread)
Image
Ľѷҳ Choupa Oups! ツ
User avatar
Zell
Posts: 205
Joined: 15 Jun 2010, 11:11
Location: Israel

Re: Shadow calculation and lightmaps explained

Post by Zell »

Ok thanks.

Just a heads up to everyone: "C:\Program Files (x86)\ManiaPlanet\ManiaPlanetLauncher.exe" /LmQuality=Ultra did nothing.

But "C:\Program Files (x86)\ManiaPlanet\ManiaPlanetLauncher.exe" /computeallshadows /useronly /collections=Storm /LmQuality=Ultra opened maniaplanet in windowed mode and started computing shadows automatically.

It's much easier to do it this way, rather than one by one.. :thumbsup:
Image [CMC]Zell
Windows 7 64bit
CPU: Intel i5-3550 @ 3.3GHz | GPU: Nvidia GeForce GTX 570 | RAM: 8GB DDR3 1600MHz
SSD: Cruzer M4 128GB | Display: 22" 1080p native resolution
User avatar
niarfman
Posts: 287
Joined: 07 Dec 2012, 10:46

Re: Shadow calculation and lightmaps explained

Post by niarfman »

Hi !

Is it possible to enhance this script by adding an argument allowing to choose the folder to compute ?

For now we need to move the maps which we doesn't want to compute in an other folder. And some maps which are not in the Maps folder will also be compute. When using Ultra Quality, the needed time for each map is around 15-20 minutes on my computer (i7 2600k + Radeon 7950). Be able to compute ONLY desired maps will save me a lot of time ^^.

Thanks by advance
Image
Ľѷҳ Choupa Oups! ツ
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Shadow calculation and lightmaps explained

Post by TMarc »

niarfman wrote:Hi !

Is it possible to enhance this script by adding an argument allowing to choose the folder to compute ?

For now we need to move the maps which we doesn't want to compute in an other folder. And some maps which are not in the Maps folder will also be compute. When using Ultra Quality, the needed time for each map is around 15-20 minutes on my computer (i7 2600k + Radeon 7950). Be able to compute ONLY desired maps will save me a lot of time ^^.

Thanks by advance
As far as I know, there is no possibility to calculate the shadows of only a selected map by a commandline option.

You could use a batch to process only a list of files, but this means it would have to move away all the other files.
Doing it in a batch could be dangerous if there are issues, so a backup is always good.

It could be done like this:

C:\Users\MyUserName\Documents\ManiaPlanet\Maps\maplist.txt:

Code: Select all

Map1.Map.Gbx
Elite\Map_01.Map.Gbx
Storm\Map_03.Map.Gbx
batchproc.bat:

Code: Select all

rem create a backup
xcopy /s /e C:\Users\MyUserName\Documents\ManiaPlanet\Maps c:\Users\MyUserName\Documents\ManiaPlanetBackup

rem delete all maps
del /s /q /f C:\Users\MyUserName\Documents\ManiaPlanet\Maps\*.*

rem copy the maps to calculate back, quotes in case of blanks in file names
for /f "tokens=*" %i in (maplist.txt) do xcopy /s /e "C:\Users\MyUserName\Documents\ManiaPlanetBackup\Maps\%i" "C:\Users\MyUserName\Documents\ManiaPlanet\Maps\%i"

rem start shadow calculation
 "C:\Program Files (x86)\ManiaPlanet\ManiaPlanetLauncher.exe" /computeallshadows /useronly /collections=Storm /LmQuality=Ultra

rem copy backup files back, ignore newer ones with /d option
xcopy /d /s "c:\Users\MyUserName\Documents\ManiaPlanetBackup\Maps\*.*" "C:\Users\MyUserName\Documents\ManiaPlanet\Maps"
Attention, in the backup there will be still the older and not recalculated maps!
If you want to copy the newer files back, you can do it as well, but I recommend to do that in a second batch, after you have checked all the calculated maps are good.

backupupdate.bat:

Code: Select all

rem create a backup (or update the backup with newer files only)
xcopy /d /s /e C:\Users\MyUserName\Documents\ManiaPlanet\Maps c:\Users\MyUserName\Documents\ManiaPlanetBackup
User avatar
niarfman
Posts: 287
Joined: 07 Dec 2012, 10:46

Re: Shadow calculation and lightmaps explained

Post by niarfman »

Thanks for your answer, Tmarc.

Indeed, it's a workaround, but it's a big stuff for few things ^^

and it still compute hidden maps not in the folder but in compressed files.

My question was especially for LuckyBoy who is the one working on this good feature. An idea to enhance it :)
Image
Ľѷҳ Choupa Oups! ツ
User avatar
TMarc
Posts: 15255
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: Shadow calculation and lightmaps explained

Post by TMarc »

[b][color=#FF8000]LuckyBoy[/color][/b] wrote:
eyebo wrote:
zarexz wrote:Shadows also seem to get lost after cleaning your cache but I can't put my finger on it yet.
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.
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).
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
User avatar
niarfman
Posts: 287
Joined: 07 Dec 2012, 10:46

Re: Shadow calculation and lightmaps explained

Post by niarfman »

Stadium² is out now :3 :3 :3

I am computing old Stadium² Forever Maps to test them on Stadium² but the ingame script does nothing whith "/collections=TMStadium". But the maps can be computed by removing "collections" option.

Do someone find the correct keyword ?

And what is about the possibility to specify a specific folder to compute ... ?
Image
Ľѷҳ Choupa Oups! ツ
User avatar
jonthekiller
Translator
Translator
Posts: 4629
Joined: 15 Jun 2010, 11:07
Location: In Maniaplanet Alpha
Contact:

Re: Shadow calculation and lightmaps explained

Post by jonthekiller »

It's /collections=Stadium

For the folder I don't know.
Image
User avatar
niarfman
Posts: 287
Joined: 07 Dec 2012, 10:46

Re: Shadow calculation and lightmaps explained

Post by niarfman »

Nice thanks, it's working fine :yes:
Image
Ľѷҳ Choupa Oups! ツ
Post Reply

Return to “Track Editor”

Who is online

Users browsing this forum: No registered users and 2 guests