POV-Ray : Newsgroups : povray.newusers : texture_map question Server Time
31 Jul 2024 02:21:01 EDT (-0400)
  texture_map question (Message 1 to 3 of 3)  
From: Bill Hails
Subject: texture_map question
Date: 16 Apr 2003 18:42:47
Message: <3e9ddc67@news.povray.org>
Hi,
probably this applies to pigment_maps and maybe other *_maps as well.

I have a cylinder:

cylinder {
    <Length1, 0, 0>, <Length2, 0, 0>, 1
    texture {
        gradient x
        turbulence 1
        scale 10
        texture_map {
            [0 T_Paper ]
            [0.5 T_Paper ]
            [0.5 T_Transparent ]
            [1 T_Transparent ]
        }
    }
}

The T_Paper texture previously declared is also a gradient x
texture_map, with repeating bands and turbulence 0. T_Transparent
is just what it says.

My problem is that the turbulence 1 and scale 10 modifiers
used here also affect the T_Paper texture. I can re-scale the
T_Paper to compensate, but I can't get rid of the turbulence.

I'm guessing there's a completely different way to get the effect,
but I'm a bit stumped atm

aTdHvAaNnKcSe

-- 
I would've gotten away with it too, if it wasn't for those pesky kids!


Post a reply to this message

From: Christopher James Huff
Subject: Re: texture_map question
Date: 16 Apr 2003 20:46:01
Message: <cjameshuff-0A2EB1.20460116042003@netplex.aussie.org>
As you've found out, transforms affect the entire texture, not just the 
pattern. You can work around this though:

cylinder {
    <Length1, 0, 0>, <Length2, 0, 0>, 1
    texture {
        function {
            pattern {
                gradient x
                turbulence 1
                scale 10
            }
        }
        texture_map {
            [0 T_Paper ]
            [0.5 T_Paper ]
            [0.5 T_Transparent ]
            [1 T_Transparent ]
        }
    }
}

That's a texture_map using a function pattern with a pattern function 
using a turbulated and scaled pattern as the pattern. You may need to 
declare the pattern function separately, I've ran into some oddities 
with this area of the function syntax before.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Bill Hails
Subject: Re: texture_map question
Date: 17 Apr 2003 03:34:40
Message: <3e9e5910@news.povray.org>
Christopher James Huff wrote:

> As you've found out, transforms affect the entire texture, not just the
> pattern. You can work around this though:
> 
> cylinder {
>     <Length1, 0, 0>, <Length2, 0, 0>, 1
>     texture {
>         function {
>             pattern {
>                 gradient x
>                 turbulence 1
>                 scale 10
>             }
>         }
>         texture_map {
>             [0 T_Paper ]
>             [0.5 T_Paper ]
>             [0.5 T_Transparent ]
>             [1 T_Transparent ]
>         }
>     }
> }
> 
> That's a texture_map using a function pattern with a pattern function
> using a turbulated and scaled pattern as the pattern. You may need to
> declare the pattern function separately, I've ran into some oddities
> with this area of the function syntax before.
> 

Wonderful! that worked perfectly. Like you say I did have to declare
the pattern function separately, but then it worked.

I really don't understand why though :-)

-- 
I would've gotten away with it too, if it wasn't for those pesky kids!


Post a reply to this message

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