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\$
9
  • \$\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\$ Commented Feb 7, 2016 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\$ Commented Feb 7, 2016 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\$ Commented Feb 7, 2016 at 18:07
  • \$\begingroup\$ my mistake, set the Cast Shadows variable on each Plane's Mesh Renderer to Two Sided. \$\endgroup\$ Commented Feb 7, 2016 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\$ Commented Feb 7, 2016 at 18:32

1 Answer 1

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\$
1
  • \$\begingroup\$ John! Your suggestion worked for me! Thank you for asking, and answering, this question almost 7 years ago. Your words are still valid today. (^_^) \$\endgroup\$ Commented Mar 3, 2023 at 6:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.