POV-Ray : Newsgroups : povray.newusers : Slope with a slope_map Server Time
27 Nov 2024 02:43:54 EST (-0500)
  Slope with a slope_map (Message 1 to 4 of 4)  
From: JK
Subject: Slope with a slope_map
Date: 7 Aug 2003 21:26:24
Message: <3f32fc40$1@news.povray.org>
Hi, can the slope pattern be used with a slope_map? The docs say:
"A slope_map may be used with any pattern except brick, checker, object,
hexagon, bumps, dents, ripples, waves, wrinkles and bump_map."
So it should work? But the following piece of code doesn't  give any kind of
ramp:

#include "colors.inc"
camera{location<0,0,-5>
              look_at<0,0,0>}
light_source{<-10,10,-50>color White*2}
#declare Slopenormal= normal{slope{<0,-1,0>,0,1}

                                       slope_map{[0 <1,0>]
                                                            [.4 <1,-1>]
                                                            [.5 <0,0>]
                                                            [1 <0,0>]} }



sphere{<0,0,0>,1 pigment{color Grey}
                              normal{Slopenormal}}

If I understand this correctly this should give me a ramp down somewhere
little above the middle of the sphere.
What am I missing?


Post a reply to this message

From: Christopher James Huff
Subject: Re: Slope with a slope_map
Date: 8 Aug 2003 11:08:34
Message: <cjameshuff-B35E0A.10054508082003@netplex.aussie.org>
In article <3f32fc40$1@news.povray.org>, "JK" <bil### [at] mbnetfi> wrote:

> Hi, can the slope pattern be used with a slope_map? The docs say:
> "A slope_map may be used with any pattern except brick, checker, object,
> hexagon, bumps, dents, ripples, waves, wrinkles and bump_map."

It is mathematically possible, but that is also the case for bumps, 
dents, ripples, waves, wrinkles, and bump_map...these are all "special" 
normal patterns. They used to be normal-only patterns, and behave 
slightly differently in normals. (The brick, checker, object, and 
hexagon patterns just aren't useful at all for normal patterns...they 
have abrupt changes between values, rather than smooth gradients.)

The slope pattern is not part of this group, but does require extra 
information to compute...such as the perturbed normal, which is what it 
is being used to compute. In other words, the slope pattern is affected 
by the normal, and when it is used as the normal, it tries to use stuff 
that hasn't been fully computed yet. This could be fixed...I'll bring it 
to the attention of the POV Team.

-- 
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: JK
Subject: Re: Slope with a slope_map
Date: 9 Aug 2003 13:49:31
Message: <3f35342b@news.povray.org>
OK thanks, its great you POV gurus take time to sort newbie problems!

On the matter of slopes again,
its also not possible to translate or rotate the slope pattern or to use it
as a function, I guess.

I'm just going through the POV-Ray docs trying to learn as much as possible.
Right now the idea of using functions as patterns and the whole idea of 3D
solid texturing seems the most confusing to me.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Slope with a slope_map
Date: 10 Aug 2003 12:20:43
Message: <cjameshuff-00F0C6.11175710082003@netplex.aussie.org>
In article <3f35342b@news.povray.org>, "JK" <bil### [at] mbnetfi> wrote:

> On the matter of slopes again, its also not possible to translate or 
> rotate the slope pattern or to use it as a function, I guess.

Correct. It requires information about a surface normal, instead of just 
position as with most other patterns.


> I'm just going through the POV-Ray docs trying to learn as much as possible.
> Right now the idea of using functions as patterns and the whole idea of 3D
> solid texturing seems the most confusing to me.

Well, consider a real-world sphere being carved from a block of wood. 
The grain and ring structure exist through the entire block of wood, as 
you carve out the sphere you only this structure at the surface. In POV, 
this structure is usually defined with a 3D function. The gradient 
pattern is an infinite stack of gradients, the wood pattern is similar, 
but based on nested infinite cylinders instead. You describe the 
materials objects are made of, instead of stretching images over their 
surfaces.

-- 
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

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