Page 1 of 1

3dsmax: welding seams on UVW maps

Posted: Tue Feb 13, 2007 3:46 pm
by obsidian
I have a low and high polygon model, all vertexes and edges are welded, a single smoothing group applied to the whole mesh on both models. Everything up to this point looks good.

I UVW map the low polygon model. Generating the normal map from 3ds Max and the normal map does not tile along the UVW seam - the normals look mismatched. So I export both models out to ORB and render the normal map from there. ORB does a perfect job, no seams on the normal map.

To test, I import the normal map from ORB into Max and apply it to the low polygon model, and the normal map looks as if it would tile perfectly... no visible seams or anything. However, exporting the model in game, there again, is an obvious edge where ever there is a seam on the UVW map.

From what I can gather...
  • There is no problem with the mesh itself
  • There is nothing wrong with the normal map I'm using from ORB
  • There is probably something wrong with the UVW map seams and I have to "weld" them somehow so Max recognizes that it should be a "soft" edge
I don't know how I should do this, so if anyone has any insights or if you can point me to a handy tutorial that would help.

Posted: Tue Feb 13, 2007 5:22 pm
by broar
Could you post a pic?

Posted: Tue Feb 13, 2007 6:51 pm
by obsidian
Image
High poly and low poly models (they are usually occupying the same space, but I moved them around for illustrative purposes)

Image
You can see where I have the UVW seams here

Image
Normal map tiles perfectly

Image
In game shot with an obvious vertical seam on the top of the model. There is also a seam on the inside edge of the ring that you can't see in this screenshot

Posted: Tue Feb 13, 2007 7:13 pm
by Foo
I seem to remember this being a complete nightmare unless you alter the way the mesh was created.

Sorry I can't be any more help than that, it's been a while. I'm just doom-saying :D

Posted: Tue Feb 13, 2007 7:22 pm
by obsidian
I don't think this is specifically engine related, rather Max isn't doing what I want. When rendering the normal map directly from Max, the normal map didn't tile properly, meaning that as far as it was concerned, it thinks there should be a hard edge there. ORB seemed to do the job the way I wanted it to. Theoretically, Max should be able to do the same.

If there is some other voodoo with D3 seams as well, then I'll work around that later.

Posted: Wed Feb 14, 2007 3:06 am
by Kat
It's Max, there's a setting somewhere to sort of forces it to do what it should be doing, a couple of peeps on the polycount forums have had problems like this so it might be worth popping over there and searching the normal map threads.

Posted: Wed Feb 14, 2007 5:33 pm
by obsidian
Okay... so all I had to do was invert the green channel. :)

Max has the option to do this in the Render to Texture > Projection Options dialog. Flip "green down" to "green up".

Posted: Wed Feb 14, 2007 11:53 pm
by urgrund777
does this still look correct in D3 now? strange that inverting the green channel has an effect on a seam, as you're just changing tangent space information?

What does the normalmap look like?

out of couriosity, another problem with the welded vertex causing a seam is that they both share the same tangent and bi-normal, if you unwravelled that tourus into a pipe, you'd see that - were the vertex sharing that info - the tangents and binormal would be rotated, even thought he vertex normal is the same... this can also cause seams.

Does D3 export with multiple T/BiN's per-vertex? or does it work on UV verts instead?

Posted: Thu Feb 15, 2007 1:42 am
by obsidian
Image
Looks good now.

Image
These are two normal-maps generated by Max, except the second one has the inverted green channel compliant with Q4.

Image
Haven't figured out this one yet. This was rendered by Q4's -renderbump option. Other than the trippy colours, for whatever reason it's using world space vectors instead of tangent space. When using this, the result is that lighting looks like it's permanently coming from a single direction.