Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Build lighting from command line

Is it possible to build lighting of a map from command line?

Product Version: Not Selected
more ▼

asked Oct 28 '14 at 09:16 PM in Rendering

avatar image

217 16 23 29

avatar image jcoombs Jan 06 '15 at 09:23 PM

I have the same question. Anyone have an answer?

avatar image LeFxGuy Jan 12 '15 at 12:36 PM

Yep, me too :)

avatar image THREEONEZERO Mar 18 '15 at 08:02 PM

Would be great to know this as well...multiple people would like to know.

avatar image carbophoze Apr 03 '15 at 09:45 AM

i'm waiting too

avatar image petkovic Apr 23 '15 at 07:27 AM

i hope someone from unreal will answer this question?

what kind of support is this? i its not possible just say its not possible...

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

A new commandlet has been added to 4.10 to build lighmaps: https://github.com/EpicGames/UnrealEngine/commit/f89256dd0efb7d0b1427729a8f8a6007

Runs a lighting build for specific, or all, map(s). Reusing the ResavePackages commandlet. The commandline for the commandlet is:

ProjectName -run=resavepackages -buildlighting -allowcommandletrendering -map=optionalmapname

Script added to UAT to automate the process. The commandline for this is:

RebuildLightmaps -project="My:/Absolute/Project/Path.uproject" -MapsToRebuildLightMaps=OptionalMapName

more ▼

answered May 05 '16 at 03:25 PM

avatar image

217 16 23 29

avatar image mpo Jun 16 '16 at 11:05 PM

optionalmapname - Remember that this cannot be absolute path name, just map name ex: -map=ExampleMap OR -map=ExampleMap.umap, that is somewhere in Content directory.

Otherwise you will get an error: "DoesPackageExist: DoesPackageExist FAILED: '' is not a standard unreal filename or a long path name. Reason: Path should be no less than 4 characters long."

avatar image Ironbelly Aug 18 '16 at 10:49 PM

Is there no way to adjust the quality settings from the command line?

avatar image BubuElEngino Aug 23 '16 at 11:45 AM

I'm really interested to adjust quality settings too, or at least to know how the quality setting is chosen when building from cmd line.

avatar image Kafumanto Aug 23 '16 at 07:35 PM

It's forced to "Production Quality": https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/Editor/UnrealEd/Private/Commandlets/ContentCommandlets.cpp#L919

In the linked old source code it was configurable, then Epic changed its mind I suppose.

avatar image Ixiguis Oct 30 '18 at 09:18 PM

It is possible now, add the switch -Quality=Preview/Medium/High/Production.

Here's an example, the command I use:

 "C:\Unreal\UE_4.20\Engine\Binaries\Win64\UE4Editor-Cmd.exe" "D:\Documentos\Unreal Projects\Project\Project.uproject" -run=resavepackages -buildlighting -quality=Preview -allowcommandletrendering -map=MapName

MapName should not contain folders, even if it resides inside a subfolder. Just the map name.

avatar image DLejeune Feb 27 '19 at 03:34 AM

Is there a switch to have it save the sublevels as well? When I specify a map it does the build, and from the output I can tell that it's loaded the sub-levels for the specified map and they're effecting the bake, but when it saves it only saves the specified map, not its sub-levels, which is not tremendously useful.

avatar image RVillani Mar 30 '19 at 09:40 PM

I have the same problem as DLejeune on 4.21. On this post the OP says it was working fine on 4.19, saving sublevels. But it doesn't save them on 4.21.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Light can be rebuild from console by command like:

 UE4Editor.exe "C:\Work\Game\Game.uproject" Empty -AutomatedMapBuild CLDesc="Rebuilding Empty map" UseSCC=true

Also see:

more ▼

answered Jun 16 '15 at 12:33 PM

avatar image

111 6 10 21

avatar image iscaru1988 Jun 16 '15 at 02:34 PM

Is this possible now with that commandlet? Where do I indicate the map that I want to rebuild?

EDITED - OK I assume that I must replace the Empty word by my map name

avatar image Bozaro Jun 16 '15 at 02:45 PM
 UE4Editor.exe "C:\Work\Game\Game.uproject" Empty -AutomatedMapBuild CLDesc="Rebuilding SomeMapName map" UseSCC=true


  • -AutomatedMapBuild - Map rebuild option (Light, Navigation graph, eth)

  • Empty - Map name

  • CLDesc - Commit message

Stock 4.7 version require perforce (fixed by https://github.com/EpicGames/UnrealEngine/pull/1188 ).

But we must remember: you need video card for light calcuation.

avatar image Kafumanto Jun 16 '15 at 02:57 PM

Thanks! Using "UseSCC=false" can it runs without interacting with the source code control system? [looked at your PR, the answer is "yes" :) ]

avatar image Bozaro Jun 16 '15 at 03:01 PM
  • On master - yes

  • On 4.7, 4.8 - you need merge PR 1188 before

avatar image ddbrown30 Dec 18 '15 at 08:55 PM

This feature is definitely not working with the command line here. It's launching the editor, checking out the files, checking in the files, and then closing. It never actually builds the lighting.

avatar image Kafumanto Dec 19 '15 at 01:27 PM

Can it be related to the problem reported in the forum [in function FEditorBuildUtils::EditorAutomatedBuildSubmit() the level is saved before the building of lights is completed.] ?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question