0
\$\begingroup\$

So in unity I have some weird squares on surfaces of certain objects, which are buildings represented by planes: enter image description here

I don't know what causes it, I tried changing some settings in lighting and material, but couldn't fix it. This only occurs with one object which is a few planes representing buildings temporarily. The lighting is baked (one directional light). Here's the screenshots of lighting and materials tab: enter image description here enter image description here

Does anyone know what could be the problem and how I can fix it? Ask for more information if needed. Thanks.

EDIT: The buildings were imported from blender.

\$\endgroup\$
  • \$\begingroup\$ There is also another planes behind those visible in picture to stop the light passing as planes are single sided. So every single plane has a duplicate turned 180 degrees \$\endgroup\$ – Vadim Tatarnikov Feb 7 '16 at 12:01
  • \$\begingroup\$ Don't do that. Set the rendering mode of the Mesh Renderer on each plane to Two Sided and remove the duplicates. \$\endgroup\$ – EvilTak Feb 7 '16 at 17:41
  • \$\begingroup\$ I don't see where I can do so. I could write a shader to render both sides but then the light will still be penetrating the planes so there will be no shadows. \$\endgroup\$ – Vadim Tatarnikov Feb 7 '16 at 18:07
  • \$\begingroup\$ my mistake, set the Cast Shadows variable on each Plane's Mesh Renderer to Two Sided. \$\endgroup\$ – EvilTak Feb 7 '16 at 18:10
  • \$\begingroup\$ Ok so I set it to Two Sided but at the end of baking the squares still appear. Do you know if I need to tweak something in the lightmap? Because when I set my directional light from baked to realtime everything looks good without any weird shapes. Currently it's set to Baked. \$\endgroup\$ – Vadim Tatarnikov Feb 7 '16 at 18:32
-1
\$\begingroup\$

I solved the problem! It can easily be fixed by setting generate lightmap UV to true in the import settings of the model.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.