Hey guys,
I got a problem regarding the creation of a basic normal map. I'm trying to acheive a perfect result projecting a chamfered box onto a 6 sided box.
Here you can see the low poly and the high poly:
Results:
Here is the normal map baked in 3ds max (before flipped the green channel for Marmoset):
Then, this is the flipped version used in Marmoset:
Neither of those results seems perfect. The best one is the second one in my opinion. Although, we still can see seems even if I added padding on my render.
Any thoughts on how to create a seemless version with proper shading results? Without addind an edge loop around the corners (chamfer). Or maybe thats not possible since the cube is too drastic compared to the chamfered box?
Thanks for your input,
Replies
My normal are setup correctly. I already flipped the green channel (since it was baked in 3ds max). The reason why you don't see it on my normal map is because I flipped it in marmoset directly. Maybe I should flip it on the normal directly to avoid confusion in this thread.
See how it looks when the channel is not setup properly.. even worst:
Thanks!
You can also change the default tangent space, edit-> prefs, this will apply to all newly imported meshes.
Thanks for your answer Neox and EarthQuake.
Since I baked in max, I had to invert the Y in Marmoset. The results can be seen in the first post on top.
As far as I understand, my tangent are set properly since the bevels are on the proper side. The other post afterwards was to show how it looks with the wrong tangent.
So, setting up Marmoset to read the Y channel correctly for the next time is helpful (in the preferences), although it does not resolve my issue discussed in my initial post. Unless I didnt understand your comment EarthQuake?
Thanks for your input! :-)
http://www.polycount.com/forum/showpost.php?p=1421221&postcount=191
[ame="https://www.youtube.com/watch?v=kGszEIT4Kww"]https://www.youtube.com/watch?v=kGszEIT4Kww[/ame]
you do not need to invert green
better believe earthquake, he works at marmoset
besides that, scruples might beright as well, did you bake with a projection modifier?
I beleive earthquake for sure ! I'm going to test this right away. I think I misundertood the post of EarthQuake at first. I didnt see the mesh setup he was talking about so I though he was talking about the Y invert in the normal map settings.
I also watch the tutorial that busterizer posted. Very interesting! Although, I think I did the exact same thing in my test 02 (hard edges + 6 islands + cage). In the video, he works in maya and create a cage manually. In max, Its called a projection and its a modifier that you stack on top of your mesh. I think it does the same thing? I'll try to bake in xNormal to compare as well.
Let me know if you think that the projection process in max differs from the video above (Maya + manual cage + xNormal).
Thanks again guys, your input is much appreciated :-)
Here is my final result in Marmoset. I feel we still see a small edge connection on the corners but I guess thats the best it can get:
Marmoset Viewer:
https://dl.dropboxusercontent.com/u/33632100/Marmoset/CubeTest.html
I Baked with xNormal (although, I got pretty much the same result testing with max):
- Smoothing group are all hard edges on my low poly;
- Uvs have 6 islands with padding;
- Cage was exported using the low poly cube with a push on it (which I didnt average the normals before exporting. It's still all hard edges).
EarthQuake:
My last point bring me to a last question (cage normals). I read your answer to a question about projection and cage normals in an old thread (http://www.polycount.com/forum/showpost.php?p=1421221&postcount=191) and I'm not quite sure to understand how you average the normal of your cage.
I don't know if you are familiar with 3ds max but, when you set a projection on a low poly mesh (through the projection modifier), the only controller you have is a ''push'' button which allows you to push out the projection cage. I don't think you can change the normal of that cage. Is that possible that it averages the normals automaticly?
Also, when I did the bake in xNormal, I tried too different cage export settings (one with 1 smoothing group and another one with all hard edges). The resulting normal maps were the same. Is that possible that in xNormal, it will automaticly average the normal on the cage?
Thanks for clarifying this with me. Thats pretty much the only part I'm missing right now to understand the full process
Thanks for checking this. The 3ds max result is previewed in max or in marmoset? Can you share your scene? I was not able to make it perfect in Marmoset. Thanks again!
I have a script for maya if you want:
string $uvBorder[];
string $edgeUVs[];
string $finalBorder[];
for ($subObj in $objList) {
select -r $subObj;
polyNormalPerVertex -ufn true;
polySoftEdge -a 180 -ch 1 $subObj;
select -r $subObj.map["*"];
polySelectBorderShell 1;
$uvBorder = `polyListComponentConversion -te -in`;
$uvBorder = `ls -fl $uvBorder`;
clear( $finalBorder );
for( $curEdge in $uvBorder ) {
$edgeUVs = `polyListComponentConversion -tuv $curEdge`;
$edgeUVs = `ls -fl $edgeUVs`;
if( size( $edgeUVs ) > 2 ) {
$finalBorder[ size( $finalBorder ) ] = $curEdge;
}
}
polySoftEdge -a 0 -ch 1 $finalBorder;
}
select -r $objList;
If you have something like this,you need to cut your UV and make hard edge because normal map can't offset so much angle:
SCRUPLES
I took your files and did a max scene with it. Still getting that little shading problem. Maybe I'm doing something wrong with my cage? This is my scene:
https://dl.dropboxusercontent.com/u/33632100/Cube.zip
Thanks again!
The problem with the 512x512 map is the edges of the uv's aren't aligning perfectly with any pixel grid so when marmoset filters the texture there is a very small gradient error.
So you could conceivably fix this by moving the uv's around without having to increase the texture size.
Oh and about Xnormal's slightly less accurate normals it might be explained in this thread here http://polycount.com/discussion/148303/of-bit-depths-banding-and-normal-maps/p1
hard edge= you need an uv split there
uv split= you not must have to have a hard edge there
Off course it is :-) The cube is the most simple example we can get I guess but after that, it can relates to a more complex mesh. I was only trying to get a perfect result and then, I could apply this technique on a real bake. Thanks for testing this. I think its pretty clear now.
OBSCURA
You're absolutely right (put a UV seem where there is a hard edge). Although, what you just said was clear for me for a while now. If you look at my first posts, the cube #2 had 6 islands, hard edges and padding (the normal map was uploaded too). We can still notice the edge in Marmoset. Like SCRUPLES said, its pretty much because of the texture resolution. You wont get a 100% perfect seamless bake when zoomed in at 500% I guess. Even with padding, witch I added in all my tests.
Cheers