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
0
Question by MolluskJesse · Nov 06, 2014 at 01:59 AM · terrainlightmappinglayerbeast

Unity Lightmapping, Layers, & Multiple-Terrains

Our team (which is basically me on engineering) has been dancing and struggling with the Beast Lightmapper for a while now regarding this issue. We have a fairly complex Unity scene where we're using the layer system to limit the parts of the level the lights are affecting. We also have multiple terrain instances in our scene.

Now, when we try to use the vanilla Beast lightmapper and just ask it to bake the scene, it doesn't appear to respect the layer culling in the lights. Lights in our "Dark" layer cause shadows to appear on items in our "Light" layer when the Dark lights, when operating in realtime, don't illuminate that geometry at all.

We got around this issue with a bit of code I wrote I've been playfully calling the BeastWrangler. This code is breaking the scene up into sections and running light backs on individual areas, sometimes even individual rooms to ensure that we don't get shadow-bleeding between light layers. This all works well and good until we get to Unity's terrain system.

While the system works well when there is a single terrain in one of our levels, multiple terrains seems to lead to some strange misbehavior where the terrains are being influenced by all the lights, no matter what I do with the BeastWrangler code.

So, the base question is this. What can I do to get Unity's Beast Lightmapper to output the correct shadows in a more complicated scene? I'm attaching pictures of an example scene that demonstrates the struggles I am having.

1) What the scene looks like with realtime lighting. This is what I'm expecting as a result from the shadow bake. alt text

2) The result I'm currently getting out of my Beast Wrangler script. As you can see, the meshes in the scene bake with their lighting correctly. The terrains, however, are not at all correct. alt text

beast_issue_right.png (198.9 kB)
beast_issue_wrong.png (194.2 kB)
Comment
Add comment · Show 1
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 balloonanimals · Nov 06, 2014 at 11:02 PM 0
Share

Light mapping in Unity is tricky.

The more complicated it gets the less it like to behave.

$$anonymous$$ultiple lighting scenarios, the built in terrain, might be what it tripping it up.

I'd recommend you build and layout the terrain and bake it in your 3D Program ($$anonymous$$aya)

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ocelot · Nov 06, 2014 at 11:26 PM

first I would make sure you have Generate Lightmap UV's checked in the mesh import settings. That might fix it if those are planes and not Unity terrains. If they are Unity terrains I dunno, it should work--maybe also try lowering your directional light intensity and make sure the trees' shaders are set to the proper (Nature?) shaders--it's been a while and I haven't used Tree Creator yet, but there is a "bark" and "foliage" shader under "Nature", from what I remember.

edit: reading through what you are trying to do again, your situation does sound super-complicated for doing in Unity, unfortunately. In my experience, multiple terrains is no good. On top of that, you have multiple lighting schemes. I'd probably agree with balloonanimals in that you may want to try baking in Maya/3DS/etc. getting the textures from that, then importing into Unity--switch them with some script, etc...

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Single lightmap with day/night cycle 0 Answers

Lightmaps not displaying on terrain 1 Answer

Beast lightmapping- terrain ignores light 0 Answers

How many terrain lightmaps are generated with beast? 2 Answers

Unity crashing after beast completes 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