Search Unity

How to import smooth normals correctly from Blender? Is ti possible?

Discussion in 'Editor & General Support' started by Beliar, Dec 16, 2010.

  1. Beliar

    Beliar

    Joined:
    Nov 26, 2010
    Posts:
    46
    Hello there.

    I'm using blender for modelling and saving my models inside a sub-directory so unity may access them.

    However, the smoothed normals aren't being imported properly; even the non-smoothed ones are imported as smooth. And the pivot points also aren't correct. I know it's possible to parent them to an empty object, but i would like to simply use the pivot from Blender.

    Thank you.
     
    Last edited: Dec 16, 2010
  2. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I've never successfully gotten Blender smoothing settings to import into Unity properly. I've always either used the import settings in Unity to fix it or an intermediate app (like Carrara Pro). Not sure if it's an issue with Blender, Unity or operator error. Pivot points, however, always have imported properly for me. It's best to change object pivots in "edit" mode and / or to use "apply rotation/scale". Again, although I've used Blender for many years I'm far from an expert on it.
     
  3. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Look up "Blender Edge Split" on this forum. That is the method you use.
     
  4. Beliar

    Beliar

    Joined:
    Nov 26, 2010
    Posts:
    46
    Thanks bigkahuna, you're right, the pivot points problem were my fault.

    Jessy, splitting edges would increase the number of vertexes. I don't know if it's normal though... I mean, the vertex count of a model with smooth normals imported correctly from Maya (for example) and the count of a blender model that has separated edges would be different. At least i think... or maybe Unity simply "split" the mesh automatically while importing from Maya.

    Thanks guys.
     
  5. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    I don't know what you're saying. Edge Split doesn't split every edge unless you tell it to. The chief purpose of the modifier is to control smoothing based on angle, like Unity's importer, or based on manually marking edges as "sharp".
     
  6. Beliar

    Beliar

    Joined:
    Nov 26, 2010
    Posts:
    46
    For example, a simple cube:

    Edge Split Modifier ON:
    Ve:24 | Fa:6

    Edge Split Modifier OFF:
    Ve:8 | Fa:6

    So it does exactly the same thing as Y-Split. It just "Splits" the edges, as the name says, based on angles...

    However, if the cube is set to "solid" rendering, the vertex count stays as is.

    I just want to know if there's a way to have a "solid" cube on Unity with 8 vertexes.
     
  7. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    No mater how you "split normals" you get more vertices, because Unity needs to insert separate vertex for each normal which is different.
     
  8. Jessy

    Jessy

    Joined:
    Jun 7, 2007
    Posts:
    7,325
    Exactly. Blender lies to you about the vertex count. It tells you how many vertices you can manipulate with its modeling tools, not what it sends to the GPU.

    I talk a little bit about this in my video on diffuse vertex lighting (8-3) at the tutorial link in my signature, if you need a live illustration.
     
    Last edited: Dec 16, 2010
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    If you really want to use the smooth/solid face info from Blender and aren't using animation, you can export as .obj, in which case the edge splitting is done automatically when exported. It's generally more convenient to use the edge split modifier though, so you can keep the file as a .blend and not have to go through exporting whenever you make changes.

    --Eric
     
  10. Beliar

    Beliar

    Joined:
    Nov 26, 2010
    Posts:
    46
    OK. Thank you very much guys!
     
  11. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Which explains why importing it into Carrara works for me as I use a .obj file to do the transfer. Huh, learn something every day! :)
     
  12. Beliar

    Beliar

    Joined:
    Nov 26, 2010
    Posts:
    46
    Yeah yeah... that doesn't mean that the vertices weren't splitted. :)