Author Topic: Material below water make edges wet?  (Read 2266 times)

2021-12-03, 03:58:30

ShynnSup

  • Active Users
  • **
  • Posts: 62
    • View Profile
Hi everyone,

I am looking to make some water puddles and I noticed the result I was getting was too unrealistic, mainly because I needed to add more detail.

I noticed Mixer does a really nice job of automatically adding details to water layers: Notice how the edges that are immediately above the water plane receive a different glossiness value? As if they were wet.
This is controlled by the 'Radius' parameter inside Mixer.

Low Radius:


Higher Radius:


How could I replicate this effect inside Corona?

My current result:




Thanks for any insight!


2021-12-03, 08:09:07
Reply #1

aler

  • Active Users
  • **
  • Posts: 170
    • View Profile
I used to try it, too (here in the example of Corona 6 and Legacy Material with Gloss).
In the first snapshot in Glossiness there is no map, therefore there is no result. The above shows the Opacity map.
In the second snapshot I used an Opacity map to create roughness and using Colorizer experimentally selected the gloss level for the edges of the puddle.

2021-12-03, 08:51:48
Reply #2

davetwo

  • Active Users
  • **
  • Posts: 298
    • View Profile
The Corona Distance shader can control a layered material by proximity to the 'puddles'. So you can combine the wet and dry versions of the material like that.
(See attached where the red materail is added by proximity to the floor disc)

2021-12-03, 17:34:45
Reply #3

ShynnSup

  • Active Users
  • **
  • Posts: 62
    • View Profile
The Corona Distance shader can control a layered material by proximity to the 'puddles'. So you can combine the wet and dry versions of the material like that.
(See attached where the red materail is added by proximity to the floor disc)

Cool!

Could you show how to apply this logic to the puddles? I mean, I have a displaced plane which generates the puddles, and then a plane for the water. This one is planar.

Do I need to manually position spheres or objects at the center of my puddles to make the Distance shader work? Could there be a more parametric approach maybe?
« Last Edit: 2021-12-03, 17:38:54 by ShynnSup »

2021-12-03, 17:54:15
Reply #4

davetwo

  • Active Users
  • **
  • Posts: 298
    • View Profile
No spheres needed! The parameter is driven by whatever you want. In your case the water plane.

Just open the distance shader and drag the geommetry into the field.

2021-12-03, 18:31:25
Reply #5

ShynnSup

  • Active Users
  • **
  • Posts: 62
    • View Profile
No spheres needed! The parameter is driven by whatever you want. In your case the water plane.

Just open the distance shader and drag the geommetry into the field.


I am afraid that is not possible, my water plane covers the entire geometry, so it all gets one material. So basically, the distance is measuring the distance to an object that is almost itself...



 


2021-12-03, 19:06:06
Reply #6

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
That will still work - the distance to is to specific points on the object surface, and you would just need to set how far that "distance" is, in this case very small values. Doesn't matter that the one water plane spans the whole geometry, each point on the land geo will measure distance to nearest point on water plane (also doesn't matter that it's all one material, the distance shader returns a unique distance for each point on the land geo).

EDIT - looks like you just need to edit the Near and Far values to account for the small range you want it to cover :)
Tom Grimes | chaos-corona.com
Product Manager | contact us

2021-12-03, 19:07:22
Reply #7

davetwo

  • Active Users
  • **
  • Posts: 298
    • View Profile
Come now. Ya gotta believe man ;) if I can do it anyone can
See below...

2021-12-04, 01:46:39
Reply #8

ShynnSup

  • Active Users
  • **
  • Posts: 62
    • View Profile
Uff, Finally! Not sure why it wasn't working on my end!



Attached the example if anyone is interested.

Final result:


Thanks everyone!


2021-12-06, 15:20:25
Reply #9

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Glad you got it working, and it is looking real good!
Tom Grimes | chaos-corona.com
Product Manager | contact us

2021-12-12, 05:06:09
Reply #10

ShynnSup

  • Active Users
  • **
  • Posts: 62
    • View Profile
I have a new question: how would you make all the material below the water plane darker instead of just counting up and down from the intersection using Distance?

Suppose you have a topo mesh, and a plane cutting through the middle of it. The ground above will use a lighter color and the ground below will use a darker color, but not just the edge, everything below the plane in terms of Y.

Thanks!




2021-12-12, 11:04:29
Reply #11

davetwo

  • Active Users
  • **
  • Posts: 298
    • View Profile
Dont think that's possible. (ALthough why not use a cube instead of a simple plane which would cover the bottom part).

I don't think the geommetry clipper is implemented in the c4d version yet? (Looking forward to it a lot!). But when it is, you could use that to seperate the above and below sections.

2021-12-12, 15:21:44
Reply #12

ficdogg

  • Active Users
  • **
  • Posts: 112
    • View Profile
You should be able to do that with the distance shader, use a cube instead of a plane, and then turn on inside color. This should let you mask everything that's inside the cube.
« Last Edit: 2021-12-12, 15:25:10 by ficdogg »