POV-Ray : Newsgroups : povray.binaries.images : cuboids (36 KB jpeg) : Re: cuboids (36 KB jpeg) Server Time
12 Aug 2024 03:30:33 EDT (-0400)
  Re: cuboids (36 KB jpeg)  
From: Alex Kluchikov
Date: 14 Nov 2003 16:25:01
Message: <web.3fb547a970ae0bde6c49c33b0@news.povray.org>
Hello again.

Tor Olav Kristensen wrote:
>That's an interesting shape.
>
>What texture did you use ?
>

The texture is simple:
//=== Start
texture{pigment{color rgb .75}
  finish{diffuse 0.85 ambient 0 specular 0.8 roughness 0.03 phong 1.0
brilliance 7.3 phong_size 80  metallic .5
   reflection{0.6,1.0 metallic}}
  }
//=== End

The trick is in lighting and environment. I mean, the scene contains
invisible and shadowless sphere around, with radius about thousands and
with chrome-like texture, here the code:

//=== Start
sphere{0,1000
 texture{
  pigment{
   gradient y color_map{
    [0,color rgb <0.8,0.83,1>]
    [1,color rgb <0.4,0.7,1>]
    }scale 2 translate -y}finish{ambient 1}scale 1000}

texture{
 pigment{average pigment_map{
 #declare gr=.5;
 #declare ge=3/(1+gr+gr);
 #declare t1=.1;
 #declare t2=.9;
 #declare tr1=.2;
 #declare tr2=.2;
  [1,bozo translate 1*y color_map{
   [t1,color rgbt < 1,gr,gr,tr1>*ge]
   [t2,color rgbt < 0, 0, 0,tr2>*ge]
  }]
  [1,bozo translate 1*z color_map{
   [t1,color rgbt < gr, 1,gr,tr1>*ge/.85]
   [t2,color rgbt <  0, 0, 0,tr2>*ge]
  }]
  [1,bozo translate 1*x color_map{
   [t1,color rgbt < gr,gr, 1,tr1>*ge/.7]
   [t2,color rgbt <  0, 0, 0,tr2>*ge]
  }]

 }}scale 0.25 finish{ambient 1 diffuse 0}scale 2500}

 no_shadow
 no_image
 hollow double_illuminate scale 100}
//=== End

 I put this sphere in every scene with metallic or other high-reflective
surface.

And two colored lights - yellow and sky-blue used to improve realism:

//=== Begin
light_source{
 -35*z, color rgb <1.0,0.8,0.6>*0.55
 parallel
 rotate x*25 rotate -y*15
 }

light_source{
 -35*z, color rgb <0.6,0.8,1>*0.55
 parallel
 rotate x*-25 rotate y*15
 }
//=== End

So, I discovered all my secrets :)

Sincerely yours, Alex Kluchikov.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.