Author Topic: displacement map  (Read 3082 times)

2020-03-25, 10:58:54

Evine

  • Active Users
  • **
  • Posts: 42
    • View Profile
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?

2020-03-25, 14:06:13
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12757
  • Marcin
    • View Profile
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)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2020-03-25, 16:32:09
Reply #2

burnin

  • Active Users
  • **
  • Posts: 1535
    • View Profile
also, use higher than 8 bit depth for the height map

2020-03-26, 02:54:39
Reply #3

Evine

  • Active Users
  • **
  • Posts: 42
    • View Profile
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.

2020-03-26, 05:32:48
Reply #4

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
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.
« Last Edit: 2020-03-26, 05:38:23 by Cinemike »

2020-03-26, 10:48:24
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8843
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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 not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-03-27, 02:51:52
Reply #6

Evine

  • Active Users
  • **
  • Posts: 42
    • View Profile
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.

2020-03-27, 10:16:39
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8843
  • Let's move this topic, shall we?
    • View Profile
    • My Models
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.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-03-27, 10:31:03
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8843
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Couple more things:
  • never use JPEG for displacement textures! Use PNG, TIFF, BMP or any other losseless format
  • always try to use at least 16bit, even better 32bit textures for displacement textures. Use grayscale to save disk space.
  • do not skimp on resolution. The higher resolution texture you will use, the less artefacts you will see.

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.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures