Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
4
Question by Kubold · May 05, 2013 at 08:53 AM · crashlightmappingbaked lightbig

How to lightmap a very big scene without crashing?

I have a scene with couple hundred meshes and 9 terrains 2000x2000. Unity crashes even if I try to bake-selected 1 mesh at a time, because it exports all the other "static" meshes and terrains, before calculating lightmap. It crashes during that export phase (I have 12 GB RAM, i7, Radeon HD 6950, if it has something to do with this).

I tried to mark JUST this one single mesh "static" and uncheck on other meshes. Then it bakes fine, on that single mesh. But, if I uncheck "static" on baked mesh, and check some other mesh to bake the light, the previous mesh looses the lightmap.

In conclusion - There is NO WAY, Unity can lightmap my scene all at once, without using NASA supercomputers. Also, it seems, bake-selected function is a "scam", since it tries to calculate all meshes and terrains in the scene anyway.

Yet, I don't believe that Unity simply can't handle lighting big scenes, that would be nonsense...

So, please tell me, how do I approach this and lightmap my giant scene? P.S. Is there some way to use other computers in the network to count lighting (like in Unreal's Lightmass for example)?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by Kubold · Jun 10, 2013 at 08:22 PM

I found the way myself.

  1. First you bake all the meshes and ONE terrain.

  2. You back up/rename the lightmap for the terrain you just baked.

  3. Then, you UNCHECK "Lightmap Static" form the terrain you just baked (but you have the lightmap backed up)

  4. Next, you bake all the meshes and SECOND terrain, and you back up the lightmap for that terrain. In the meantime, you will notice that the first terrain "unbaked" (because you uncheck "lightmap static".)

  5. You proceed this way with all the terrains (I have 9 in my scene).

  6. Then you manually add slots in Lightmapping window for that terrains, you check the "lightmap static" on them once more, manually assign the backed up lightmaps to the terrains.

VIOLLA :) Giant scene is lightmapped. A lot of work, but this is the only way, so it doesn't crash.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image mcchiu · Jul 03, 2014 at 11:05 PM 0
Share

How do you apply lightmaps?

avatar image cosmos · Feb 23, 2020 at 07:20 PM 0
Share

Is there any solution that doesn't involve a voodoo magic ?

avatar image
0

Answer by Chronos-L · May 05, 2013 at 12:33 PM

You can try Bake Selected. It will bake only the selected bake-able gameobject. Bake-Selected will not change the lightmap (or parts of it) that belongs to other gameobject that you did not select.

I usually use this when I make a tiny changes to the arrangement of the props (in this example, lets say it is a barrel); By Bake Selected, I just bake the barrel, the floor, and any wall/other stuff that the barrels' shadow will affect (If there is a tree in my scene that will affect the lightmap of my barrel but not the other way around, I don't need to select the tree)

In your case, however, you can bake a few gameobjects at a time; and eventually you will have the whole scene baked.

Quick Step:

  1. Setup all lightings and all static objects

  2. Select a few object (adjust the number according to mesh-size and number of object)

  3. Bake Selected

  4. Restart from Step 2

alt text

alt text


screenshot.53.png (7.0 kB)
picture1.png (50.6 kB)
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kubold · May 05, 2013 at 04:01 PM 0
Share

Thanks for the answer, but it seems you onlye read the headline, not what the problem is about :)

In short: Unity crashes while exporting EVERY "static" marked Object on the scene.

Even If I use bake selected, Unity first exports EVERYTHING, to calculate a lightmap on the selected mesh.

avatar image Pulov · Mar 27, 2015 at 10:11 PM 0
Share

Bake selected is overwriting existing lightmaps, this is crazy, I was planing to map a big scene this way but does not work.

avatar image
0

Answer by tormentoarmagedoom · Jul 03, 2019 at 06:07 PM

This answer is not possible anymore

Anyone Knows some solution?

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by yourecrippled · Jul 24, 2019 at 11:34 AM

If you have a prefab with a 'lightmap static` option checked inside another prefab that may cause baking problem .

(Let's say you have quad prefab with 'lightmap static' checked and you are using this quad prefab inside soldier prefab 'lightmap static' unchecked )

So , changing the 'lightmap static' option from the base prefab instead where i use worked for me .

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Proggresive lightmappers cause to Crash editor,Progrresive Lightmappers Crash 1 Answer

Light only generates shadows on realtime and mixed mode, not on baked 0 Answers

Unity 5 Lightmapping 0 Answers

Trouble with light mapping on duplicate objects 0 Answers

Irregular shadows with baked GI on tiled surface 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges