# Unwanted difference between render and baked lightmap

**URL:** https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112
**Category:** Maya
**Tags:** mental-ray
**Created:** [February 21, 2012, 11:26am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112 "2012-02-21T11:26:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 21, 2012, 11:26am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/1 "2012-02-21T11:26:25Z")

</div>

I am trying to bake a low poly mesh but the generated lightmap doesn't give a similar resulst as my render: [http://www.youfile.net/download.php?file=e673f55efe56bf401dd0d2cecf7a13a1](http://www.youfile.net/download.php?file=e673f55efe56bf401dd0d2cecf7a13a1) In general its very similar (specially the indirect lighting) but you can notice that there is a big difference in the surfaces lit directly by the directional light, why is that? how can i get similar results just like the other areas?

---

<div class="post-metadata">

### Author: ![nowayfra](https://forum.highend3d.com/user_avatar/forum.highend3d.com/nowayfra/32/76_2.png) [@nowayfra](https://forum.highend3d.com/u/nowayfra)
#### Post date: [February 22, 2012, 1:46pm UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/2 "2012-02-22T13:46:04Z")

</div>

Maybe your lightmap clamps the range (black to white) to 0-1 and thus the hot spots doesnt match the light contribution as they apear in your real render. If the intensity of your directional light exceed 1.0 try to use HDR images as lightmap.

---

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 22, 2012, 2:39pm UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/3 "2012-02-22T14:39:19Z")

</div>

> [@](#):
>
> Maybe your lightmap clamps the range (black to white) to 0-1 and thus the hot spots doesnt match the light contribution as they apear in your real render. If the intensity of your directional light exceed 1.0 try to use HDR images as lightmap.

my directional light has an intensity of 1.  
do you mean generating lightmaps from hdrs? what if i wanted in addition to that a directional light?

---

<div class="post-metadata">

### Author: ![nowayfra](https://forum.highend3d.com/user_avatar/forum.highend3d.com/nowayfra/32/76_2.png) [@nowayfra](https://forum.highend3d.com/u/nowayfra)
#### Post date: [February 23, 2012, 1:27am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/4 "2012-02-23T01:27:29Z")

</div>

no, as your textureBakeSet.fileFormat try hdr

---

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 23, 2012, 8:46am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/5 "2012-02-23T08:46:31Z")

</div>

Great, it worked.  
In the render it looked the same but not in viewport normal mode neither high qiality mode so i had to turn on viewport 2.0 and it was pretty close to the render view (in turms of luminosity and not aliasing):

 ![](http://i.imgur.com/Xz08p.jpg)  
now i need to have the effect in Unity 3d game engine, is it possible to have that effect with an 8 bit (per channel) lightmap?  
becaue whenever i turn my 32 bit hdr lightmap to an 8 bit targa image (in PS), the lightmap becomes washy, is there a way to keep the original render fidelity but with a normal targa lightmap?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [February 25, 2012, 3:52am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/6 "2012-02-25T03:52:27Z")

</div>

Well you can try to gammacorrect the image.

---

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 25, 2012, 4:49am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/7 "2012-02-25T04:49:26Z")

</div>

tried that,  
the image still look flay

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [February 25, 2012, 12:38pm UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/8 "2012-02-25T12:38:22Z")

</div>

Well your never going to get the exact same feeling but it should help. (also boost exposure a bit)

---

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 29, 2012, 11:02am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/9 "2012-02-29T11:02:02Z")

</div>

All i want to do is have m lightmap be as close as possible to my original Maya render (in term of luminosity and not antialiasing witch is limited by resolution):

1-First in Maya, the closest result to the render was using a 32 bit lightmap (not exactly same luminosity but lets consider that it is acceptable and we want the same effect in Unity.

2-In Unity the 32 bit lightmap its not only different from my original Maya render but also different from the baked Maya viewport.

3-So how can i have it match as closely as possible my original render?

\*all is shown in Gamma 2.2 space and using the legacy lightmapped shader in Unity.

 ![](http://i.imgur.com/nYQsB.jpg)

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [February 29, 2012, 11:26am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/10 "2012-02-29T11:26:05Z")

</div>

w.ell, assuming the unity shader does no lighting at all, just showing textures as is. Then you could put the map on a squre plane, w surface shader and render that to 8 bit using the same renderer you originally used. That would make the maps same, sans how sampling/postprocessing is done in unity.

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [February 29, 2012, 11:27am UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/11 "2012-02-29T11:27:20Z")

</div>

oh ps check that your not double correcting your images

---

<div class="post-metadata">

### Author: ![terraformers](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/t/ccd318/32.png) [@terraformers](https://forum.highend3d.com/u/terraformers)
#### Post date: [February 29, 2012, 12:10pm UTC](https://forum.highend3d.com/t/unwanted-difference-between-render-and-baked-lightmap/45112/12 "2012-02-29T12:10:21Z")

</div>

no double gamma correction is done.  
all lights are turned off in Unity (flat mode).
