Home Unreal Engine

Material displacement looks jaggy

polycounter lvl 4
Offline / Send Message
Twixxo polycounter lvl 4
Trying to get displacement working for materials, but the result is very jagged/messy. I've tried all sorts of different values for the tessellation multiplier and world displacement, yet the results are still poor. The preview looks good. I tested it on a plane and cube with plenty of vertices but the result seems the same as if applied to a plane with no extra vertices.



Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Your mesh should have more division in itself. You can't tessellate a simple plane. It should have some additional edges on it and then it will work better. There is also an option in the project settings to increase the addaptive triangles in tessellation, but you should just use some base division.
  • Twixxo
    Options
    Offline / Send Message
    Twixxo polycounter lvl 4
    Obscura said:
    Your mesh should have more division in itself. You can't tessellate a simple plane. It should have some additional edges on it and then it will work better. There is also an option in the project settings to increase the addaptive triangles in tessellation, but you should just use some base division.
    The plane and cube I've tested this material on have what I believe are plenty of edge loops.


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Ok that should be enough. Can we see the textures? I started thinking that it should be a matter of angles. You can't really have fully 90 degrees angles either, and you should use slight slopes.
  • Twixxo
    Options
    Offline / Send Message
    Twixxo polycounter lvl 4
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    This is what I meant... The first picture shows a circle displaced and made to be a normal map with very little to no bevel:

    This next image shows the same shape with some slope applied:

    these were captured in Substance Designer, using the same tessellation setting. On the first picture we can see similar artifacts to yours.

    This issue is similar to how normal map behaves with 90 degrees angles elements when the lowpoly representation is a plane compared to the detail (from polycount wiki)


    What you are doing is also a very wasteful use of displacement. You could take a plane, put it in Max or Maya or whatever, apply the displacement map, protect the vertex normals to keep the plane normals, apply some optimization, and use that as a modular lowpoly piece.
  • Twixxo
    Options
    Offline / Send Message
    Twixxo polycounter lvl 4
    Interesting. I recently started learning designer and encountered those stretch artifacts where the rounded tiles overlap- so I applied a slight slope to them before even taking it into Unreal. Here is how it appears in Designer for me:


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Like I pointed out above its very inefficient to use tessellation on that surfaces. There is a cool trick though but it would lock you to use this as a modular piece, which I'm not sure if its a problem but it definitely works very well, even though the topology will look rather funny. But it doesn't matter since its a static object. It goes like this. Take a divided plane, protect its normals:

    Apply the displacement, make sure the normals are still protected so it shows the normals of the non displaced plane. This is important so your normal map will work correctly!

    Apply some automatic optimization and make sure you still have the protected normals. Whoila:

    From 20k we went down to a few hundreds of faces and you have a mesh that works with your normal map and doesn't need tessellation. But... You will always get some of those artifacts with displacement because simply those heavy angles  doesn't have enough resolution or geometry or pixel density because of the stretching. Making the edges of the slope beveled too helps more but sharp edges will never work unless you go crazy high with the poly count. Which I don't think its any good even for a portfolio piece. Because then It would show that you can do it only this inefficient way. Its just better to model them and uv them out properly at the first place. In my personal opinion, those crazy tessellated substance materials are very misleading in general, unless otherwise it looks very pro. Many people started using displacement in wrong ways and they think its normal to have everything tessellated. In your case for example , instead of doing the trick I've shown you could have a plane with low poly cylinders laid out on it. That'd be the real way to do it. Thats how it would be actually done in a real game. Or worse yet, just a plane with normals depending on how close it can be seen.
  • Twixxo
    Options
    Offline / Send Message
    Twixxo polycounter lvl 4
    Makes sense. Thank you for taking the time to help me out! I'll have to keep experimenting and see what works best for my purposes. This trick you showed me is definitely useful though, and I may use it in the future!
  • Twixxo
    Options
    Offline / Send Message
    Twixxo polycounter lvl 4
    I solved the issue- I'm so silly. I didn't know/realize that when you publish a .sbsar from Designer that it doesn't export the height with it for whatever reason. I used the Substance plugin for Unreal to import the material and automatically hook everything up, then just add the multiplier nodes for height. I never noticed I only had 5 textures instead of 6 and that height was missing- I was using AO for the height which was why it looks so wonky. After getting the height map and plugging that in, the displacement works as intended!
Sign In or Register to comment.