Hi,
The attached image is a preliminary test using both a color map and a
displacement map I found online of some rocks. Scene objects are: plane;
superellipsoid; and a height_field.
Here's a simple triplanar mapping macro:
#macro Triplanar(Pigment)
pigment_pattern{
slope x
triangle_wave
}
pigment_map{
[0 Pigment rotate y*90]
[1
pigment_pattern{
slope y
triangle_wave
}
pigment_map{
[0 Pigment rotate x*90 translate z*2]
[1 Pigment rotate z*165 translate x*2]
}
]
}
#end
It's invoked it like this:
pigment_pattern{Triplanar(Pigment)}
where 'Pigment' is a 2D pigment oriented along the z axis (e.g. default image
map). You can invoke it the same way in pigment, normal or texture blocks.
Sam
Post a reply to this message
Attachments:
Download 'triplanar6m_02s.jpg' (193 KB)
Preview of image 'triplanar6m_02s.jpg'
|