POV-Ray : Newsgroups : povray.binaries.images : [WIP] LED Panel Server Time
18 Nov 2024 22:21:07 EST (-0500)
  [WIP] LED Panel (Message 1 to 3 of 3)  
From: Felbrigg
Subject: [WIP] LED Panel
Date: 8 Mar 2004 10:14:53
Message: <404c8ded@news.povray.org>
Another stab at the LED Panel but with only Radiosity lighting this time.  I
prefer it, although there appear to be some odd lighting effects across the
tables surface, almost as if there are overlapping light sources ( theres
only one light ).  Does anyone know what might be causing that?

I'm using the box at the bottom of this scene to light it.

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "stones.inc"
#include "metals.inc"

global_settings {
  radiosity {
    pretrace_start 0.08           // start pretrace at this size
    pretrace_end   0.04           // end pretrace at this size
    count 35                      // higher -> higher quality (1..1600) [35]
    nearest_count 5               // higher -> higher quality (1..10) [5]
    error_bound 1.8               // higher -> smoother, less accurate [1.8]
    recursion_limit 10             // how much interreflections are
calculated (1..5+) [3]
    low_error_factor .5           // reduce error_bound during last pretrace
step
    gray_threshold 0.0            // increase for weakening colors (0..1)
[0]
    minimum_reuse 0.015           // reuse of old radiosity samples [0.015]
    brightness 5                 // brightness of radiosity effects (0..1)
[1]

    adc_bailout 0.01/2
    normal on                   // take surface normals into account [off]
    media on                    // take media into account [off]
    //save_file "file_name"       // save radiosity data
    //load_file "file_name"       // load saved radiosity data
    //always_sample off           // turn sampling in final trace off [on]
    //max_sample 1.0              // maximum brightness of samples
  }
}



#declare SnakeWood =
texture {  /* Bottom wood-grain layer */
    pigment {
        wood
        turbulence 0.05
        color_map {
            [0.00 rgb <0.58, 0.45, 0.23>]
            [0.34 rgb <0.65, 0.45, 0.25>]
            [0.40 rgb <0.33, 0.23, 0.13>]
            [0.47 rgb <0.60, 0.40, 0.20>]
            [1.00 rgb <0.25, 0.15, 0.05>]
        }
    }
    finish {
        crand 0.02
        //ambient 0.32
        diffuse 0.63
        phong 0.2
        phong_size 10
    }
    normal { bumps 0.05 }
}
texture {     /* top layer, adds small dark spots */
    pigment {
        bozo
        color_map {
            [0.0 rgbt <1.00, 1.00, 1.00, 1.00>]
            [0.8 rgbt <1.00, 0.90, 0.80, 0.80>]
            [1.0 rgbt <0.30, 0.20, 0.10, 0.40>]
        }
    scale 0.25
    }
}



#macro LED(TurnedOn)
merge   {
        cylinder        {
                        <0,0,0>,
                        <0,.3,0>,
                        1
                        }
        cylinder        {
                        <0,0,0>,
                        <0,1.5,0>,
                        0.9
                        }
        sphere          {
                        <0,1.5,0>,
                        0.9
                        }
        texture {
                pigment {
                        Red*0.7
                        }

                finish  {
                        reflection { 0.1,0.7 }
                        specular 0.5
                        #if(TurnedOn=1)
                        ambient 1
                        #else
                        ambient 0
                        #end
                        diffuse 1
                        }
                }

        }
#end

