POV-Ray : Newsgroups : povray.general : Details on layered textures/materials : Re: Details on layered textures/materials Server Time
14 Apr 2024 12:44:00 EDT (-0400)
  Re: Details on layered textures/materials  
From: Chris R
Date: 28 Mar 2024 14:00:00
Message: <web.6605af2d5a5579644d6accde5cc1b6e@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> I was looking at using the Dakota Red Granite macro from Thomas de Groot in a
> scene that I am working on and found that it generates a material{}.  I had been
> under the mistaken notion that you couldn't layer materials, until I read the
> details on what they are, which made me happy.
>
> But I started wondering how all of the components of a layered material actually
> work and couldn't find a concise explanation.
>
> The pigment part of the texture in a material makes sense to me, and I
> understand that the filter/transmit values determine how to mix the texture
> starting from the bottom to the top layer.  The other parts are not so clear to
> me.
>
> Normals:  Do upper layers add or replace the normal in the lower layer(s)?  It
> doesn't seem that pigment transparency would have any effect on mixing the
> normals from the various layers.
>
> Finish: Same question, does it add or replace the finish from the lower layers?
> If it replaces, does it only replace the elements of the finish not declared in
> lower layers, or does it replace the entire finish?  I am pretty sure pigment
> transparency doesn't affect this either, or else the standard layering tactic to
> make the top layer a completely transparent pigment with the finish you want
> wouldn't work.
>
> Interior: This is what just recently occurred to me, and I have no idea what
> happens here.  Again, do subsequent interior statements replace prior ones, or
> just add what wasn't previously declared?
>
> For most of my interiors I am only concerned with ior, so replacement makes
> sense, but what about interior fading and media?
>
> -- Chris R

One note that is causing an issue at the moment:  An identifier for a material{}
cannot be used in a texture_map, and as is well-documented, material_map is not
the same thing at all.

So if, for example, there is a library macro (such as DakotaRedGranite) that
returns a material, rather than a texture, it cannot be used in a patterned
texture.

In my particular use case, I was hoping to have an object that is partially
polished, and partially unpolished, as if the polish had worn away in some
places, but there is no way to "unpack" the texture from the material, so I will
have to take the macro code and modify it to return a texture instead of a
material if I want to do this.

-- Chris R


Post a reply to this message

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