POV-Ray : Newsgroups : povray.newusers : Newbie texture syntax problems : Re: Newbie texture syntax problems Server Time
31 Jul 2024 04:24:53 EDT (-0400)
  Re: Newbie texture syntax problems  
From: Peter Hertel
Date: 5 Jan 2003 14:52:53
Message: <3e188d15@news.povray.org>
Hi!
I rewrote the code to 3.5 syntax. Is this what you need?

#declare Line =
texture{
    pigment {
        gradient z // <0,0,1>
        color_map {
            [0      color Gridgray]
            [0.0005 color Clear]
        }
        scale <1,1,25>
    }
}

#declare Saucer_top_texture =
texture {Line}
texture {
    pigment {
        gradient z // ??
        color_map{
            [0 color Gridgray]
            [0.0005 color Hullcol]
        }
    }
finish {specular layer_specular}
}

This could of course be done in several ways.. I rewrote it the way you did,
but I'd prefer to do it like this:

#declare Texture1 = texture {...}
#declare Texture2 = texture {...}
#declare Layered_Texture =
texture {Texture1}
texture {Texture2}

or

#declare Layered_Texture =
texture {...}
texture {...}

A better way, IMHO!
Note that I haven't tried the texture on an object, but it parses. (You have
to #declare Gridgray.. etc. Of course.)
I reccomend DOC reading for color_map :  "6.7.1.3 Color maps"

Hope this helped.

-Peter


Post a reply to this message

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