9
\$\begingroup\$

I created a basic textured cube model with Blender to practice modeling, and then I imported it into Unity. After I put up some lighting it looks pretty ugly. The light is not continuous on a row of textured cubes:

enter image description here

What is more odd, the light on the blocks that makes up the floor is continuous. What am I doing wrong?

This is what it looks like without textures:

enter image description here

If I did not know that these are perfect cubes, I'd say there is a slight curve on surface. I also tried lightening the texture but it also didn't help:

https://dl.dropbox.com/u/45620018/lighter%20texture.PNG

I just simply exported the model from Blender and did not set up any normals or things like that. However, I also did not do anything special with the floor brick model.

Checked the normals and they seem to point to the right direction.

enter image description here

Also I don't really see the difference between the two models. On the textures panel I also set the projection to flat:

enter image description here

I checked the different panels in Blender and the only normal-related option on the "Object Data" panel is this "Auto Smooth" and it is turned off by default:

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Does it work properly if you disable texturing? \$\endgroup\$
    – msell
    Sep 9, 2012 at 5:55

2 Answers 2

7
\$\begingroup\$

From the no-texture picture, I'm pretty sure the problem is that your cube models have inappropriate normals. You need to tell Blender that your cube edges are intended to be sharp, not smooth — what you have now are cubes that are acting like six-sided approximations of spheres.

I don't know Blender so I can't tell you exactly how to accomplish this, but it might be called "flat" instead of "smooth" faces or normals, or there might be a way to "break" a particular edge. Your floor-tile model appears to have correct normals, so perhaps you should see what's different about it.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ You were right I had to tell Blender to make the edges sharp. I could achieve this with the EdgeSplit modifier. (wiki.blender.org/index.php/Doc:2.4/Manual/Modifiers/Generate/…) \$\endgroup\$
    – nosferat
    Sep 11, 2012 at 7:29
  • \$\begingroup\$ You can simply select all the faces in Blender and give them "Flat" shading via the left menu (the one activated by "T"). Or, in Unity, you can select the top of your Blender import hierarchy, chose to have normals calculated (instead of imported) and then chose a smoothing angle (selecting something like 60 should give you the effect you want). I don't think this is really a normals issue, the normals are fine, otherwise you'd not see anything in Unity (or in Blender if you'd enable backface culling). \$\endgroup\$ Oct 30, 2012 at 15:05
4
\$\begingroup\$

A couple of suggestions as to what the problem may be:

a) Have you checked if all the face normals of the mesh are pointing in the right direction? Its quite straightforward to do this in Blender)

b) Have you applied the right UV mapping? Unity exports all the texture data based on how you set things up in Blender. Look at the Texture panel in Blender, especially the 'Mapping' panel under Textures (ideally, it ought to be set to UV.

(P.S. what is the policy here on attachments or posting links to project files, say a Dropbox or Google Drive link in the question? This should be so simple to fix if I could just see all the files.)

\$\endgroup\$
1
  • 2
    \$\begingroup\$ To answer your attachment question, on Stack Exchange, external links to files for individual questions are not preferred, because they tend to go away. Images should be uploaded to our own hosting (via the upload button in the editor) so that the SE team can make sure they stick around. There is no particular support for non-images (e.g. the Blender files for this question), but it is better to find alternatives since it becomes more like “please debug my very large code” which is very unlikely to be useful to anyone but the original asker, contrary to the goals of SE. \$\endgroup\$
    – Kevin Reid
    Sep 10, 2012 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .