Author Topic: Displacement doesn't work properly  (Read 15589 times)

2017-07-10, 09:38:12

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
Hey guys, does anyone know what I'm doing wrong?

Displacement in Corona doesn't work.
I did a comparison between Corona and Physical Render just to show the problem.

The displacement map was exported from ZBrush in PSD 16bit. To use in Corona Standard material I have to save the map in tif format in order to use it with accuracy.

I'm using a .tif 16bit inside a Bitmap shader. Looks like Corona doesn't like PSD...

Thanks

[Build timestamp: Apr 12 2017 18:43:19
Version: A6.3  (core 1.5 )
Cinema version: CINEMA 4D Studio R18.048 S]

2017-07-10, 10:41:25
Reply #1

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
You should be using Corona Material in Corona. We convert the original C4D materials to Corona somehow, but the results will never be exactly the same  because of the impossibility to map the material paramteres 1:1

2017-07-10, 11:12:26
Reply #2

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
You should be using Corona Material in Corona. We convert the original C4D materials to Corona somehow, but the results will never be exactly the same  because of the impossibility to map the material paramteres 1:1
I am using Corona material in Corona. I don't understand your comment.
And I'm not converting a material from Cinema 4D standard material.
I'm just using the values provided by Zbrush and the height looks the same in Corona and Physical. So, yes, I have 1:1 in therms of displacement height.
The problem is the geometry not displaced in Corona.
Looks like a bump map, not a Displacemebt map

2017-07-10, 14:35:59
Reply #3

4b4

  • Active Users
  • **
  • Posts: 163
    • View Profile
Try taking it out of the corona bitmap and just dropping it straight in as a tif. You could also try reducing the screen width with displacement down to 1px.

2017-07-10, 14:49:25
Reply #4

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
Try taking it out of the corona bitmap and just dropping it straight in as a tif. You could also try reducing the screen width with displacement down to 1px.

I tried with PSD from ZBrush, TIF inside Bitmap and outside also.

It's not a problem with resolution of subdivision. There are details, but looks like a bump map, not a displacement.
Look the hard edges how bad is.

In my opinion this is some kind of bug.

2017-07-10, 15:25:21
Reply #5

burnin

  • Active Users
  • **
  • Posts: 1538
    • View Profile
too much details in question
would you kindly make & share a test file for confirmation ;)

2017-07-10, 16:17:38
Reply #6

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
To me, it looks like the difference comes from using the rounded option in the example with the Physical renderer, which Corona does not have.
If you apply an SDS to your mesh and apply the Corona displacement to this rounded mesh, the results should look a lot more alike.

CU
Michael

2017-07-10, 18:05:04
Reply #7

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
You should be using Corona Material in Corona. We convert the original C4D materials to Corona somehow, but the results will never be exactly the same  because of the impossibility to map the material paramteres 1:1
I am using Corona material in Corona. I don't understand your comment.
And I'm not converting a material from Cinema 4D standard material.
I'm just using the values provided by Zbrush and the height looks the same in Corona and Physical. So, yes, I have 1:1 in therms of displacement height.
The problem is the geometry not displaced in Corona.
Looks like a bump map, not a Displacemebt map

My apologies, I must have somehow swapped the pictures when writing the reply. You are right that the picture looks different and ugly in Corona, but it's difficult to say what is the cause just from the pictures. As burnin said, it would be great if we could see some test scene to be able to identify the possible bug in a more efficient way.

2017-07-10, 18:53:24
Reply #8

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
As I wrote, the explanation and also the solution are probably very simple.

The native C4D displacement allows an option that "Rounds Geometry", in other words, applies a smoothing algorithm to the mesh while displacing.
Compare the rendered images: Corona basically gets the same result like the native "Physical Renderer" of C4D.
If I use "Round Geometry" I get a smooth result in the "Physical", same I get with applying an SDS to the mesh for Corona.

The thread opener gets "rough" edges because there is no rounding in Corona. If he had left the "Round Geometry" option switched off (as it is per default) he would have got the same rough result with the "Physical".
Remedy: SDS.

HTH
Michael
« Last Edit: 2017-07-10, 18:59:09 by Cinemike »

2017-07-11, 00:45:58
Reply #9

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
too much details in question
would you kindly make & share a test file for confirmation ;)

