# Lightmaps that include shadows from other objects?

**URL:** https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110
**Category:** Lighting & Global Illumination
**Created:** [June 27, 2009, 1:19am UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110 "2009-06-27T01:19:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![anon\_4641568](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon\_4641568](https://discussions.unity.com/u/anon_4641568)
#### Post date: [June 27, 2009, 1:19am UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/1 "2009-06-27T01:19:05Z")

</div>

I am trying to create a lightmap for my terrain that not only includes the self shadowing on the terrain but also the shadows coming off the trees I place on the terrain.

Any advice on how to go about this?

(OS x, Indie version)

---

<div class="post-metadata">

### Author: ![Dreamora](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dreamora/32/91058_2.png) [@Dreamora](https://discussions.unity.com/u/Dreamora)
#### Post date: [June 27, 2009, 1:20am UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/2 "2009-06-27T01:20:57Z")

</div>

There is a script that allows you to create such lightmaps for the terrain

---

<div class="post-metadata">

### Author: ![anon\_4641568](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon\_4641568](https://discussions.unity.com/u/anon_4641568)
#### Post date: [June 27, 2009, 3:21am UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/3 "2009-06-27T03:21:04Z")

</div>

Can you be a little more exact? Where is this script and how do I use it? I’ve only just downloaded the indie trial and noticing the lack of shadows on the island demo, despite light mapping, I used the light map button on the terrain editor which made a pretty self shadow light map.

---

<div class="post-metadata">

### Author: ![antenna-tree](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/antenna-tree/32/244386_2.png) [@antenna-tree](https://discussions.unity.com/u/antenna-tree)
#### Post date: [June 27, 2009, 5:43pm UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/4 "2009-06-27T17:43:04Z")

</div>

The Island Demo has lightmaps on it in the installed project folder… for some reason Unity turns them off by resetting the Terrain’s Lighting to Vertex when you first open the project. It’s a bug I’ve complained about several times 😉

I tried looking around for the script dreamora is referring to but can’t find it at the moment. It doesn’t appear to be on the Wiki.

---

<div class="post-metadata">

### Author: ![anon\_4641568](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon\_4641568](https://discussions.unity.com/u/anon_4641568)
#### Post date: [June 28, 2009, 12:15am UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/5 "2009-06-28T00:15:20Z")

</div>

So…

Can we get tree shadows on the light map on the island demo?

---

<div class="post-metadata">

### Author: ![anon\_56053117](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@anon\_56053117](https://discussions.unity.com/u/anon_56053117)
#### Post date: [June 28, 2009, 5:02pm UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/6 "2009-06-28T17:02:23Z")

</div>

Getting tree shadows included in a Unity created terrain light map:

Forrest posted this fix a while back on another thread. I was not personally able to get it working, but apparently tweaking some things will get it to work.

original post: [http://forum.unity3d.com/viewtopic.php?t=8399&highlight=customlightmap](http://forum.unity3d.com/viewtopic.php?t=8399&highlight=customlightmap)

secondary fix thread: [http://forum.unity3d.com/viewtopic.php?t=23352&highlight=customlightmap](http://forum.unity3d.com/viewtopic.php?t=23352&highlight=customlightmap)

hope this leads you in the right direction.

Happy developing!

---

<div class="post-metadata">

### Author: ![anon\_56053117](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@anon\_56053117](https://discussions.unity.com/u/anon_56053117)
#### Post date: [June 28, 2009, 5:25pm UTC](https://discussions.unity.com/t/lightmaps-that-include-shadows-from-other-objects/394110/7 "2009-06-28T17:25:48Z")

</div>

was able to get Forest’s lightmap wizard working. (first link in post above).

make sure the script is in the Editor folder in your Assets folder.

my steps:

1. rename the script “LightmapWizard”
2. run the wizard ‘Terrain\>CustomLightmap…’
3. input the water, terrain, light, and decal data from your hierarchy.  
4)go to terrain settings (little gear in inspector) and change “lighting” setting to ‘lightmap’ in the Base Terrain portion of the inspector.

if you need any further explanation, or have questions let me know.
