Strange glitch when importing a model.

I am having a strange problem with my model. I import it in via maya 2009 with the latest fbx plugin… I allow unity to do this for me. Once the model is in the scene I get a glitch with the specularity. This happens wether there is a normal
map or not.
When i first import it in as you can see the normal edges are hard in certain places for some reason… its supposed to be
completely soft. (problem1.jpg)

Once i use unity to automatically calculate normals… it does a weird glitch in the specularity… if i stop unity from
calculating normals… the specularity remains bugged and does not go back to the original look.(problem2.jpg)

The model is around 25600 triangles with the full body. And the texture maps were originally 4096(also this problem exists even when the model has no textures on it.The problem only seems to exist when i switch to a shader with specular on it.)

the screenshot if it in maya where it functions correctly is in problem3.jpg

Am i doing something wrong or have i encountered a bug?



I am using the plugin version fbx20093_maya2009_win_x64
(2009 - 3)

There is a more recent version fbx20112_maya2009_win_x64
(2011 - 2)

Problem with this newer version is it doesnt seem to install correctly. Inside maya i get

FBX extension plug-ins load location: ‘C:\Program Files\Autodesk\Maya2009\bin\plug-ins\fbx’
0 FBX extension plug-ins found!
0 FBX extension plug-ins loaded!

Now i can still export fbx out of maya… problem is unity cannot. It just continues endlessly trying to export.

-update… i tried exporting directly out with that newer version into fbx and just taking that fbx file into unity… same problem still exists.

HELP!!!

Update… i have tried it in my 32-bit maya 2009 on my laptop. This plugin version is “2009-2”… its a slightly older version and still has the same problem as the newer one.

Though on my laptop the face looks correct until i hit calculate normals to smooth it all… then the same weird normal glitch occurs.

In either computer the problem also presents itself on the edge of an ankle wether i hit calculate normals or not.

Again… please help!!! I am on tight time constraints and i dont know what else i can do to fix this.

Ive tried exporting to obj then importing the obj back in… tried triangulating the mode… tried deleting history… tried optimizing scene size command… tried cleanup to check for errors… tried unlocking and then softening the normals… tried just about everything and i am still getting this problem. WHY!?

Model originally came from zbrush obj importing into maya. Other then that i dont know what other variables could be involved… im trying to mention just about anything and everything.

Another update…

I have exported the model via obj into 3ds max. I have then tried to get it into unity that way.

The bug still exists!!! This leads me to beleive something is either wrong with the normals in that area even though they work fine in 2 different 3d packages… or something is broken inside unity3d. Their is literally no explanation why it would do this.

I have tried contacting support with no response yet.

I am very disappointed and I hope one of the developers or support staff … or a random user of these forums…has an answer for this.

(Keep in mind… this doesnt do this with any normal shader… its just anything with specularity… the problem shows up when a spec shows up.)

Hey man sorry for such a late reply!
I am not sure what is going on with your model/shader, as I am no programmer, but I have forwarded this thread to some of our programmers. If you want, I could have a look at the file and see if I can get it into Unity without those strange lines.

Feel free to send it to roald [at] unity3d.com

I thank you so much! I will email you what i have including the model and any information that might help.

Hi Kurylo3d,

Could you send your model (with bumpmap and texture(s)) to brokenpoly or me.

Unity should import normals from 3d tools as they are, so I suspect some problem with FBX exporter. Unity 2.6.1 doesn’t work with FBX 2011 plugins very well… Could you install 2010 plugin?

Another thing you could try is to export your model to fbx manually and then import back to Maya and see if everything looks right - if it doesn’t then there is a problem with the plugin.

I’m planning to look into various tangent space issues on Monday, so your model would help and I might be able to tell you something about your problems.

Regards,
Paulius

I have sent the model to the email address he has given me.

The problem can be reproduced without the textures and without the normal map. It simply exists on the mesh with a specular shader on it. It it really becomes apparent if you use calculate normals.

I will still include them in a seperate email. I have those files on a computer at home so I will have to get you those in an hour or so.

Ok i just tried the “2010.2 fbx for maya 2009 64bit”

So it came in smooth with no hardedges, still some weird ness on the ankle area. And still if i hit calculate normals… the weirdness on the face comes back.

I also emailed the texture over to the previous email address.

You probably want Unity to preserve the normals from Maya so turning on “Calculate Normals” in Unity should not be necessary or desirable.

(3000th Post!)

This is true. This is exactly what i wish to do as a matter of fact. But my problem right now is that when i use the normals from maya… i get a glitch on the ankle… and that glitch continues to exist even after i use split vertex…

i simply use calculate normals to illustrate that something really weird is going on in the face area as well. The hard edges may not be there anymore with this version of the fbx plugin, but the errors im having still exist in the backround if calculate normals does that.

I mean if there were no bugs on the ankle either then i really wouldnt care what happens with calculate normals, but the problem is still visible in the ankle before i use calculate normals…

Ok, well Roald, Paulius, and I will have a look at it tomorrow.

Again i appreciate all the help.

Quick Update-

I tried moving the uvs around in the feet area where they connect with the ankle. I tried giving the polygons that were seeing the problem more uv space. The error disappeared from there. So now the model is useful to me with just the normals taken from maya. Though… again if i do hit calculate normals… it will still do weird problematic stuff to the face and ankle, but for now this helps.

I thought id just throw this out there and let you guys know what I have found so far on my end.

Let me know what else happens on yours. Thanks again.

Usually there is no need to use “Calculate Normals” in Unity. 99% of the time you want to use the normals you made in Maya or other 3d app.

I totally agree. Its just every now and then their are odd little issues like that. I mean who would have thought that moving a couple of uvs around, virtually so little that u wouldnt even notice, would in anyway help to fix anything that has to do with a specularity/ normal glitch.

Oh crap… i was wrong… The new version of the fbx import/export didnt fix a thing… The hard edges on the face exist there when the normal map is applied… So in other words im still screwed…

The reason i thought it fixed part of the problem was because i didnt have the normal map applied.

Something is still broken… Not good with deadlines for projects coming up…

I hope you guys come up with some ideas for me… this sucks…

-update…

after some tinkering with the uvs i noticed that the problem somehow has to do with the uvs… dont know why since the uv placement is perfect.

If i scale the uvs of the face to be really tiny the problem vanishes… if i scale it really large it seems to also vanish… if i simply move the position the problem remains… im not sure why… this doesnt make any sense… so maybe this can give u guys a clue as to whats going on…

also noticed whats odd now is that if i take the entire set of uvs and scale the entire thing into the middle of the texture… the distortions of the specular are on different parts of the model… no longer on the face… but on the chest and legs…

So again the problem is dependent on the position of the uvs.

Well, I personally couldn’t find a way to fix this without a crazy workaround. The tangents seem to be screwed up and the only way I could fix it was to horizontally flip the UVs, flip the texture, and invert the normal map’s red channel. This “fixed” the problem on my end. Admittedly a hack, but for now it’s the best we can do since this issue, whatever it is, probably won’t be fixed in Unity until 3.0.

Well I do appreciate the help. You guys have been on top of this rather quickly. This is some top notch support and again I thank you.

I will try it when i get home on my lunch break. I’ll keep you updated on the result.

-update…
I tried that out and so far so good from what i saw. The work around is working.