Here is a test file.

Thanks

2017-07-11, 00:56:19
Reply #10

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
As I wrote, the explanation and also the solution are probably very simple.

The native C4D displacement allows an option that "Rounds Geometry", in other words, applies a smoothing algorithm to the mesh while displacing.
Compare the rendered images: Corona basically gets the same result like the native "Physical Renderer" of C4D.
If I use "Round Geometry" I get a smooth result in the "Physical", same I get with applying an SDS to the mesh for Corona.

The thread opener gets "rough" edges because there is no rounding in Corona. If he had left the "Round Geometry" option switched off (as it is per default) he would have got the same rough result with the "Physical".
Remedy: SDS.

HTH
Michael

Thanks for your tests.
I think SDS is not a solution, actually that's no make sense to use Displacement if I have to deal with subdivision manually. In that case I should fix my model with extra edge loops before to use displacement just to avoid rounded edges where I need hard edges. A really problem. And why to use Displacement instead of Bump if the geometry is not displaced properly?
SDS fixes a problem and creates another.

2017-07-11, 05:58:55
Reply #11

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
Where exactly would you see the biggest differences between the Corona render I uploaded and what you expect? Added an SDS, changed the gamma of the image to what the Physical used and played a bit with the height values.

C4D natively uses Sub-polygon Displacement, which might be unique and not be found too often in other renderers.
I also guess it will be hard to get exactly the same results from both renderers.

Adding an SDS makes perfect sense to me because this is what C4D basically does with the "Round Geometry" option. The manual says to this option: "Since SPD cannot calculate a normal Phong shading when it is applied, a special algorithm similar to that of the Subdivision Surface is used to ensure that the object is rounded before the SPD is rendered."

I agree, though, that some options the C4D displacement has, would come in handy sometimes, so I would not mind having these within Corona (actually everything ;)).

CU
Michael
« Last Edit: 2017-07-11, 06:16:40 by Cinemike »

2017-07-11, 06:47:44
Reply #12

danielsian

  • Active Users
  • **
  • Posts: 100
    • View Profile
    • Portfolio
Where exactly would you see the biggest differences between the Corona render I uploaded and what you expect? Added an SDS, changed the gamma of the image to what the Physical used and played a bit with the height values.

C4D natively uses Sub-polygon Displacement, which might be unique and not be found too often in other renderers.
I also guess it will be hard to get exactly the same results from both renderers.

Adding an SDS makes perfect sense to me because this is what C4D basically does with the "Round Geometry" option. The manual says to this option: "Since SPD cannot calculate a normal Phong shading when it is applied, a special algorithm similar to that of the Subdivision Surface is used to ensure that the object is rounded before the SPD is rendered."

I agree, though, that some options the C4D displacement has, would come in handy sometimes, so I would not mind having these within Corona (actually everything ;)).

CU
Michael

Well I have to confess, the result is pretty close to what Physical does. But SDS is just a quick fix, and deliver a non-precise result. Depending on the model we have the result can be catastrophic.
Vray, Arnold and Redshift deliver the same result as Physical renderer, so I understand that this is the least that the Corona should do.

Thanks

2017-07-11, 16:36:20
Reply #13

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile

Vray, Arnold and Redshift deliver the same result as Physical renderer, so I understand that this is the least that the Corona should do.

Thanks

I tried your model with Vray but the results were not that convincing with your model "as is", I got shading artifacts due to the relatively low resolution of the mesh. Now I have to admit I did not use the latest version of VrayforC4D and I am a bit out of practice with this renderer.

2017-07-11, 18:17:39
Reply #14

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
So it seems that C4D is doing not only displacement, but also surface subdivision and smoothing if you check some checkbox in the displacement UI, right? I am sorry, but I don't think we will do anything like that. There's several reasons for that:

  • Cinema obviously already has a way to achieve the same effect using modifiers and it's not at all that difficult.
  • We want the UI to be logical and concise. Displacement and surface subdivision/smoothing are two different concepts and should be held separate in the UI. I don't know why C4D has it together in the first place...
  • We try to keep the UI consistent across host applications and 3DS Max does not and will not have such a feature, so another reason why not to put it there

I hope you'll agree that it's not such a big issue.