child layer inconsistency

Started by nikita, July 08, 2007, 12:01:55 PM

Previous topic - Next topic

nikita

Hi,

I found a problem with child layers and displacement. There's a green grass layer in my file, that grows at slopes <60° and it has a child layer: displacement.
There are several spots in my terrain that match the following conditions:
1. Their slope is below 60°.
2. After displacement, their slope is above 60°.

Now, such a spot is in the grass layer (because of 1.) and therefore, displacement is applied to it:
* slope <60° -> grass -> displacement
After displacement the slope is above 60°, therefore it's not in the grass layer:
**

Obiously, there's something wrong, cause:
slope <60° -> grass -> displacement -> slope >60° -> not(grass)
= grass -> not(grass)
TG2 stops here, so some parts of my grass layer actually don't belong to my grass layer and aren't green, despite the fact that they must be part of the gras layer because otherwise the displacement would not have been applied in the first place.

// You can continue the argument and find out that not(grass) implies not(displacement) -> slope <60° -> grass, so:
// grass <-> not(grass)
// So points that are in the grass layer are not in the grass layer and vice versa.


I know that it's a paradoxon that is not solvable. But the way it is handled in 1.8.76 contradicts my understanding of what a "child" layer does. Why is it called child layer when it completely ignores the color of it's parent?

Matt

Colour effects occur after all displacement, so by default they will use the final displacement which may not match the displacement that comes before the surface layer is applied. You can force the displacement and colour to match each other by setting the "slope key" in the surface layer to "Terrain Normal" instead of "Final Normal". When you use "Terrain Normal" the slope is based on the normal that was calculated by the most recent Compute Terrain or Compute Normal node. (There should be no Compute Terrain or Compute Normal nodes after the Surface Layer.)

Matt
Just because milk is white doesn't mean that clouds are made of milk.

nikita


rcallicotte

#3
This doesn't make sense to me.  Could someone explain this in Node Speak?

[edit - Now this makes sense.  It's taking time.   ;D ]
So this is Disney World.  Can we live here?