Author Topic: Layered Shader and Displacement  (Read 2340 times)

2017-04-27, 06:13:06

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
Is displacement supposed to work other than in the base material within the Layered shader?

2017-04-27, 09:10:48
Reply #1

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
Well of course! It doesn't work for you in a standard Corona material?

2017-04-27, 16:04:09
Reply #2

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
Please excuse my short posting, this one and the files should make things clearer.
If you use a material in one of the slots other than for the base material that contains displacement, displacement will not be rendered.
In my example file, both materials used within layered should be displaced.

CU
Michael

2017-04-27, 18:56:35
Reply #3

houska

  • Former Corona Team Member
  • Active Users
  • **
  • Posts: 1512
  • Cestmir Houska
    • View Profile
I understand now. What happens is that the displacement effect is taken from the first available material - either the base material or any of the other materials. This seems like a designed behavior to me, but I'll discuss it with the other guys. The question really is, what would be the sensible behavior here in all of the possible cases.

2017-04-27, 19:18:56
Reply #4

Cinemike

  • Active Users
  • **
  • Posts: 1001
    • View Profile
I get the conflict here, because it would probably have to be a case to case decision.
Mostly, one would want to add one displacement on top of the other (or mix it). Masks would be useful to determine where adding displacement should take place.
But in my example file, I would want the mask to kill the underlying displacement and just add displacement to the plastering (material 1).
So yeah, not easy to find the right way. Maybe the Layered shader could also get "modes" (like add, multiply ...) as additional options to stack materials? No idea exactly ;)
I'm seeing it from the POV of a man passing the magic forest, having caught a fairy and now just using his wishes, with no idea how the fairy should fulfil them ;)