Standard Shader Tessellation, best practice?

Hello there!

I am in pursuit of a ‘realistic’ looking game, and since I have never done that before, I wonder what would be the best practice to create a game like that.

For environment objects like rocks, buildings, would you either:

  1. Use the Standard Shader and different LOD models, most complex LOD being pretty high poly.
  2. Use a custom Standard Shader on a low poly model, with Tessellation and a height texture.

The latter shader I have not found, even after some online search. What is the usual approach on detailed, good looking assets?

Sorry for the noob questions, hope you can help me out!
RyFridge

1 is the usual approach. 2 is not commonly used at all, particularly since it is DX11 locked and most people do not want to restrict themselves to DX11. Unity is, well, not necessarily dominated, but has a lot of mobile developers and that means a lot of people using DX9 (I would not say that is because Unity is bad for high-end, but rather, all the mobile developers choose Unity over alternative options, leading to high numbers of them here).

It’s not a simple task to rewrite the standard shader with tessellation, so you would need quite a bit of shader experience. If you don’t have that, then I would recommend going with approach #1. Triple-A titles are moving towards tessellation in the latest generation of games (just the past year or two) but it’s only a very recent trend.

Hey Plutoman,
thanks for the detailed information!

Seems like I’ll have to get a hang of LODs then. If I could ask one more thing:
Now, I am currently using photo textures I made myself, I created all the maps I need for the Standard Shader. If I want to create a fitting high poly model from that (and for that), I guess I would create a low poly model, then subdivide it (for me it’s Blender) and distort it by my Normal Map. Then for the LODs, I’d edit the subdivide level.

Example: An underground tunnel would be distorted by my UV applied rocks-texture Normal Map?

Also, I would be interested in what offers the best performance in Unity:
All smooth edges, all hard edges or a mix or smooth and hard edges on a model. (modified by a normal map for the high poly feel of course).

Thank you.

I’m not entirely sure, but I would take a guess that it’s not going to matter - what matters is the numbers of vertexes and triangles the renderer is processing. The GPU processes them all independently, so whether they’re smooth or hard, it does not matter. It’s pure numbers.

I’m not sure if I entirely understood you correctly for what you meant by smooth vs hard edges, as I’m a graphical programmer, not a graphical artist. I couldn’t make a mesh or texture to save my life! But I’m fairly familiar with the rendering pipeline as of now, I wouldn’t call myself an expert, but familiar. I won’t be able to answer any questions on the LOD however, I’m using a mix of occlusion culling and custom tessellation shaders myself, but I’ve spent the last year in shader code. Unity does have a built in LOD system so if you have meshes that are what you want for LOD, then set it up however it looks good to you!

Hi there RyFridge,

Plutoman answers very well all of your questions, but not about hard edges.

Unity splits edges to represent hard edges (as 90% of 3D programs: Maya, Blender, 3Dstudio…). That means that every hard edge you add to your model equals 2 edges. That means that the model have more performance cost.
The same happens with UV seams: every UV seam are split in to 2 edges.

So the optimal way is to have hard edges in every UV seam (because the engine will only split the edge into 2 edges).
The benefits of this are not only about Unity 3D performance, this will solve 90% of artifacts in your tangent space normal map baker (remember to use cages).

But thats only about performance, about quality someone once said that the most important is to have UV seams on every hard edge, but you dont need to have hard edges on every UV seam.

Sorry about my english.

Thanks both of you for your answers!

@Plutoman
That seems logical, thank you. I will go with the LODs then, since there seems to be a lot of tutorial resources.
You say that you are working on shaders… If you have any time, it might be easy for you to answer my other open question regarding making a hole in a terrain. If not, no problem, of course :wink:
(I hope crosslinking another question is okay)

@Project-Mysh
So that means I would try to have big, smooth areas and hard edges where they end or where they are cut by a seam anyways? Thank you! (your English is as least as good as mine!)

Hi there RyFridge,

The creator of Handplane have a very good video tutorial about how perfectly use Hard edges, and explains all I said before better than me. Check this video:

https://www.youtube.com/watch?v=ciXTyOOnBZQ

Hope that helps you.

1 Like