#macro getLEDRow(theValue)
        #if(theValue = 0)
        union   {
                object { LED(0) }
                object { LED(0) translate <2.1,0,0>}
                object { LED(0) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 1)
        union   {
                object { LED(1) }
                object { LED(0) translate <2.1,0,0>}
                object { LED(0) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 2)
        union   {
                object { LED(0) }
                object { LED(1) translate <2.1,0,0>}
                object { LED(0) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 3)
        union   {
                object { LED(1) }
                object { LED(1) translate <2.1,0,0>}
                object { LED(0) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 4)
        union   {
                object { LED(0) }
                object { LED(0) translate <2.1,0,0>}
                object { LED(1) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 5)
        union   {
                object { LED(1) }
                object { LED(0) translate <2.1,0,0>}
                object { LED(1) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 6)
        union   {
                object { LED(0) }
                object { LED(1) translate <2.1,0,0>}
                object { LED(1) translate <4.2,0,0>}
                }
        #end
        #if(theValue = 7)
        union   {
                object { LED(1) }
                object { LED(1) translate <2.1,0,0>}
                object { LED(1) translate <4.2,0,0>}
                }
        #end
#end

#macro getLEDLetter(theLetter)
        union   {
        #if(theLetter = 0)
                object { getLEDRow(0) }
                object { getLEDRow(0) translate <0,0,-2.1>}
                object { getLEDRow(0) translate <0,0,-4.2>}
                object { getLEDRow(0) translate <0,0,-6.3>}
                object { getLEDRow(0) translate <0,0,-8.4>}
        #end
        #if(theLetter = 1)
                object { getLEDRow(2) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(5) translate <0,0,-8.4>}
        #end
        #if(theLetter = 4)
                object { getLEDRow(3) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(3) translate <0,0,-8.4>}
        #end
        #if(theLetter = 5)
                object { getLEDRow(7) }
                object { getLEDRow(1) translate <0,0,-2.1>}
                object { getLEDRow(3) translate <0,0,-4.2>}
                object { getLEDRow(1) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 6)
                object { getLEDRow(7) }
                object { getLEDRow(1) translate <0,0,-2.1>}
                object { getLEDRow(3) translate <0,0,-4.2>}
                object { getLEDRow(1) translate <0,0,-6.3>}
                object { getLEDRow(1) translate <0,0,-8.4>}
        #end
        #if(theLetter = 7)
                object { getLEDRow(7) }
                object { getLEDRow(1) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 8)
                object { getLEDRow(5) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(5) translate <0,0,-8.4>}
        #end
        #if(theLetter = 12)
                object { getLEDRow(1) }
                object { getLEDRow(1) translate <0,0,-2.1>}
                object { getLEDRow(1) translate <0,0,-4.2>}
                object { getLEDRow(1) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 14)
                object { getLEDRow(7) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(5) translate <0,0,-8.4>}
        #end
        #if(theLetter = 15)
                object { getLEDRow(7) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 16)
                object { getLEDRow(7) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(1) translate <0,0,-6.3>}
                object { getLEDRow(1) translate <0,0,-8.4>}
        #end
        #if(theLetter = 18)
                object { getLEDRow(7) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(3) translate <0,0,-6.3>}
                object { getLEDRow(5) translate <0,0,-8.4>}
        #end
        #if(theLetter = 19)
                object { getLEDRow(7) }
                object { getLEDRow(1) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(4) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 20)
                object { getLEDRow(7) }
                object { getLEDRow(2) translate <0,0,-2.1>}
                object { getLEDRow(2) translate <0,0,-4.2>}
                object { getLEDRow(2) translate <0,0,-6.3>}
                object { getLEDRow(2) translate <0,0,-8.4>}
        #end
        #if(theLetter = 21)
                object { getLEDRow(5) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(7) translate <0,0,-8.4>}
        #end
        #if(theLetter = 22)
                object { getLEDRow(5) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(5) translate <0,0,-4.2>}
                object { getLEDRow(5) translate <0,0,-6.3>}
                object { getLEDRow(2) translate <0,0,-8.4>}
        #end
        #if(theLetter = 25)
                object { getLEDRow(5) }
                object { getLEDRow(5) translate <0,0,-2.1>}
                object { getLEDRow(2) translate <0,0,-4.2>}
                object { getLEDRow(2) translate <0,0,-6.3>}
                object { getLEDRow(2) translate <0,0,-8.4>}
        #end
        #if(theLetter = 27)
                object { getLEDRow(0) }
                object { getLEDRow(0) translate <0,0,-2.1>}
                object { getLEDRow(7) translate <0,0,-4.2>}
                object { getLEDRow(0) translate <0,0,-6.3>}
                object { getLEDRow(0) translate <0,0,-8.4>}
        #end
                }
#end

#macro getLEDStream(one, two, three, four, five, six, seven,eight)
union   {
        object  { getLEDLetter(one) }
        object  { getLEDLetter(two)  translate <8,0,0>}
        object  { getLEDLetter(three) translate <16,0,0>}
        object  { getLEDLetter(four)  translate <24,0,0>}
        object  { getLEDLetter(five) translate <32,0,0>}
        object  { getLEDLetter(six) translate <40,0,0>}
        object  { getLEDLetter(seven) translate <48,0,0>}
        object  { getLEDLetter(eight) translate <56,0,0>}
        }
#end



#macro LEDBox() union {
        difference      {
                object  {
                        Round_Box(<-35,5,3>, < 35, 0, -13>, 1, no)
                        texture {
                                pigment {
                                        Gray20 //DarkSlateGrey //Black
                                        }
                                finish  {
                                        ambient 0
                                        specular 0.5
                                        roughness .002
                                        reflection { 0.1,.5 }
                                        diffuse 0.8
                                        }
                                normal  {
                                        bumps .3
                                        scale 0.1
                                        }
                                }
                        }
                box     {
                        <-32.99999,6,.99999>,
                        <32.99999,0.99,-10.99999>
                        texture { T_Chrome_3B //1A
                                finish  {
                                        ambient 0
                                        diffuse 1//0.8
                                        }
                                }
                        }
                }
        box     {
        <-33,5,1>,
        <33,4.5,-11>
        texture {
                pigment {
                        Clear
                        }
                finish  {
                        reflection { 0.1,1 }
                        specular 0.5
                        diffuse 0.1
                        ambient 0
                        }
                }
        hollow
        interior        {
                        ior 1.5
                        }
        }

        object { getLEDStream(8,15,21,7,8,20,15,14)  translate
<-30,1.1,-.6>}
        cylinder        {
                        <-35,2.5,0>,
                        <-35.3,2.5,0>
                        1.5
                        texture {
                                pigment { Black }
                                finish  {
                                        reflection { 0,.7 }
                                        specular 0.7
                                        diffuse 0.1
                                        ambient 0
                                        }
                                }
                        }
        sphere_sweep    {
                        cubic_spline
                        5,
                        <-32,2.5,0>,0.8,
                        <-35,2.5,0>,0.8,
                        <-50,2.5,0>,0.8,
                        <-75,-12.5,0>,0.8
                        <-95,-18.5,0>,0.8
                        texture {
                                pigment { Black }
                                finish  {
                                        reflection { 0.1,1 }
                                        specular 0.1
                                        diffuse 0.6
                                        ambient 0
                                        }
                                }
                        }
}
#end

/*
plane   { <0, 1, 0>, -0.0001
        texture { SnakeWood
                finish  {
                        reflection {0.1,0.3}
                        specular 0.5
                        ambient 0
                        }
                rotate <0,34,0>
                }
        }
*/
// atmospheric media can be generated by adding a media statement
// to the scene not attached to any specific object
/*
media {    // atmospheric media sample
  intervals 10
  scattering { 1, rgb 0.03 }
  samples 1, 10
  confidence 0.9999
  variance 1/1000
  ratio 0.9
}
*/

background { color <0.25,0.35,0.80> }

camera  { location <-30,35,-65> look_at <-5,5,0> }
background { color Black }
object { LEDBox() rotate <-90,0,0> translate <0,13,0>}
object  { Round_Box(<-42,0,-17>,<100,-5,1000>,0.2,no)
        texture {
                SnakeWood scale 1
                finish  {
                        ambient 0
                        diffuse 0.7
                        }
                rotate <0,5,0>
                }
        texture {
                pigment { color rgbf< 0.7, 0.8, 0.98,1> }
                finish  {
                        reflection 0.05//{0.1,0.2}
                        specular 0.5
                        ambient 0
                        diffuse 1//0.7
                        }
                }
        }



box {
        <0,0,0>,<100,1,100>
        translate <0,60,0>
        texture { pigment { White }
                finish {ambient 2 }
                }

        }


Post a reply to this message


Attachments:
Download 'LEDPanel-Houghton.jpg' (91 KB)

Preview of image 'LEDPanel-Houghton.jpg'
LEDPanel-Houghton.jpg


 

From: IMBJR
Subject: Re: [WIP] LED Panel
Date: 8 Mar 2004 18:09:25
Message: <4fvp40ps5iq8oh3cc72eq4k8d1tj10h835@4ax.com>
On Mon, 8 Mar 2004 15:16:16 -0000, "Felbrigg" <som### [at] microsoftcom>
wrote:

>Another stab at the LED Panel but with only Radiosity lighting this time.  I
>prefer it, although there appear to be some odd lighting effects across the
>tables surface, almost as if there are overlapping light sources ( theres
>only one light ).  Does anyone know what might be causing that?
>
>I'm using the box at the bottom of this scene to light it.

What is the eventually aim of all of this? Is this just an experiment
or are you leading up to some LED-inspired work?

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Felbrigg
Subject: Re: [WIP] LED Panel
Date: 9 Mar 2004 05:35:56
Message: <404d9e0c$1@news.povray.org>
> What is the eventually aim of all of this? Is this just an experiment
> or are you leading up to some LED-inspired work?

I started on a Radiosity experiment and now I'm aiming to produce some
bespoke wallpapers for co-workers e.g. Mr Houghton.


Post a reply to this message

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