|
|
Vladimir wrote:
> has anybody got any decent isosurface brick models ie a box with roughness
> from 3d noise/ pigment patterns. I have been trying to model on but as I'm
> not very good with isosurfaces am having difficulties
> Thanks.
Hi Vladimir,
Here is a very simple (and not too good looking) example I recently used:
#declare fnbumps = function{pigment{granite}}
#declare fntile = function{x}
#declare abrick = object
{
isosurface
{
function{fntile(x,y,z) + fnbumps(x,y,z).x * 0.112}
max_gradient 0.719
threshold 1
contained_by
{
box {-2,2}
}
rotate y*-90
}
scale <0.35,0.35,0.01955>
}
#declare wallbrick = object
{
abrick
material
{
texture
{
T_Stone2
finish
{
diffuse 0.75
ambient 0.75
}
}
}
scale <0.75,0.35,4>
rotate x*90
}
#declare wall = union
{
#declare xloc = -0.23;
#declare yloc = yloc + (1 * yfac) - 0.75;
#declare xfac = 1.075;
#declare zfac = 0.515;
#declare xcount = 9;
#while (xcount > 0)
#declare zloc = -0.7;
#declare zcount = 9;
#while (zcount > 0)
object
{
wallbrick
translate <xloc,yloc,zloc>
}
#declare zloc = zloc + zfac;
#declare zcount = zcount - 1;
#end
#declare xloc = xloc - xfac;
#declare xcount = xcount - 1;
#end
}
difference
{
object
{
wall
}
union
{
box {
<-1, -1, -1>, <1, 1, 1>
material {
texture
{
T_Stone2
}
}
scale <1.203208, 0.270298, 1.833007>
translate <-2.401552, 9.975676, 0.716774>
}
box {
<-1, -1, -1>, <1, 1, 1>
material {
texture
{
T_Stone2
}
}
scale <1.794289, 0.270298, 1.256064>
translate <-6.768104, 9.975676, 1.286108>
}//Box
}//Union
}//Difference
--
Stefan Viljoen
Software Support Technician
Polar Design Solutions
Post a reply to this message
|
|