|
![](/i/fill.gif) |
RafaĆ Maj wrote:
> Hello,
>
> does anyone have some quick working code to create like
> box { -1000, +1000 }
> but deformed a bit?
>
> Perhaps a mesh, or set of 6 highfields with function() making the "texture".
>
> Camera will be placed inside the box btw.
>
> In general, it is aimed to represent a simple living room.
#include "functions.inc"
global_settings { max_trace_level 20 }
background{1}
camera {
location 2
look_at 0
}
#local p = 2;
#local k = 0.6;
#local s = function { abs(abs(x + y) + abs(x - y) + z + z) + abs(abs(x +
y) + abs(x - y) - z - z) - 4 }
#local d1 = function { x + k*f_noise3d(p*x, p*y, p*z) }
#local d2 = function { y + k*f_noise3d(100 + p*x, 100 + p*y, 100 + p*z) }
#local d3 = function { z + k*f_noise3d(200 + p*x, 200 + p*y, 200 + p*z) }
isosurface{
function { s(d1(x, y, z), d2(x, y, z), d3(x, y, z)) }
contained_by { box{ -1.1, 1.1 } }
max_gradient 7
pigment{rgb 0.7} finish{reflection{0, 1} diffuse 1 ambient 0}
}
This scene renders for about 22 seconds on my computer in 640x480
resolution without anti-aliasing, which is pretty quick for me. If you
want lower/higher bumps adjust k. If you want more/less bumps adjust p.
Maxime
Post a reply to this message
|
![](/i/fill.gif) |