|
|
I would like to set a scene inside a box, such that its faces will consist of
grid lines and will be transparent. That is, if the camera is INSIDE the box, it
will see something which is outside and vice versa.
This is the best I could get:
//-----------
#include "textures.inc"
camera {
perspective
location < 4.0, 4.0, 12>
right x * 1
up y * 3/4
angle 60
look_at < 0.0, 0.0, 0.0>
}
light_source {
< 0.0, 100, 100>
rgb <0.999962, 1.000000, 1.000000>
}
box {
< -2, -2, -2>, <2,2,2>
// no_shadow
hollow on
// pigment {
// rgb <0.000000, 0.202852, 1.000000>
// }
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0,1>] // black spaces
}
rotate z*90 // rotates the pattern onto the "upper side" of the plane
}
}
sphere {
<0.0, 0.0, 0.0>, 0.5
material {
texture {
pigment {
rgb <0.000000, 0.202852, 1.000000>
}
normal {
brick 0.5 //amount
}
finish {
diffuse 0.6
brilliance 1.0
}
}
}
}
//--------
How can I finish it?
Post a reply to this message
|
|
|
|
This is what I managed to produce:
//-------------
#include "textures.inc"
/*
Bounding box's corners
*/
#local xmin=-5;
#local ymin=-5;
#local zmin=0;
#local xmax=8;
#local ymax=9.2;
#local zmax=2*pi;
/*
zMax grid
*/
object{
plane { <0,0,1>,zmax
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0,1>] // black spaces
}
rotate z*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
clipped_by{
box{
<xmin,ymin,zmin>, <xmax,ymax,zmax>
}
}
}
/*
zMin grid
= floor
*/
object{
plane { <0,0,1>,zmin
pigment {
// Pattern color
Tiles_Ptrn()
color_map{
[0.02 color rgb <0,0,0>] // white stanchions
[0.04 color rgbt <0,0.51,1,0.5>] // black spaces
}
rotate z*90 // rotates the pattern onto the "upper side" of the plane
// Fixed Color
// color rgbt<0,0.51,1,0.5>
// rotate z*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
/*
Clipping here had to be removed in order to avoid some probelm with color
rendering
*/
// clipped_by{
// box{
// <xmin,ymin,zmin>,<xmax,ymax,zmax>
// }
// }
}
object{
plane { <1,0,0>,xmax
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0>] // black spaces
}
rotate y*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
clipped_by{
box{
<xmin,ymin,zmin>,<xmax,ymax,zmax>
}
}
}
object{
plane { <1,0,0>,xmin
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0>] // black spaces
}
rotate y*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
clipped_by{
box{
<xmin,ymin,zmin>,<xmax,ymax,zmax>
}
}
}
object{
plane { <0,1,0>,ymax
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0>] // black spaces
}
rotate x*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
clipped_by{
box{
<xmin,ymin,zmin>,<xmax,ymax,zmax>
}
}
}
object{
plane { <0,1,0>,-5
pigment {
Tiles_Ptrn()
color_map{
[0.02 color rgb <1,1,1>] // white stanchions
[0.04 color rgbt <0,0,0>] // black spaces
}
rotate x*90 // rotates the pattern onto the "upper side" of the plane
}
}
no_shadow
clipped_by{
box{
<xmin,ymin,zmin>,<xmax,ymax,zmax>
}
}
}
//---------------
It is not perfect, and slows down the rendering... but this is what I have. Can
anyone improve it?
Post a reply to this message
|
|