I was trying to reproduce a tecnique from Sunset Overdrive which is described in this talk -
http://www.gdcvault.com/play/1022324/The-Ultimate-Trim-Texturing-Techniques but ran into some problems.
First, it simply doesn't work for me because I still see seams.
Here's how it looks now:
http://i.imgur.com/vQewiVy.pngSo I was wondering what I'm doing wrong.
1)It could be that my normal map rectangles which came out from NDO arent 45 degrees. The image from the slide 15 looks like it went straight from NDO but I might be wrong
2)I could place my UVs wrong (most likely). They look like that now -
http://i.imgur.com/SmP7QLB.png It seems that they need to be placed with the exact offset but... I don't know how to put them. May be set some padding between islands? How can I calculate it?
3)Something is wrong with my vertex normals. The edge is soft now and normals are averaged.
So can anyone break down this technique? This would give everybody a huge boost in production as well as improve visual fidelity.
Replies
Top: 128, 218, 218
Right: 214, 124, 189
Bottom: 130, 36, 218
Left: 37,128, 217
In Maya with High Quality viewport rendering I did not get seams: http://imgur.com/HhgbDqY
I should have test baked an actual 45 degree bevel and see what the numbers were, but I guess I got lazy after the hand painted worked.
I used hard edges anywhere there was a bevel.
The UV padding isn't that important. As long as the UV border isn't straddling 2 different normal directions and you have enough padding to account for mipmapping you should be fine.
So those were my results, if you have Maya I did write a MEL script with the help of a friend and some code from Brian Keffers Ninja UV Script. It auto scales and layout the UVs to have equal texel density. It's still needs a bit of cleanup code but I'd be happy to share if interested.
Here's how that normal map looks in Blender.
It's a little weird looking but very modular and easy to set up, so I really like this technique. And compared to the bevel/custom normals method, this way gives much less in the way of subpixel triangles.
Also keep in mind that padding is very important. You need to bake/create these sheets so that you have enough room. It can get a little crowded, but it works wonderfully.
I gave this a shot a few months ago and got some decent results. But I baked my sheets, and you can get decent results from hand painting them too.
you'll be happy to know that it works spectacularly in UE4
When I first saw these slides, I wondered, about the seams due to padding offset and texture detail along the edges. Also was a bit confused when it shows the part about doing the curved bits that aren't all in line. I wish they would release the actual video to get some insight into this.
@Makkon how did you deal with edge details on your last image?
I did some tests myself and once you make sure the edges are at 45 degrees they match up well.
Otherwise, I just used a 3axis worldspace material projected over everything, seems to unify it. If it's still a problem, you can soften the noisy details at the edges.
The illusion falls apart if we take a look from a different angle -
It doesn't work without hard edge (so far) and the issue may come out from my messy UVs. I'll continue to experiment.
I kind of agree with beveling edges and using flat textures, more versatile imo.
Why is a long and thin triangle expansive?
And I'm afraid I don't even start to understand the second point.
If you add more cuts then instead of something being 6 tris vs 4 tris, it is now 12 or 24 tris depending on the amount of splits vs 4 tris. Also authoring the actual geometry might take longer with the bevels and having to edit vertex normals.
I also remember reading somewhere that in Alien Isolation, where they used a lot of bevels and normal editing rather than normal maps, if they made their bevels to small they would have aliasing issues. Not saying this was the case here, but another thing to keep in mind.
I think it's best to use both methods as called for. Think of something like a metal or wooden bridge, made of a lot of planks or girders - using bevels on all those edges will add a lot of triangles and it will be more work involved to correct the normals (and they might break when editing later, etc). I'd use bevels on the close-up parts and keep hard edges everywhere else (they'll look pretty good and soft from afar).
And the secret to techinque was a PERFECT 45 degree angle on a normal map. NDO doesn't produce it (I know some people managed it but I couldn't). I literally made a plane, rotate it at 45 degree angle and built a trim sheet from these planes. Than I made a cage to bake which sits righ atop trim shapes, baked it and that was it.
I'll try to search for the scene where I did this and upload it. The technique would probably work for me if I had a guy who scripted UV islands automatic aligning to these trim shapes.
The extra edgeloops (2 division bevel with no chamfer) is viable because of easy removal. You can delete the edgeloops at any time and make changes easily. Great for LODs.
Single bevel with custom normals looks good in VR, but it's hard to fix when you need to make changes, and the custom normals workflow can be a slow down.
I think a combination of these approaches, when keeping in mind the asset's use, complexity, distance to player, and other variables is best. Whatever works, you just have to weigh your options.
http://polycount.com/discussion/154664/a-short-explanation-about-custom-vertex-normals-tutorial/p1
If you are a Maya user, this script has been really wonderful so far
http://www.mapcore.org/topic/16292-vertex-normal-script-for-maya/
Your proposed solution, adding more cuts to the wall, actually increases the pressure on the rasterizer. I measured approximate pixel distances using the measure tool. Observe:
One cut down the middle makes the situation worse:
With no bevel there's just one non-silhouette edge that takes up around 1463 pixels. So if you use just a single bevel for everything, you'll have lower vertex processing cost and a better visual result compared to hard edges (assuming here you can use hard edges off seams if you want), but you'll generally put about twice as much pressure on the rasterizer. It's OK to use bevels for some things, but you should avoid them on current hardware if there's another way that looks just as good, and make sure that things that have bevels have LODs that don't have bevels. It's more important to avoid tiny triangles that have substantial portions that are smaller than a pixel (which is another big reason why beveled meshes are kind of bad for performance.) I think it's pretty safe to say that if you want to maximize performance, you should stick to bevels that are 1 quad across rather than 2. 2 is OK if you're making a portfolio piece or personal work and want UV layout to be more straightforward, otherwise you should stick to 1 because having 2-width bevels is definitely going to bottleneck the rasterizer.
One artistic thing I like about this technique in particular is that it's pretty easy to vary the apparent width of the bevel, because it's all in the texture.
Honestly a bevel here and there isn't going to absolutely kill your performance. You need a lot of them to bottleneck the rasterizer.
Yes, especially if being mipped down (high quality mode = 2k trim texture, low quality mode for lower end machines = 512) there should be quite a lot of padding to prevent bleeding on lower resolutions
https://youtu.be/s_eXFbAuuuA