POV-Ray : Newsgroups : moray.win : Moray Texture Editor. Reproduction og pov texture... : Re: Moray Texture Editor. Reproduction og pov texture... Server Time
29 Jul 2024 00:24:44 EDT (-0400)
  Re: Moray Texture Editor. Reproduction og pov texture...  
From: Ken
Date: 3 Oct 1999 09:30:00
Message: <37F75A58.72DC0611@pacbell.net>
Lutz Kretzschmar wrote:
> 
> Hi Glenn Bech, you recently wrote in moray.win:
> 
> > But to me it seems that the Normal is attached to the Object itself, and NOT
> > the texture... Is that possible to do with Moray ?
> Well, essentially everything is attached to the object.... I am not
> entirely sure whether that code causes a texture with three layers
> (the second layer having default pigment and finish) or two layers
> (the normal statement being added to the first layer. I would say that
> my first guess is correct, but maybe someone with a more intricate
> knowledge can jump in here... (Ken?).
> 
> > And is there any smart way of adding finishes to
> > multi-layered textures? I always find myself using
> > copy & paste one time for each layer...
> As far as I can remember, only the finish in the top-most layer (the
> last one in the list) is valid, all other finishes are ignored....
> 
> > And If I want to change the reflection parameters for my texture for
> > example, I > have to do that one time for each layer as well, or ?
> If I'm right, you'll only need to change it for the one finish layer.
> 
> - Lutz
>   email : lut### [at] stmuccom
>   Web   : http://www.stmuc.com/moray

 I will answer the finishes for each layer statement and see if I can
come up with answers to the rest later. If we look at the following
code you will see three different declared textures each with it's
own finish statement.
  Upon rendering the code in POV-Ray we will see 3 different gradient
layers appearing on the sphere object. By changing the ambient values
for each layer it can be seen that these changes will have an impact
on the final results when used as we have in this example.
  You will also see that I added a finish statement to the sphere object
itself. If we try changing the ambient value in that finish statement we
will find that it has no effect on the appearance of the textures we have
applied. This is because we have already specified a finish for the child
textures and attempting to add a finish statement to the parent object will
be ignored as Lutz pointed out.

Example:

#declare T1 = texture {
               pigment { gradient y
                 color_map {
                             [.2 rgb  1]
                             [.2 rgb .5]
                             [.8 rgb .5]
                             [ 1 rgb  1]
                }
               }
               finish {
                       ambient .50
                       diffuse .35
              }
            }


#declare T2 = texture {
               pigment { gradient x
                 color_map {
                             [.2 rgbf  1]
                             [.2 rgbf .5]
                             [.8 rgbf .5]
                             [ 1 rgbf  1]
                }
               }
               finish {
                       ambient .50
                       diffuse .35
              }
            }


#declare T3 = texture {
               pigment { gradient x+y
                 color_map {
                             [.2 rgbf  1]
                             [.2 rgbf .5]
                             [.8 rgbf .5]
                             [ 1 rgbf  1]
                }
               }
               finish {
                       ambient .50
                       diffuse .35
              }
            }


sphere { <0,0,0>, 1 
         texture { T1 }
         texture { T2 }
         texture { T3 }
finish {
        ambient .50
        diffuse .35
       }
}

camera{ location<0,0,-2> look_at 0}

light_source {<0,0,-100> rgb 1}


-- 
Ken Tyler
1100+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html


Post a reply to this message

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