Author Topic: Displacement is still rubbish  (Read 1479 times)

2025-01-19, 14:27:01

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
Are there any plans to drastically improve displacement because frankly it's still absolutely terrible and absolutely riddled with artifacts.

The ONLY way to get displacement to behave correctly is by having a perfect quad mesh with dense uniformly sized quads, which is ridiculous in the context of modeling buildings with chamfered edges because the size of the uniform quads would need be driven by the tightness of the edges around the chamfers.  And absolutely nobody is modeling walls/buildings with perfectly uniform tiny quads.  Model basic wall, add edge loops for window openings, delete poly to create window opening, chamfer modifier for rounded corners.  That should be more than enough for modeling buildings.  But no, not if you want to use displacement.  Then you have to make sure the geometry is perfectly uniform quads.

It doesn't even work on simple flat surface, see the driveway in the artifacts screenshot below.  That's a spline for the main shape, then extruded, then edit poly with everything but the top face deleted.

The screenshots below are an override material with preserve disaplacement enabled. 1px for the displacement.  5k render.  The override shader has wires to highlight just how many artifacts there still are.

I've also done a simple version with some simply geometry, however, in this example I've made the driveway a really dense quad mesh so you can see how the displacement improves.  But I couldn't imagine refining that simple piece of geometry to a dense uniform quad mesh just to get displacement to work properly.  It's just not practical in the context of a full scene with full buildings as opposed to simplified example geometry.  The mesh in the viewport screenshot should be more than enough for a typical building.

Displacement is a mess.

2025-01-19, 15:41:16
Reply #1

arqrenderz

  • Active Users
  • **
  • Posts: 1061
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
I'm totally on this one, maybe 3 years ago i had a brick facade where bricks had a specific direction on each part of the facade, it was totally impossible for corona to make a good displacement, the same maps with arnold render made a perfect wall, the response at that time was like mehh, not that important for the users for us to care...
We have a current project with another brick facade where sometimes we get artifacts, sometimes we don't, its just a flip of a coin (same cameras, same geometry's )

2025-01-19, 15:47:30
Reply #2

arqrenderz

  • Active Users
  • **
  • Posts: 1061
  • https://www.behance.net/Arqrenderz1
    • View Profile
    • arqrenderz
Found the post, 2020-11-11   https://forum.corona-renderer.com/index.php?topic=31527.msg178440#msg178440

Nothing has changed.

2025-01-19, 15:48:19
Reply #3

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
A lot of the time the artifacts are less visible because of the texture which is why I always check with this override shader.  Once you've seen it with the override and then go back to a textured version, you can see the artifacts even with the textured version because now you know where to look.  Wherever you have a denser mesh, the displacement becomes more pronounced.

2025-01-19, 15:51:35
Reply #4

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
Found the post, 2020-11-11   https://forum.corona-renderer.com/index.php?topic=31527.msg178440#msg178440

Nothing has changed.

Same, here's my post from 2019 when the first introduced 2.5D displacement

https://forum.corona-renderer.com/index.php?topic=26782.msg158819#msg158819

I've seen multiple comments from Devs since saying this has been dramatically improved since.  Not for me it hasn't.

I've got another post somewhere where I highlighted the same issues after they'd apparently fixed it.  I'll dig it out

2025-01-27, 14:25:43
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13461
  • Marcin
    • View Profile
