Displacement has random breakups

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Displacement has random breakups

Post by lacilaci »

When mesh is displaced, it shows at random points some break ups, even when it's not at UV seam.
Annotation 2020-04-03 111019.jpg
can something be done about it?

here's the testscene with object and disp. map
Downloads.zip
(1.58 MiB) Downloaded 174 times
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Displacement problems

Post by lacilaci »

Playing around some more with luxcore displacement and it's really hard to make it work

here is the problem
disp.jpg
So a simple test on a tire. A 6K displacement map and 33M triangles using ~50% of Vram and yet I still see some bad jagged edges on the tire.

few problems I have with disp. in luxcore:

I don't know how displacement offset works. When I used 16 bit disp. map and wanted to use gray color as a base surface level (white and black goind outwards and inward the mesh accordingly) I had to use a value of 0.002 for offset to make it work. I understand that some color management and whatnot comes to play here but the parameter is just not very intuitive to set

Mas edge screen size parameter is not making any sense to me, this should be an absolute value in pixels imho, just like other renderers do.

subdivision should be adaptive (using previously set max edge length in pixels). Right now you alwasy start with evenly subdividing the complete mesh, which makes it impossible for fine detail to be useful in any way cause those polycounts would go through the roof.

simplify node/shape is useless. It is extremely slow and I don't even know what would I get in the end.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Displacement has random breakups

Post by Dade »

lacilaci wrote: Fri Apr 03, 2020 9:14 am When mesh is displaced, it shows at random points some break ups, even when it's not at UV seam.
Annotation 2020-04-03 111019.jpg

can something be done about it?

here's the testscene with object and disp. map
Downloads.zip
There is something very strange going on in this scene, I have the feeling it may be related to UV. If you move around, the white highlight will do strange things. I'm looking into it.
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Displacement problems

Post by Dade »

lacilaci wrote: Fri Apr 03, 2020 1:18 pm So a simple test on a tire. A 6K displacement map and 33M triangles using ~50% of Vram and yet I still see some bad jagged edges on the tire.
This is a consequence of both using an image map (i.e.pixels are jagged by definition) and a regular subdivision grid but, as far as I know, it is normal. Does it work in a different way in Blender/Cycles/Corona/whatever ?
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Displacement problems

Post by lacilaci »

Dade wrote: Fri Apr 03, 2020 1:25 pm
lacilaci wrote: Fri Apr 03, 2020 1:18 pm So a simple test on a tire. A 6K displacement map and 33M triangles using ~50% of Vram and yet I still see some bad jagged edges on the tire.
This is a consequence of both using an image map (i.e.pixels are jagged by definition) and a regular subdivision grid but, as far as I know, it is normal. Does it work in a different way in Blender/Cycles/Corona/whatever ?
Well.. If I could specify a max edgelength of 1 pixel and not worry about the whole mesh being subdivided like crazy, then I could also decide preciselly how big texture is needed for given detail... Right now the control over displacement subdivision is very limited and unintuitive
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Displacement has random breakups

Post by Sharlybg »

Really also wonder how it look in Cycles. Can make a cycles test ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Displacement problems

Post by Dade »

lacilaci wrote: Fri Apr 03, 2020 1:31 pm Well.. If I could specify a max edgelength of 1 pixel and not worry about the whole mesh being subdivided like crazy,
But if use an image map as displacement map, it should make no difference, the jags should be still there :?:

I mean, I assume you need a procedural or vectorial description as displacement map or you will see jags even with edge length of 1 pixel (if you zoom enough).
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Displacement problems

Post by lacilaci »

Dade wrote: Fri Apr 03, 2020 1:36 pm
lacilaci wrote: Fri Apr 03, 2020 1:31 pm Well.. If I could specify a max edgelength of 1 pixel and not worry about the whole mesh being subdivided like crazy,
But if use an image map as displacement map, it should make no difference, the jags should be still there :?:

I mean, I assume you need a procedural or vectorial description as displacement map or you will see jags even with edge length of 1 pixel (if you zoom enough).
No, im talking pixels as screen space. Currently there is screen size parameter but its not in pixels. And it also still divides whole mesh so not adaptive
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: Displacement has random breakups

Post by lacilaci »

Maybe this kinda tesselation would help?

https://developer.nvidia.com/gpugems/gp ... n-surfaces
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Displacement problems

Post by Dade »

lacilaci wrote: Fri Apr 03, 2020 1:42 pm No, im talking pixels as screen space. Currently there is screen size parameter but its not in pixels. And it also still divides whole mesh so not adaptive
And I'm talking of Blender/Cycles/Corona/whatever, they will produce the same result. If you use 2x2 pixels displacement map, you will get some really BIG jag, no matter of what you use. And for any displacement map pixel resolution, you can zoom enough a still see the jags (because an image has a finite resolution).

As I wrote, you need a procedural or vectorial description as displacement map or you will see jags, first or later.
Support LuxCoreRender project with salts and bounties
Post Reply