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