|
![](/i/fill.gif) |
SharkD escribió:
> How can I create a pattern that shows the *change* in slope of a
> heightfield. I.e., brighter where the "curvature" is greater.
>
I used that for my hf2iso experiment:
//---------------------------------------------------
global_settings{hf_gray_16}
#include "functions.inc"
// file to extract slope from
#declare hf_file="your_hf_here"
// sloped texture with autoilluminated finish
#declare t_terrain_slope=
texture{
pigment{
slope y
color_map{
[0.00 rgb 0]
[0.50 rgb 1]
[0.67 rgb 1]
[0.75 rgb 0]
[1.00 rgb 0]
}
}
finish{brilliance 0 ambient 1}
}
// create a heightfield from the bitmat
#declare terrain=
height_field{
tga hf_file
translate -.5
scale <2,1,2>
texture{t_terrain_slope}
}
object{terrain}
// take a square shot
camera{
orthographic
location <0,0,-1>
up 1*y right 1*x
angle 90
look_at 0
rotate 90*x
}
//---------------------------------------------------
--
Jaime
Post a reply to this message
|
![](/i/fill.gif) |