POV-Ray : Newsgroups : povray.general : Textures and slopes Server Time
3 Aug 2024 12:16:56 EDT (-0400)
  Textures and slopes (Message 1 to 6 of 6)  
From: Vincent LE CHEVALIER
Subject: Textures and slopes
Date: 17 Mar 2004 04:25:00
Message: <4058196c$1@news.povray.org>
Hello !

I've been trying to render the same landscape in POV-Ray and Terragen, 
and I found myself stuck in the texturing. I wonder, in fact, if there 
is a way to do the same texturing in POV and Terragen.

As far as I understand, Terragen's textures are organized in several 
layers, each with a specific color and amount of bumps. So far, layered 
textures would do the trick. The point is that in Terragen, you can 
control the visibility of a layer based on the slope of the underlying 
layers. For example, you can have a rock layer, very bumpy, and a snow 
layer over it, only in the less slopy areas, with its own bumps.

I tried to achieve such effect with a slope pattern in a layered 
texture, but in this case the slope used is just that of the 
height_field, not including the normal perturbation.

I can obtain something similar using slope-patterned pigments and only 
one normal statement, but then I lose the control over the bumps of each 
layer.

Has anyone got an idea about how to solve this problem ?

-- 
Vincent


Post a reply to this message

From: gonzo
Subject: Re: Textures and slopes
Date: 18 Mar 2004 01:12:47
Message: <40593ddf@news.povray.org>
Vincent LE CHEVALIER <lec### [at] ctiecpfr> wrote in message
news:4058196c$1@news.povray.org...
> Hello !
>
> I've been trying to render the same landscape in POV-Ray and Terragen,
> and I found myself stuck in the texturing. I wonder, in fact, if there
> is a way to do the same texturing in POV and Terragen.

Been trying to do the same thing... Terragen textures really add a lot...

> As far as I understand, Terragen's textures are organized in several
> layers, each with a specific color and amount of bumps. So far, layered
> textures would do the trick. The point is that in Terragen, you can
> control the visibility of a layer based on the slope of the underlying
> layers. For example, you can have a rock layer, very bumpy, and a snow
> layer over it, only in the less slopy areas, with its own bumps.
>
> I tried to achieve such effect with a slope pattern in a layered
> texture, but in this case the slope used is just that of the
> height_field, not including the normal perturbation.

I'm pretty sure Terragen uses the height_field slope to determine it's
layering also. But I think Terragen interpolates its maps differently than
POV does.

> I can obtain something similar using slope-patterned pigments and only
> one normal statement, but then I lose the control over the bumps of each
> layer.
>
> Has anyone got an idea about how to solve this problem ?

Still playing around with it, but I've had better results with texture maps
using a mix of slope & gradient than with layered textures (I still haven't
figured out how to get as much control over layers...), and I'm just
starting to play around with normal maps.  Terragen's texture editor layers
things by both slope & altitude, and I find the gradient pattern useful to
reproduce the altitude.


Post a reply to this message

From: Vincent LE CHEVALIER
Subject: Re: Textures and slopes
Date: 18 Mar 2004 09:47:12
Message: <4059b670@news.povray.org>
gonzo wrote:
> Vincent LE CHEVALIER <lec### [at] ctiecpfr> wrote in message
> news:4058196c$1@news.povray.org...
> 
>>Hello !
>>
>>I've been trying to render the same landscape in POV-Ray and Terragen,
>>and I found myself stuck in the texturing. I wonder, in fact, if there
>>is a way to do the same texturing in POV and Terragen.
> 
> 
> Been trying to do the same thing... Terragen textures really add a lot...
> 
Yes, and POV could add a lot to a Terragen texture. For example, a shiny 
finish, and several different shapes for bumps. That's what gave me the 
idea first.
> 
>>As far as I understand, Terragen's textures are organized in several
>>layers, each with a specific color and amount of bumps. So far, layered
>>textures would do the trick. The point is that in Terragen, you can
>>control the visibility of a layer based on the slope of the underlying
>>layers. For example, you can have a rock layer, very bumpy, and a snow
>>layer over it, only in the less slopy areas, with its own bumps.
>>
>>I tried to achieve such effect with a slope pattern in a layered
>>texture, but in this case the slope used is just that of the
>>height_field, not including the normal perturbation.
> 
> 
> I'm pretty sure Terragen uses the height_field slope to determine it's
> layering also.

Sure. But it seems that Terragen uses somehow the slopes simulated by 
the normal perturbation as well. You can see that when you modify in 
Terragen the amount of bumps in a parent layer.

> But I think Terragen interpolates its maps differently than
> POV does.

I really don't know. But whithout bumps, Terragen terrains do look like 
smooth height_fields in POV. Nevertheless, I tried to render the exact 
same terrain without textures, atmosphere or ambient light, and I 
noticed indeed a slight difference. The terrain does look smoother in 
Terragen.

> 
> 
>>I can obtain something similar using slope-patterned pigments and only
>>one normal statement, but then I lose the control over the bumps of each
>>layer.
>>
>>Has anyone got an idea about how to solve this problem ?
> 
> 
> Still playing around with it, but I've had better results with texture maps
> using a mix of slope & gradient than with layered textures (I still haven't
> figured out how to get as much control over layers...), and I'm just
> starting to play around with normal maps.  Terragen's texture editor layers
> things by both slope & altitude, and I find the gradient pattern useful to
> reproduce the altitude.
> 

