- Home /
How can I force lightmaps into linear color space?
In Unity 5 beta (Pro), while processing existing 4.6 scene for 5 I get the Lightmapper message (warning) that my lightmaps are generated in the wrong color space (gamma). In Player settings I have linear color space selected and my camera is using Player Settings. Docs say Lightmapper will detect this condition (which it does) and automatically correct it (which it does not). I am also using Lightmapper Extended, which I suspect may not fully support 5's new API (yet).
Any suggestions?
Anyone got how to do that?
$$anonymous$$y case is the same. I have a simple scene with baked lights, and when I define linear colorspace in the player settings, the light starts rebaking again.
Thats when I got the message: LIGHT$$anonymous$$APS ARE BA$$anonymous$$ED IN THE WRONG COLOR SPAC$$anonymous$$ I know that!!
How can I fix that? Is that a bug?
Answer by Tanshaydar · Oct 30, 2014 at 01:24 PM
When you are using linear lighting, all lighting and textures are linearized, which means that the values passed to the lightmapper also need to be modified. When you switch between linear lighting and gamma lighting, you will need to rebake lightmaps. The Unity lightmapping interface will warn you when the lightmaps are in the wrong color space.
This is the current documentation. I'm not sure if it is valid for Unity 5, but currently when you switch color space, you need to rebake lightmaps.
Thanks for the response, but your answer is not addressing the specific issue (most likely a bug in 5b). I didn't explain that I know how to use Unity, but yes, of course I tried rebaking (multiple times with different approaches), and the message persists.
Other obvious things I tried: I restarted Unity I restarted my computer I removed my L$$anonymous$$ extended which did nothing as I suspected (I realized it dealt with Beast and now we're using Enlighten). I cleared maps and rebaked I set my color space to linear in Player Settings.
I set my color space to gamma and back to Linear. I set my Camera to use Player Settings
I am also getting specular artifacts that are prohibiting me from baking with directional lights. Unity 5 looks GREAT and the standard shader is really cool, but some of the specular effects are hard to control: They look great in inspector and before baking, but in game they are ugly blotches of black (in occluded areas).
Still discovering and loving it!
Please (intelligent targeted) help: if you don't know how to help: tell me that! As for many other kindred spirits: Unity 5 is my future, and we're all discovering and need to know it's capabilities and limitations.
Doug
Answer by patrickStU · Oct 30, 2014 at 05:55 PM
I think he did that. The same issue is occuring for me as well. I still shows, that the color space is wrong -- even after restarting Unity AND rebaking.
Your answer
Follow this Question
Related Questions
Linear Space Lightmaps 0 Answers
Shadows leftover from Lightmapping won't go away 2 Answers
Object pooling with lightmapped gameobjects 0 Answers
Baked LightMap issues 4 Answers
Preserve lightmap on instantiated object 0 Answers