Hi,
I have a problem with how a the same scene is rendered in different hardware. I am using a simple material which uses material definition Lighting.j3md and only sets DiffuseMap and NormalMap. The normalmap seems to be correctly applied in some hardware (nvidia cards 9800GTX, 8400GS and GTS250) but not in other (ati cards x2300 and HD5145). Is this some nasty ati vs nvidia thing? or did I miss something? I attach both screenshots:
nvidia:
http://i.imgur.com/VLv22.png
ati:
http://i.imgur.com/yqlap.png
Thank you all,
Does you geometry have tangents?
Don’t really know… I mean… the geometry is loaded from an obj file (which doesn’t define tangents) and I don’t load/calculate/add/import tangents myself explicitly in any way. Should I load/calculate/add/import tangents? and how?
Hello again,
I found the “TangentBinormalGenerator.generate(Geometry)” method and tried it but the geometry renders black as it had no texture set…
Normal maps require tangent for the vertexes. Some cards (nVidia in my experience) seem to fill in decent defaults that make the normal maps sort of look like they are working. Though on a Mac those same textures just show up flat shaded. On other cards you may get no normal mapping at all.
I don’t know why TangentBinormalGenerator didn’t work for you. Presumably your mesh at least had normals for the vertexes… but perhaps that was an extra step in your modeling tool.
I didn’t know that tangent where needed for normalmaps to work as I allways worked in PC’s with nvidia graphics hardware :P, thanks for the explanation.
About the model, it has normals correctly defined. I assume there is no other method than TangentBinormalGenerator in jme3 to calculate tangents so maybe there is some kind of bug in it in the version I’m using (jme3 alpha3)… I’ll try to update, test again and post results.
Thanks for your comments
Also make sure you’re using the latest version of jME3 (from SVN) as a similar bug was fixed there
I updated to nightly within jMP and made a simple test (new project, load the model and apply the material). The model now renders correctly on ati (normalmap is applied). I now have to migrate my project code to the new jme version… it doesn’t compile because of nifty and physics