I believe you can take the altitude dependency into account when using 
the slope pattern. The optionnal altitude keyword allows to add the 
effect of a gradient into this pattern.

Thanks for your answer. I will keep trying...

-- 
Vincent


Post a reply to this message

From: Chambers
Subject: Re: Textures and slopes
Date: 18 Mar 2004 15:45:43
Message: <405a0a77$1@news.povray.org>
"Vincent LE CHEVALIER" <lec### [at] ctiecpfr> wrote in message
news:4058196c$1@news.povray.org...
> Hello !
>
> I've been trying to render the same landscape in POV-Ray and Terragen,
> and I found myself stuck in the texturing. I wonder, in fact, if there
> is a way to do the same texturing in POV and Terragen.
>
> As far as I understand, Terragen's textures are organized in several
> layers, each with a specific color and amount of bumps. So far, layered
> textures would do the trick. The point is that in Terragen, you can
> control the visibility of a layer based on the slope of the underlying
> layers. For example, you can have a rock layer, very bumpy, and a snow
> layer over it, only in the less slopy areas, with its own bumps.
>
> I tried to achieve such effect with a slope pattern in a layered
> texture, but in this case the slope used is just that of the
> height_field, not including the normal perturbation.
>
> I can obtain something similar using slope-patterned pigments and only
> one normal statement, but then I lose the control over the bumps of each
> layer.
>
> Has anyone got an idea about how to solve this problem ?

You could write a function for the texture to do this (6.7.11.15 in the
docs).  If you wanted access to the slope data, you could first draw the
heightfield from straight up using an orthogonal image and a b&w gradient in
the y-direction, and load this image as function image (6.7.11.16 in the
docs), and then check differences in the function at the exact point and
several points nearby to determine the change in altitude.  Combine the
dependancy on change in altitude with a dependancy on the altitude, and in
fact the x-z region where the point lies, and you've got great potential for
a vibrant image.

Sorry I can't give more specific info at the moment, if you have more
questions feel free to ask and I'll try as best I can to answer them a bit
later.

-- 
...Chambers
http://www.geocities.com/bdchambers79


Post a reply to this message

From: Vincent LE CHEVALIER
Subject: Re: Textures and slopes
Date: 19 Mar 2004 04:31:58
Message: <405abe0e$1@news.povray.org>
Chambers wrote:
> "Vincent LE CHEVALIER" <lec### [at] ctiecpfr> wrote in message
> news:4058196c$1@news.povray.org...
> 
>>Hello !
>>
>>I've been trying to render the same landscape in POV-Ray and Terragen,
>>and I found myself stuck in the texturing. I wonder, in fact, if there
>>is a way to do the same texturing in POV and Terragen.
>>
>>As far as I understand, Terragen's textures are organized in several
>>layers, each with a specific color and amount of bumps. So far, layered
>>textures would do the trick. The point is that in Terragen, you can
>>control the visibility of a layer based on the slope of the underlying
>>layers. For example, you can have a rock layer, very bumpy, and a snow
>>layer over it, only in the less slopy areas, with its own bumps.
>>
>>I tried to achieve such effect with a slope pattern in a layered
>>texture, but in this case the slope used is just that of the
>>height_field, not including the normal perturbation.
>>
>>I can obtain something similar using slope-patterned pigments and only
>>one normal statement, but then I lose the control over the bumps of each
>>layer.
>>
>>Has anyone got an idea about how to solve this problem ?
> 
> 
> You could write a function for the texture to do this (6.7.11.15 in the
> docs).  If you wanted access to the slope data, you could first draw the
> heightfield from straight up using an orthogonal image and a b&w gradient in
> the y-direction, and load this image as function image (6.7.11.16 in the
> docs), and then check differences in the function at the exact point and
> several points nearby to determine the change in altitude.  Combine the
> dependancy on change in altitude with a dependancy on the altitude, and in
> fact the x-z region where the point lies, and you've got great potential for
> a vibrant image.
> 
> Sorry I can't give more specific info at the moment, if you have more
> questions feel free to ask and I'll try as best I can to answer them a bit
> later.
> 

Yes, that's a good idea ! I'm not sure yet of how I will code this, but 
anyway evaluating the slope myself is something I haven't thought of... 
As for getting the altitude data in the form of a function, I guess I 
can even use the same data as that of the heightfield :
#declare tgahf = function{pigment{image_map{tga "hf.tga" interpolate 2} 
rotate x*90 }}
#declare altitudes = 
function{(tgahf(x,y,z).red*255+tgahf(x,y,z).green)/256 * maxHeight}
Obviously, that's less precise than your method. But I think it's enough...
Well, I'm going to work on that. I'll post the results as soon as I get 
something decent.
Thanks for your excellent suggestion !

-- 
Vincent


Post a reply to this message

From: Chambers
Subject: Re: Textures and slopes
Date: 19 Mar 2004 12:39:34
Message: <405b3056@news.povray.org>
"Chambers" <bdc### [at] yahoocom> wrote in message
news:405a0a77$1@news.povray.org...
> docs).  If you wanted access to the slope data, you could first draw the
> heightfield from straight up using an orthogonal image and a b&w gradient
in
> the y-direction, and load this image as function image (6.7.11.16 in the

Doh!  It's already a heightfield, no need to redraw!

-- 
...Chambers
http://www.geocities.com/bdchambers79


Post a reply to this message

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