Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: CreoAtive on 2015-01-22, 11:11:24

Title: Displacement Min / Max Value
Post by: CreoAtive on 2015-01-22, 11:11:24
Hi,
I noticed it was not possible to set negative Min values for displacement in the coronoa material.
Negative values are much needed when working with displacementmaps from zbrush since you need to displace the geometry in both ways.
Dark values should displace the geometry inwards and bright values should displace the geometry outwards while grey means no displacement.
With the current minimum value of 0 for the Min input field you cannot achieve this so I went ahead and modified "mcoronamaterial.res" in plugins/corona/res/description
in line 207 to allow negativ values:

Code: [Select]
GROUP ID_CORONA_DISPLACEMENT
    {
        REAL CORONA_DISPLACEMENT_MIN_LEVEL { MIN -100; MAX 100; STEP 0.1; UNIT METER; }
        REAL CORONA_DISPLACEMENT_MAX_LEVEL { MIN 0; MAX 100; STEP 0.1; UNIT METER; }
        SHADERLINK CORONA_DISPLACEMENT_TEXTURE { }
    }

Now I get the desired behaviour. Maybe this helps someone else :-)

Regards,
CreoAtive
Title: Re: Displacement Min / Max Value
Post by: borisquezadaa on 2015-01-22, 14:08:57
Interesting.
At least in daily build it is possible to do it.
Title: Re: Displacement Min / Max Value
Post by: CreoAtive on 2015-01-22, 14:15:22
I think it's a problem limited to cinema 4d :-) and it's just the material dialog that prevents you from inserting negative values, the rendering core renders all as expected.
Title: Re: Displacement Min / Max Value
Post by: Nejc Kilar on 2015-02-04, 15:05:20
This actually comes in handy, thank you for sharing! :)
Title: Re: Displacement Min / Max Value
Post by: Shawn Astrom on 2015-02-04, 17:49:00

Yes! This is just what I need with a landscape I was working on.

This should be fixed in the C4D plugin. The displacement should not have a clamped min/max.

- Shawn