|
I'm trying to import models from Blender to Unity, but I've run into problems when it comes to importing the normals from the model. When I use FBX or 3DS files, Blender exports the model as completely smoothed. When I use OBJ files it comes in with the smoothing correct, but with only a single material. The mesh is made up of three materials, one of which has smoothed shading on its polys where the others are flat-shaded. I need to continue to have this as a single mesh object rather than three seperate meshes, and since they have similar curve rates I can't use 'Calculate' to create the normals at import time since it applies smoothing at parts of the mesh I would prefer flat-shaded. Is there any way to get Blender to correctly export the normals so that Unity can handle them?
(comments are locked)
|
|
Hi, I believe that the models should be smooth when they are imported into Unity. You can set your model to smooth in blender and the edge split modifier, marking flat edges sharp with ctrl + e. My hack from blender is similar, except I just select the edges and Mesh->edge->split (you can see the vert count go up.) Don't use a modifier. I swear on previous versions (of both programs) I could just set a crease or adjust the maxSmooth angle, and it would handle that for me.
Aug 02 '12 at 01:21 AM
Owen Reynolds
A modifier is easier, and I'm all for easy :) I'm sure he is too.
Aug 03 '12 at 01:09 AM
Coreyf716
I used the modifier on my model and here is how it turned out.
Aug 03 '12 at 01:47 AM
Coreyf716
Well, Y to split and "Remove Duplicates" to undo is a tad fewer keystokes than a modifier, but you don't get the pretty line. I guess it seems more complicated, but Sharp is really just a "wizard." All it does is show that line and secretely splits the verts (non-smoothed edges need an extra vert to support the extra normal.) Someone with a modelling background may be happier using modifiers, but nice to know that if the import chokes on the fancy stuff, you can force flat faces "by hand."
Aug 03 '12 at 06:23 AM
Owen Reynolds
Yeah. I do everything with my game. I'm the programmer, 2d artist, 3d artist, game designer, etc. so I prefer to use a modifier.
Aug 03 '12 at 08:04 PM
Coreyf716
(comments are locked)
|
|
I confirm the solution above.
Now, the mesh is not smoothed.
(comments are locked)
|
|
When you import your model, set the Calculations for Normals to Calculate, instead of Import, and then move the slider bar for Smoothing Angle to 0. http://docs.unity3d.com/Documentation/Components/class-Mesh.html This only worked for me as a .blend file. It made the mesh white with black triangles all over it as an FBX
Aug 03 '12 at 09:51 PM
Coreyf716
That's the key - I don't WANT to use 'Calculate'. The model contains multiple materials - some of them are smooth-shaded and some are flat, although they have similar angles between polygons. I don't want the whole model smooth or the whole model flat - I want the edges that are marked as flat in Blender to import as flat in Unity, and the same for the smooth. For complex models with multiple materials, applying a smoothing angle over the whole mesh isn't always good enough because it will smooth items that shouldn't be, or leave them flat when they should be smooth.
Aug 07 '12 at 10:45 PM
IgnoranceIsBliss
Then, like I said, use the edge split modifier and mark sharp edges. It will leave the unmarked edges smooth while flattening the marked edges.
Aug 07 '12 at 10:48 PM
Coreyf716
(comments are locked)
|


Try not exporting them. Use the .blend file itself.
@DaveA: That won't have any effect in this case, though I'd recommend it anyway.
Yes, all .blend does is have Unity open Blender in the background and export .fbx, so you might as well use .blend so you don't need to export things manually.