PDA

View Full Version : Making lightmaps in Unity look photoreal just like in Maya


royterr
03-17-2012, 06:31 PM
I have a photorealistic light setup in Maya and I am transferring the scene lighting to a 32bit .EXR lightmap via MentalRay baking:
-When I compare the original render (witch is the ultimate visual reference) to my rendered lightmaps, the result is 99% identical (the lightmap is plugged to the ambient slot of the lamber shader - all lights and global illumination turned off - gamma 2.2 for the rendered camera) works like a charm!

-Now in Unity I plug my 32 bit .EXR lightmap to the lightmap slot of the “lightmapped/diffuse” shader and set the texture mode to “lightmap” (“color space” is set to “linear”).
Unlike Maya, the lightmap effect in Unity gives a different look then the original render. Why is that? Shouldn’t the lighmap be applied just like in Maya (where it is plugged to the ambient slot) witch is the correct way of applying the lightmap since it was identical to the original render? How can I make the lightmap in Unity have the same correct look as in the Maya?

http://i.imgur.com/txEG2.jpg

CHRiTTeR
03-19-2012, 08:08 AM
Are you sure there are no lights in the unity scene. It looks like its being lit twice; once by the baked solution and an additional light on top.

That or the bright areas of your lightmap seem to get some gain and clipping

royterr
03-19-2012, 01:22 PM
[QUOTE=CHRiTTeR]Are you sure there are no lights in the unity scene. It looks like its being lit twice; once by the baked solution and an additional light on top.
/QUOTE]
definitely sure, only lightmap.

not sure about gain but its definitely getting some clipping.

Elektraglide
03-27-2012, 03:50 PM
Have you checked what format the lightmap is being stored in Unity? I know with LightUp imported lightmaps, my script assigns a non-lossy format to avoid DXT artefacts.

Adam

royterr
03-31-2012, 01:19 AM
Have you checked what format the lightmap is being stored in Unity? I know with LightUp imported lightmaps, my script assigns a non-lossy format to avoid DXT artefacts.

Adam

Unity uses the same format, exr.

CHRiTTeR
03-31-2012, 11:55 AM
Have you tried another format? exr seems a big much for a game engine... Try png or jpeg, maybe it helps

noouch
04-03-2012, 12:24 PM
Also, make sure the gamma of your lightmap is being interpreted properly.

Elektraglide
04-14-2012, 09:01 AM
Unity uses the same format, exr.

You're confusing the format the primary asset gets imported in, with what Unity uses to store runtime data.

CGTalk Moderation
04-14-2012, 09:01 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.