POV-Ray : Newsgroups : povray.general : Macro Problem : Re: Macro Problem Server Time
18 Apr 2024 07:24:02 EDT (-0400)
  Re: Macro Problem  
From: clipka
Date: 22 Apr 2018 18:09:24
Message: <5add0814@news.povray.org>
Am 22.04.2018 um 20:15 schrieb Thorsten Froehlich:

> I would argue that the layered texture feature is defective by design. It is
> pretty much the only case where two blocks of the same kind without any wrapper
> have a special meaning. For other cases, namely with the addition of "material"
> this has been fixed a long time ago. Maybe it is time to force something similar
> for layered textures... at least outside scene objects.

I do agree that the current syntax was a bad idea. I would even argue
that its use in a geometric object is also broken, because it assigns
different semantics to the `texture{}` statement in different
situations; for example, in the following code,

    #declare O0 = sphere { ... }
    #declare O1 = object { O0 texture { T1 } }
    #declare O2 = object { O1 texture { T2 } }

the statement `texture{T2}` has the semantics "replace the object's
texture with T2", while in

    #declare O0 = sphere { ... }
    #declare O1 = object { O0 texture { T1 } texture { T2 } }

the statement `texture{T2}` has the semantics "layer T2 on top of the
object's current texture".


I guess a more reasonable syntax for creating layered textures would be:

    texture {
      layered
      texture { ... }
      texture { ... }
      ...
    }

One problem however -- besides the need to maintain backward
compatibility for legacy scenes -- is that with all the additions and
changes that have been made since the introduction of the layered
texture feature, it's probably difficult to identify (a) which portions
of the parser code actually constitute the implementation of this
feature in its current form, and (b) which of these portions have by now
been co-opted by other features.


And then there is the limitation of being unable to layer patterned
textures on top of one another, which I find pretty... well, limiting.

But that has (almost) nothing to do with parsing, and instead is a
limitation of the current rendering engine implementation.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.