Normal map not showing correctly
by Jan-Ove Leksell · in Torque 3D Professional · 01/11/2010 (2:19 pm) · 13 replies
Hey guys, I've been trying to get a tree model to display properly with Torque 3D but I've ran into a very odd problem that I can't seem to get rid off. Parts of the model is lit wacky, showing these ugly triangle pasterns all over it.
Does anyone have any idea why the normal map is behaving like this?
Diffuse map only (It's just a basic color with AO baking right now):

Diffuse map + normal map:

Showing how the model is unwrapped, pretty much no seams showing from this angle:

Just the normal map

The Diffuse and Normal map:

The .dae file is exported from blender and the normal map is made in zbrush, the in game model is at about 6K verts. I've made other models of rocks and what not the same way that display perfectly but whatever I do I can't seem to get rid of these ugly artifacts. If anyone has any sort of idea I'd be very grateful, I've been banging my head against this for the better part of 2 days now and it's really starting to get to me being stuck on something like this :/
Does anyone have any idea why the normal map is behaving like this?
Diffuse map only (It's just a basic color with AO baking right now):

Diffuse map + normal map:

Showing how the model is unwrapped, pretty much no seams showing from this angle:

Just the normal map

The Diffuse and Normal map:

The .dae file is exported from blender and the normal map is made in zbrush, the in game model is at about 6K verts. I've made other models of rocks and what not the same way that display perfectly but whatever I do I can't seem to get rid of these ugly artifacts. If anyone has any sort of idea I'd be very grateful, I've been banging my head against this for the better part of 2 days now and it's really starting to get to me being stuck on something like this :/
#2

And here is a render direkt from blender with the real normal map showing as it should: (granted it's pretty ugly but there are no artifacts)

My process: I (1) built the tree in Zbrush, (2) used decimation master to get the lowest res to 6K then (3) exported it as a .obj to blender, (4) made the UV map by hand and (5) imported it back into zbrush where I (6) rendered the normal map and finally (7) exported the .dae from blender into Torque 3D.
If the Diffuse map was showing the same artifacts I'd know that it was a problem with the normals (of the point) or the smoothing etc. but since it looks perfectly fine with just the diffuse map I'm at a loss. I've still tried everything I can think of to make sure there are no errors in the topology or normals of the model itself but with no result.
But seeing as the flat normal map is still showing the same artifacts I'm guessing there is something Torque specific going on that I'm missing, the diffuse and Normal maps are both at 1024 x 1024 but I've tried to change the size of the Normal map to 512 as well as 2048 but with no difference. Both files are in .PNG format.
01/11/2010 (4:44 pm)
Thanks for the reply Ben! I'm afraid an offset isn't the problem though, below is a image with a flat normal map, so we can pretty much rule out any problem with the actual normal map image file itself (right?):
And here is a render direkt from blender with the real normal map showing as it should: (granted it's pretty ugly but there are no artifacts)

My process: I (1) built the tree in Zbrush, (2) used decimation master to get the lowest res to 6K then (3) exported it as a .obj to blender, (4) made the UV map by hand and (5) imported it back into zbrush where I (6) rendered the normal map and finally (7) exported the .dae from blender into Torque 3D.
If the Diffuse map was showing the same artifacts I'd know that it was a problem with the normals (of the point) or the smoothing etc. but since it looks perfectly fine with just the diffuse map I'm at a loss. I've still tried everything I can think of to make sure there are no errors in the topology or normals of the model itself but with no result.
But seeing as the flat normal map is still showing the same artifacts I'm guessing there is something Torque specific going on that I'm missing, the diffuse and Normal maps are both at 1024 x 1024 but I've tried to change the size of the Normal map to 512 as well as 2048 but with no difference. Both files are in .PNG format.
#3
Might be a smoothing group problem. Try exporting the collada .dae with just a simple new material on it. No maps. Does the error still occur?
I have had issue with smoothing groups with 3d max where to fix the problem is creating a new cube mesh object. Attaching my model subgroup to it (resetting the mesh smoothing group), and delete the cube.
Other than that, I too am stumped. Get it? stumped, your tree.. haha
01/11/2010 (4:57 pm)
Hmm. Wow, looks like troubleshoot heaven. Might be a smoothing group problem. Try exporting the collada .dae with just a simple new material on it. No maps. Does the error still occur?
I have had issue with smoothing groups with 3d max where to fix the problem is creating a new cube mesh object. Attaching my model subgroup to it (resetting the mesh smoothing group), and delete the cube.
Other than that, I too am stumped. Get it? stumped, your tree.. haha
#4
What I am guessing here is: the decimation or exporting from blender is breaking vertex welds or perhaps there is an issue in T3D ..*but I'd point to the first 2 out of the 3 ideas with confidence.
Check to be sure all of your verts are welded and then export a DTS and
a DAE. Compare the rendering of the DTS to the DAE. Does the issue remain ?
01/11/2010 (4:58 pm)
..changing the map size won't affect anything..but I can understand your attempts to try anything to fix this. This is either a geometrical issue or a rendering issue. This is not texture related.What I am guessing here is: the decimation or exporting from blender is breaking vertex welds or perhaps there is an issue in T3D ..*but I'd point to the first 2 out of the 3 ideas with confidence.
Check to be sure all of your verts are welded and then export a DTS and
a DAE. Compare the rendering of the DTS to the DAE. Does the issue remain ?
#5
Ben: There are no smoothing groups, just a general smoothing of the whole thing, this has never been a problem with any of my other models, and I'm pretty sure that a smoothing problem would show up when I just have the diffuse map on as well. I've tried exporting it without any smoothing and it shows the model with just the diffuse as blocky geometry, when I export with smoothing it comes out like in the first screenshot, smooth and clean.
The problem only shows when I smack on the normal map, the smoothing is perfect with just the diffuse.
eb: The decimation was made in zbrush before i exported it to Blender and shouldn't effect anything. To be sure I went over the welds and there are nothing wrong with them, no duplicate vertexes or hidden seams. I'm pretty sure any problems like that would show up on the smoothing of the diffuse map to though, right? One of the reasons I got back to Torque now after all these years was the Collada support, I used to work with the DTS exporter way back and it always gave me some kind of grief so I really want to give Collada a shot. That said a comparison is good, where do you get the latest version of the blender .dts exporter these days?
I tried finding one of the odd triangles in blender and simply remove it by welding the vertices and that actually made it go away in Torque without creating any new artifacts or changing the location of the others, this is not really an option though as I would have to alter the whole mesh to get rid of them all and that's not a acceptable way to work, being limited by the whims of whatever app is messing it up. The artifacts seems to always be in the same place but whatever I try to do, flipping the normals or making sure the welds are correct they only go away if I remove them, I need to figure out how to fix them instead :/
What's bothering me is the inconsistency when both Diffuse and Normal map are using the same model and UV map, how is it possible for just the normal map to freak out?
Right now I'm thinking that something is wrong with those specific areas in the model but besides normals and welds I have no idea what to look for, again, it looks perfect with just the diffuse, everything is working until i smack on the Normal map, is there anything in the geometry that the normal map is relying on that the diffuse map ignores?
Sorry about the rant, I just really need to figure this out so I can make models and invest time after this without being paranoid about this happening again without any way to fix it :/
01/11/2010 (7:40 pm)
Thanks for the replies guys.Ben: There are no smoothing groups, just a general smoothing of the whole thing, this has never been a problem with any of my other models, and I'm pretty sure that a smoothing problem would show up when I just have the diffuse map on as well. I've tried exporting it without any smoothing and it shows the model with just the diffuse as blocky geometry, when I export with smoothing it comes out like in the first screenshot, smooth and clean.
The problem only shows when I smack on the normal map, the smoothing is perfect with just the diffuse.
eb: The decimation was made in zbrush before i exported it to Blender and shouldn't effect anything. To be sure I went over the welds and there are nothing wrong with them, no duplicate vertexes or hidden seams. I'm pretty sure any problems like that would show up on the smoothing of the diffuse map to though, right? One of the reasons I got back to Torque now after all these years was the Collada support, I used to work with the DTS exporter way back and it always gave me some kind of grief so I really want to give Collada a shot. That said a comparison is good, where do you get the latest version of the blender .dts exporter these days?
I tried finding one of the odd triangles in blender and simply remove it by welding the vertices and that actually made it go away in Torque without creating any new artifacts or changing the location of the others, this is not really an option though as I would have to alter the whole mesh to get rid of them all and that's not a acceptable way to work, being limited by the whims of whatever app is messing it up. The artifacts seems to always be in the same place but whatever I try to do, flipping the normals or making sure the welds are correct they only go away if I remove them, I need to figure out how to fix them instead :/
What's bothering me is the inconsistency when both Diffuse and Normal map are using the same model and UV map, how is it possible for just the normal map to freak out?
Right now I'm thinking that something is wrong with those specific areas in the model but besides normals and welds I have no idea what to look for, again, it looks perfect with just the diffuse, everything is working until i smack on the Normal map, is there anything in the geometry that the normal map is relying on that the diffuse map ignores?
Sorry about the rant, I just really need to figure this out so I can make models and invest time after this without being paranoid about this happening again without any way to fix it :/
#6
01/11/2010 (8:12 pm)
If the issue was smoothing or loose vertices it would show on the diffuse mapping as well, if there is nothing in the normal map itself that is causing the error then it must be in the low poly normals as they relate to the high poly normal map. By placing the blank normal map in the normal channel you are displaying essentially the normals of the polygons without the hires details. To me this indicates right off the bat that either ben was correct in his initial guess that the low res model doesnt match the hi res in that Your silohettes between the two must match exactly,(just because you used decimation master does not necissarily mean they match exactly, you still need to check it yourself) or there is an error in the mesh normals (possibly caused by decimation master) in those areas, and then the best way to correct it would be to delete and redraw the polygons in. If you have 100 bucks to spend i would highly recommend topogun, it is alot better then decimation master for reducing polygons while maintaining silohette.
#7
01/11/2010 (8:18 pm)
also great idea using a blank normal map to hilight the fact that the issue is with the model not the normal map. Remember a normal map creates the illusion of geometry based on the normal projections of the polygons, another way to check if everything is cool is in blender turn on your normals and see which way they are pointing, my guess would be that some of the polygons have normals that dont make any sense, i dont know about blender but some of the high end programs like maya and 3ds have a flip normal button that can sometimes fix similar issues. However what is wierd is that you only see it in torque, have you tried perhaps viewing the model with a directx viewport shader? (not sure if this is possible in blender but i would assume it is)
#8
I don't use blender, but you could try resetting the xform back to World Coordinates.
Try: press CTRL-A and choose 'Scale and Rotation to ObData'.
This might help when exporting to another app.
01/22/2010 (7:22 pm)
If it looks ok in blender and exports with triangles, it could be the Xform. I don't use blender, but you could try resetting the xform back to World Coordinates.
Try: press CTRL-A and choose 'Scale and Rotation to ObData'.
This might help when exporting to another app.
#9
For trying the route via DTS you can probably find the latest DTS exporter for Blender here.
From my own tests and from what I've heard, the Collada exporter in Blender has a lot of problems and shortcomings so this might be a problem in the exporter. You could also try going via UUnwrap3D by exporting from Blender in a different format.
01/23/2010 (9:40 am)
For trying the route via DTS you can probably find the latest DTS exporter for Blender here.
From my own tests and from what I've heard, the Collada exporter in Blender has a lot of problems and shortcomings so this might be a problem in the exporter. You could also try going via UUnwrap3D by exporting from Blender in a different format.
#10
01/23/2010 (6:03 pm)
MAX and Maya have the same problems with their default Collada exporters. Using the OpenCollada one solves the problems in those programs. I'm not sure which viable solutions you have for Blender, short from trying exporting directly to DTS or using a different format and converting to Collada elsewhere as Rene suggested.
#11
Shoot me over the file, I'll take a 'gander'.

P.S. I have never used Zbrush's decimation feature..I always retopo. Does the feature create clean quads or shifty-random-triangles ?
01/24/2010 (6:48 pm)
Sorry I did not reply earlier Jan-Ove..I did not notice there were replies to the thread.Shoot me over the file, I'll take a 'gander'.

P.S. I have never used Zbrush's decimation feature..I always retopo. Does the feature create clean quads or shifty-random-triangles ?
#12
www.torquepowered.com/community/forums/viewthread/112211
xNormal is a free third party app that bakes normals(and more).
www.xnormal.net
04/19/2010 (4:45 pm)
A link to another forum with a similar issue.www.torquepowered.com/community/forums/viewthread/112211
xNormal is a free third party app that bakes normals(and more).
www.xnormal.net
#13
Tom Spilman has the female model from Ben's linked thread and my link, in his possession. The file is from Jeff Meyer.
04/19/2010 (8:11 pm)
There is a thread in the private T3d forums that extends the conversation from the link that Ben posted above. www.torquepowered.com/community/forums/viewthread/112831Tom Spilman has the female model from Ben's linked thread and my link, in his possession. The file is from Jeff Meyer.
Torque 3D Owner Ben Quirk
But I think, for this problem however, is it looks like the zbrush Mesh is so offset from your original mesh. When the topology of the base low-res mesh does not match up correctly with the normal map that was baked at a high-res, then these errors can occur. Your rocks came out much better because the deformation was not offset too much.
Did you export your new mesh at low-res from Zbrush back into blender before adding the normal map? This might help.
Zbrush tries its best to align the low-res mesh with the high one, but sometimes can't always get it. The normal maps are correct, but the low-res mesh is not.
A quick fix, is to take the normal map into gimp/photoshop and smooth out the areas you are having problems with.
Another method is to take the high-res mesh, export it to blender or another program called topogun, and rebuild the topology in a low-res there. Then bake in the normal map (the better method).
This is more of a Zbrush question and probably should be asked on the Zbrush forums for better help.
Here is a good link which will explain more about what is happening to your normal map:
http://www.cgarena.com/freestuff/tutorials/maya/varga/index.html
Good luck!