9/12/2023 0 Comments Tessellation ue4It then uses a height map aligned to the mesh’s UV coordinates, multiplied by the Tessellation Height Factor, which basically just tells the shader how far in world units the surface should be displaced from their original position, and scales the normal vector by that amount. The way this works is that for every pixel this shader renders, it takes the mesh’s vertex normal which, in case you don’t know, is a normal vector pointing outwards from the surfaces of the mesh, linearly interpolated between mesh vertices according to smoothing groups and face orientation. Here’s a very basic tessellation material setup: That will enable the World Displacement and Tessellation Multiplier output pins in the material, and allow you to connect things to it. So, with that disclaimer out of the way, let’s set up a tessellation material! It’s pretty straightforward: the first thing we have to do is to enable tessellation in the material properties, by setting the D3D11 Tessellation mode to either Flat Tessellation or PN Triangles. Older graphics cards without full DirectX 11 support might not even support it, so take that into account as well. The tradeoff for this is performance – the added tessellation detail comes at a rendering cost, and you should always take care to check whether a given mesh really needs tessellation or not – so don’t simply use it everywhere. This is done through the use of height maps, monochrome textures that tell the renderer which parts of the texture are elevated and which ones are not. Now, the most useful aspect of tessellation is that you can use that dynamically created geometry and offset it from the base mesh, creating not just the illusion of detail as you would normally do with normal maps, but add actual geometric detail. With tessellation enabled, those faces will be subdivided dynamically, based on the tessellation multiplier, like so: Consider this standard template cube model that comes with the engine: What tessellation does is to subdivide a 3D model’s geometry to add more detail, and it does this entirely on the GPU. I’ve been experimenting with this recently because the usual techniques involving normal maps to add surface detail to an object simply don’t hold up well in virtual reality, and my development is focused on VR. Let’s talk a little bit about tessellation in Unreal Engine 4.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |