|
|
Verm <pov### [at] thirteeendynucom> wrote:
> Hi all,
> been lurking here a while and thought I'd submit a typical first
> post. I've done a few heightfields and isosurfaces but this is my first
> proper scene.
Welcome! (Sorry I'm late :)
> This was half-prompted by PM 2Rings post on 22/7/2005,
Excellent! Here's my latest version of the sofa (not using LightSys) which
was Jaime's armchair. I think I'd better reduce the reflection...
// Persistence of Vision Ray Tracer Scene Description File
// File: SofaTest.pov
// Vers: 3.5
// Desc: Sofa derived from LightsysIV indoor demo
// Auth: PM 2Ring
//
// -F -A0.4 +AM2 +R2
// -D +A0.1 +AM2 +R3
//
#version 3.5;
#include "colors.inc"
#include "finish.inc"
#include "functions.inc"
#declare Do_Floor=1;
#declare Do_Sky=1;
global_settings {
assumed_gamma 1
//max_trace_level 10
}
// ---Textures-------------------------------------
#declare PaleGold = colour rgb <.5 .305 .120>*1.75;
#declare BerryRed = colour rgb <.5 .05 .125>;
#declare fvinyl = finish{Phong_Shiny phong_size 30 diffuse .9
reflection{.01,.1}}
#declare fcloth = finish{phong .1 phong_size 3 diffuse .75 }
#declare t_sofa =
texture{
pigment{
//checker
//rgb .5
//SkyBlue * .7
//PaleGold
//BerryRed
blue 0.25
scale 10*2
rotate 45*z
}
finish{
fvinyl
//fcloth
}
normal{quilted scale 10 bump_size .05 rotate 45*z}
scale <1 1 10>
}
// ---Objects-------------------------------------
// sofa
#macro rbox(R)
isosurface{
function{f_rounded_box(x,y,z,R,1,1,1)}
max_gradient 1
contained_by{box{-1,1}}
scale .5
}
#end
#macro rbox1(R)
superellipsoid{<R, R>
scale .5
}
#end
//Isosurface is actually faster!!!
#declare br=1.0; //Box rounding
#declare cushion1 =
object{rbox(br*.60) //Seat cushion
scale <59,18,42.5>
translate -15*y
texture{t_sofa rotate x*90}
}
#declare sofa =
union{
object{rbox(br*.80) //Back
scale <190,80,30>
translate <0,0,30>
texture{t_sofa}
}
object{rbox(br*.25) //Base
scale <180,10,40>
translate -25*y
texture{t_sofa}
}
#declare I=-1;
#while (I<=1)
object{cushion1 translate I*56*x}
#declare I=I + 1;
#end
object{rbox(br*.70) //Left side
scale <20,55,60>
translate <-90,-15,10>
texture{t_sofa rotate y*90}
}
object{rbox(br*.70) //Right side
scale <20,55,60>
translate <90,-15,10>
texture{t_sofa rotate y*90}
}
translate 42*y
}
// ---The scene-------------------------------------
#declare RadL = 40;
object{sofa rotate 0*45*y scale .065}
// ----------------------------------------
#if(Do_Sky)
sphere {0,1 inverse
pigment {
function{abs(y)}
color_map {
[0.0 rgb <.1, .15, .5>]
[0.6 rgb <.8,.8,1>]
[.8 rgb 1]
[1 rgb <1,1,.9>]
}
}
finish{ambient 0.01 diffuse 0.825}
scale RadL
}
#else
background{rgb .5}
#end
#if(Do_Floor)
box {
<-1, -.01, -1>*RadL, <1, 0, 1>*RadL
pigment {
checker rgb .85, rgb 0 scale .05 * RadL
rotate 45*y
}
finish{
ambient 0.1 diffuse 0.85
reflection 0.175
}
}
#end
// ----------------------------------------
camera {
location vnormalize(<0.75, 1.5, -5.0>) * RadL * .65
direction z
right x*image_width/image_height up y
angle 35
look_at 3*y
//translate x * 0.014 * RadL * .65 //for 3D
}
light_source {vnormalize(<1, 2, -1.5>)*RadL*.9 rgb 1.1}
light_source {vnormalize(<-2, 1, -1.5>)*RadL*.5 rgb 0.5 }
// ----------------------------------------
Post a reply to this message
Attachments:
Download 'sofatestc2.jpg' (143 KB)
Preview of image 'sofatestc2.jpg'
|
|