Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] I need help! => Topic started by: Evine on 2020-03-25, 10:58:54

Title: displacement map
Post by: Evine on 2020-03-25, 10:58:54
hey you guys it's me again.

there s a problem that has confused me for a long time. when I put a "dots" map in the displacement slot, the edges would become very tough. Why?
Title: Re: displacement map
Post by: maru on 2020-03-25, 14:06:13
This is because Corona is doing its best to displace the geometry based on the sharp texture that you are using. To make it look better, you can try:
- blurring the texture a little bit (regular Gaussian blur in Photoshop)
- lowering displacement screen size in render settings (e.g. from 2px to 1px)
Title: Re: displacement map
Post by: burnin on 2020-03-25, 16:32:09
also, use higher than 8 bit depth for the height map
Title: Re: displacement map
Post by: Evine on 2020-03-26, 02:54:39
This is because Corona is doing its best to displace the geometry based on the sharp texture that you are using. To make it look better, you can try:
- blurring the texture a little bit (regular Gaussian blur in Photoshop)
- lowering displacement screen size in render settings (e.g. from 2px to 1px)

Hi thank you for your reply first.

I tried both of your methods, but it seems that they do not work in a satisfactory way.
Title: Re: displacement map
Post by: Cinemike on 2020-03-26, 05:32:48
As maru and burning wrote ...

A good displacement texture is
A) huge from the start, never scaled up, but not too big so you cram all detail in a small screen space and end up with steps
B) as blurred as necessary
C) 32 bit or 16 bit from the start, never converted from a lower bit depth to a higher one.

As maru wrote:
Give two neighbouring texture pixels enough space on your model and they will unavoidably cause steps.

Overall, it is a balancing act.
Title: Re: displacement map
Post by: romullus on 2020-03-26, 10:48:24
I think you're doing something wrong. Even with your 8 bit textures, i'm easilly getting decent results (see disp_01 and disp_02 pictures).

Things to consider:

Pro tip: add support loops to your geometry, it will help to drive displacement along surface normals. See disp_03 example - on the left is geometry without support loops, on the right it's with support loops.

If nothing helps, share the scene and someone will pick it up and inspect it for errors.
Title: Re: displacement map
Post by: Evine on 2020-03-27, 02:51:52
I think you're doing something wrong. Even with your 8 bit textures, i'm easilly getting decent results (see disp_01 and disp_02 pictures).

Things to consider:
  • always load your displacement textures in linear (gamma - 1.0)
  • since your white is not displaced and black is displaced, configure displacement strength in following way: max level - 0, min level - -xx units
  • lower displacement size accordingly to your scene/output size. In my case, i lowered it from 2px to 1 px, although with blured texture, even default settings gives acceptable result.
  • don't apply any color correction/curve adjustments to your displacement texture

Pro tip: add support loops to your geometry, it will help to drive displacement along surface normals. See disp_03 example - on the left is geometry without support loops, on the right it's with support loops.

If nothing helps, share the scene and someone will pick it up and inspect it for errors.


I m shocked by your effect. I tried lower the displacement size from 3px to 1px, but the result is still not satisfying. Would you please help me check the scene and tell me what's going wrong?

Thanks a lot.
Title: Re: displacement map
Post by: romullus on 2020-03-27, 10:16:39
I'm not a C4D user, so i can't check your scene, but from your last example it's clear that real problem is not displacement size, but lack of resolution of your displacement texture - i can clearly see pixelated "artefacts" in your end result. You need to create higher resolution texture, e.g. 4K instead of 2K and crop it more tightly if possible.
Title: Re: displacement map
Post by: romullus on 2020-03-27, 10:31:03
Couple more things:

I'm attaching fixed texture. It's not perfect, because i used your low quality texture as a base, but i applied several blur/sharpening passes, so that should fix most of the problems with lack of bit depth and low resolution.