View Full Version : Maya soften/hardened edges to unity import = black spots
02-10-2012, 08:40 AM
When i try and import a mesh into unity, it gets covered in a bunch of black spots and it seems to be some sort of normal problem.
If i turn on "calculate normals" in the mesh importer for the object, then it fixes it, but all of the soften/hardened edges i made in maya don't come over.
What's the ideal method for smoothing a low poly model from maya when bringing it into unity? or how can i eliminate the black spots.
02-10-2012, 10:42 AM
are you exporting to fbx first or just directly importing your .mb?
02-10-2012, 10:47 AM
I've tried both, same results.
02-10-2012, 12:08 PM
is it rigged+skinned and then you tossed on hard/soft edges and did a export?
02-10-2012, 01:00 PM
I think i softened the edges after rigging/skinning, but during my testing i also tried detaching the skin, killing the history and rig and just exporting the mesh, ....same problem.
I've also tried playing around with the fbx exporting options, eg: turning on and off the "smoothing groups" , "smooth mesh", and the other normals/tangents options, it doesn't seem to make a difference.
02-11-2012, 10:40 PM
I had a similar issue happen as well.
I made all the 3D models in max (with smoothing groups setup etc)
and gave it to a animator friend who rigged it up in maya.
He put the full model with no soft edges and it was really bad.I then took his file and Put a soft/hard edge on top of his rig and then exported it out...got those weird spots you did.
so I went back to the original maya file, competley deleted the righ/skinning info (So it was just a mesh) Put the proper soft/hard edges, then did the usual Freeze transforms and delete history and then it worked that time around.
so in the future when I give my files to other app users I make sure my smoothing groups pivots etc are all setup proper...if you do anything post rig and try to export it VIA FBX unity gives some pretty funky results!
I hope this helps!
02-12-2012, 01:17 AM
I'll have to try the freeze transforms as well. I'm getting those black gradients on my static meshes as well. Haven't found a proper working solution yet. I love Unity's ease of getting assets into its engine, but so far everything after that has been far from easy to use.
Justifun if you find a solution I'd be eager to know what it is, cause I'm having the same problem. If I get an answer I'll send a PM your way.
02-12-2012, 07:06 AM
Thanks seforin, ill try it that way this time around and report back.
I wonder if i can export my skinning weights and re import them after freezing transforms etc, ill give that a shot as well.
Not that it took a long time to paint the weights, its just my least favorite part of the whole process.
02-12-2012, 12:48 PM
Alright, after much testing, i've found a working solution. I hope this helps anyone else who come's across it in the future.
*** If you've had this problem after you've already painted your weights, you are in luck, you can use the "copy weights" command under skin/edit smooth skin to transfer your weighted mesh back to the new mesh. We will be doing this as a last step though, so hang tight ***
1 - Select your mesh in maya and use Skin->Detach Skin
2 - Edit -> Delete all history
3 - Soften/Harden your edges as you wish on your mesh
4 - Edit -> Delete all history
5 - Select your root bone, then right click and choose "Select hierachy" then shift+select your new mesh then Skin - > Bind Skin - > Smooth Bind
***Skip step 6 if you haven't painted your weights yet from a earlier version of your file****
6 - Reference in your previously skinned (but broken) mesh from before and leave it right on top of your new mesh. Select your old referenced mesh, then shift select your new mesh and choose Skin->Edit Smooth Skin->Copy skin weights option box.
Pick "closest point on surface" and "one to one" as the first influence association choice
Unreference you old model from the scene
Voila! Your model can be brought into unity using "import new asset" - in my case i imported the .ma file.
No more broken wierd normals.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.