- Home /
Why are some of my models unaffected by lightmapping bake?
My lightmapping settings: Here are the wall and doorway models which are not being lit: Models were imported as .fbx from Blender. I've tried auto-generating and non-auto-generating lightmap UVs for the models, but there doesn't appear to be any change in how the lighting is affected. Models are marked as static. Would be most grateful for any suggestions!
--Rev
Answer by Reverend-Speed · May 13, 2019 at 10:04 PM
So, the solution for this particular error appears to be to never use single-sided geometry for static objects. Replaced my shadowcasters with a standard cube, marked 'static' and 'shadows only' and everything appears to have baked as intended. Lesson learned. Thanks to everybody who made suggestions.
EARLIER ANSWER:
Regrettably, this problem appears to come under the heading of 'self-own'.
In my project, I have several quad models stretched out over the rooms on the right of the first picture attached. These MeshRenderers are marked as 'Shadows Only', with their attached materials marked as Double Sided Global Illumination enabled.
In addition, I have two stretched quads extending the external wall of the hospital, with Cast Shadows set to 'Off' and the attached materials marked as Double Sided Global Illumination enabled.
The intention was that the shadowcatchers would light the interior as if it was shielded from the Direction Light (as the interior of a building is shielded from the sun), whilst allowing the player to peer into the interior of the ground floor. The hospital wall extension was intended to act as a relatively naturalistic 'wipe' as the camera crossed into the interior space, then hiding the exterior.
Instead, everything is brutally f'd in the a, with a load of errors including the unlit models that I've been asking about.
If you'd like to see the effect I'm trying for, without Global Illumination and in a webplayer, please enter the data seen in the attached picture and walk through the indicated door.
Can anybody suggest a way for me to achieve my desired effect with Global Illumination? And should I reformat this question, now?
Answer by wyatts · May 12, 2019 at 01:20 AM
Maybe this is a given but...are they checked as static?
GREAT question! They are, but I should have made that clear.
Are the model UVs clean? You can get weird results sometimes if the models UVs are too distorted.
They're very clean. I haven't hand-built UVs for the models yet, so ins$$anonymous$$d I used Blender's UV Lightmap function. $$anonymous$$ost of the quads are their own islands, with a 16 pixel margin between them. Additionally, I've also occasionally run the models through Unity's Create Lightmap UVs import function, to test if that'll make a different - after multiple tests with Blender-created UVs and Unity-created UVs, there's absolutely no difference.
But, again, smart question, thank you for trying! Really appreciate the assistance!