Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] Daily Builds => Topic started by: elaraisawhale on 2021-12-05, 13:38:48

Title: displacement issue
Post by: elaraisawhale on 2021-12-05, 13:38:48
on the latest daily build (v8 03-12-2021) i noticed this thing and i'm gonna ask you if is a bug or not.
basically on a simple cube i added a noise map (with contrast cranked up) as displacement, cubic projection, and the displaced part close to the edges seems "shifted". shouldn't be straight? i know my english is not good, so i added an image to show you what i'm trying to explain.
if is not a bug, sorry for my stupid question.
thank you
Title: Re: displacement issue
Post by: andeltoz on 2021-12-05, 18:50:14
I confirm what elaraisawhale reported, the displacement seems to propagate from the center of the object outwards. UVW Map and Cubic Map test.
Imac 2020 27 inches, macos Big Sur, Cinema 4D R21
Title: Re: displacement issue
Post by: romullus on 2021-12-05, 20:10:25
It's either that, or teared mesh at the sharp edges, pick your poison. At least you can fix this issue quite easily - just add support loops near every edge and you should have much better outcome.
Title: Re: displacement issue
Post by: swiat3d.net on 2021-12-06, 00:18:17
Yep, something is wrong.

Simple cube and editable cube with extra edges.
Projection: Cubic and UVW Mapping (default), same result.
Materials: Physical and Legacy, same result.

Cinema R20.059, Win 10, Corona Version: 8 (DailyBuild Dec  1 2021)
Title: Re: displacement issue
Post by: romullus on 2021-12-06, 10:32:27
I think at this point you should ask yourself, what result do you really expect to see? From the last examples, i can clearly see that displacement is working as expected - between support loops, it is displacing strictly perpendicular to the surface and between the edges and support loops, displacement direction is gradually leaning towards the edges to flush meet with the other surface. Alternative to this, would be big gaps in mesh at the hard edges, that's how Corona displacement used to work many versions ago and nobody liked it.
Title: Re: displacement issue
Post by: elaraisawhale on 2021-12-06, 10:52:07
ok, i understand now how it works even it would be better if the shifting would starts more close to the edges instead starting from the center of the polygon. many thanks for the answer!!
Title: Re: displacement issue
Post by: romullus on 2021-12-06, 11:02:37
It can't start at arbitrary position. If you want it to be closer to the edges, you need to move the support loops closer to those edges, but if the difference between original and displaced surfaces is relatively high, like in the last example, then nothing will help and you will still won't have pretty result near the edges.
Title: Re: displacement issue
Post by: mmarcotic on 2021-12-07, 09:46:43
Hello,

can you share a scene with us? I can't seem to reproduce this on my end. Please make sure to include any assets if used.

Thanks,
Jan
Title: Re: displacement issue
Post by: andeltoz on 2021-12-07, 21:42:14
certainly, here it is