(asked for some more info through support ticket #338590)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-01-27, 17:37:08
Reply #6

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
(asked for some more info through support ticket #338590)

Just for clarity I'm currently uploading this scene into the support ticket.  It took about 1 minutes to model this and successfully reproduce the artifacts.

The reality is, to get rid of the artifacts on the box, I'd need to make every quad as small as the 10mm shadow gap I've modelled in.  The box is to represent a building, the shadow gap is to represent smaller details that are often used in building design.  Especially the all white rendered/stucco villas I spend a lot of time working on these days.  The box in the example isn't even that detailed in comparison to a whole building and the artifacts are already visible.  Now imagine a full modelled building

To fix the ground plane, I'd need to use quadremesher (or similar) to get a dense mesh before those artifacts go away but again that's not really how the vast majority will be modelling simple flat roads for commercial arch viz, they'll be tracing (or directly using) splines from CAD drawings.

It's just a huge time sap trying to use displacement in Corona.  You need to make sure your meshes are absolutely perfect, with perfectly distributed uniform quads and absolutely nobody models buildings like that.  I often model my buildings, especially these fully rendered villas as one complete piece (screenshot below) because, whilst the underlying structure isn't all connected as one complete piece, the trowelled render over the top of it all usually is and this method enables me to get those lovely chamfers in all corners and crevices.  The same applies to internal plastered walls, all usually modelled as one piece to get those nice chamfers between walls and ceilings as you would in reality etc.  So keeping everything as uniform quads is not practical in the slightest.

Maru - the example you've sent in the email where you've tried to replicate it is too basic when compared to the reality of a production quality full building model.  Also I'd be confident enough to say you have got some artifacts.  Try applying my override shader to it from the scene I'm uploading.
« Last Edit: 2025-01-27, 17:53:20 by dj_buckley »

2025-01-27, 18:08:51
Reply #7

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
Turns out this could be purely down to the wire shader that's being used, which is always my first step when working on a new project, so I instantly see these artifacts and assume displacement is still broken when it could just be the shader.  Waiting to hear back from support.  Will update. 

2025-02-05, 08:29:51
Reply #8

simtub

  • Active Users
  • **
  • Posts: 21
    • View Profile
Is this function basically the "Keep Continuity" option in Vray displacement? I remember Vray has this resolved. Maybe this needs to be added into Corona.

https://docs.chaos.com/display/VMAX/VRayDisplacementMod


Are there any plans to drastically improve displacement because frankly it's still absolutely terrible and absolutely riddled with artifacts.

The ONLY way to get displacement to behave correctly is by having a perfect quad mesh with dense uniformly sized quads, which is ridiculous in the context of modeling buildings with chamfered edges because the size of the uniform quads would need be driven by the tightness of the edges around the chamfers.  And absolutely nobody is modeling walls/buildings with perfectly uniform tiny quads.  Model basic wall, add edge loops for window openings, delete poly to create window opening, chamfer modifier for rounded corners.  That should be more than enough for modeling buildings.  But no, not if you want to use displacement.  Then you have to make sure the geometry is perfectly uniform quads.

It doesn't even work on simple flat surface, see the driveway in the artifacts screenshot below.  That's a spline for the main shape, then extruded, then edit poly with everything but the top face deleted.

The screenshots below are an override material with preserve disaplacement enabled. 1px for the displacement.  5k render.  The override shader has wires to highlight just how many artifacts there still are.

I've also done a simple version with some simply geometry, however, in this example I've made the driveway a really dense quad mesh so you can see how the displacement improves.  But I couldn't imagine refining that simple piece of geometry to a dense uniform quad mesh just to get displacement to work properly.  It's just not practical in the context of a full scene with full buildings as opposed to simplified example geometry.  The mesh in the viewport screenshot should be more than enough for a typical building.

Displacement is a mess.

2025-02-05, 10:54:06
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13461
  • Marcin
    • View Profile
Regarding the original report from dj_buckley, it wasn't related directly to Corona displacement, but to the way geometry is painted with the Wire/Round Edges maps. The ideal solution here would be having a proper toon shader. If you would find this feature useful, you can vote for it here: https://chaoscorona.ideas.aha.io/ideas/CMAX-I-16
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-02-05, 12:25:39
Reply #10

dzintas

  • Active Users
  • **
  • Posts: 53
    • View Profile
One thing of note, you don't need to have perfect quad meshes to avoid displacement artefacts. It would be preferable, but the thing you need to avoid are elongated non uniform polygons.
So for that road example. Subdivide modifier with adaptive or variable curvature options turned on, should fix most of the artefacts.

2025-02-05, 12:45:59
Reply #11

dj_buckley

  • Active Users
  • **
  • Posts: 1040
    • View Profile
One thing of note, you don't need to have perfect quad meshes to avoid displacement artefacts. It would be preferable, but the thing you need to avoid are elongated non uniform polygons.

Isn't this a bit of a contradiction?

How do you avoid elongated non uniform polygons created by a chamfer modifier for example?