POV-Ray : Newsgroups : povray.newusers : Making a glowing object : Re: Making a glowing object Server Time
30 Jul 2024 10:25:31 EDT (-0400)
  Re: Making a glowing object  
From: Mike Raiford
Date: 30 Jun 2004 08:33:33
Message: <40e2b31d$1@news.povray.org>
James wrote:

> I am trying to model a spaceship.  I am wanting to put red and gree running
> lights on it, but I am totally stumped as to how to make glowing light bulb
> type objects that look realistic.  Any help would be appreciated.

Here's what I did in my heating element scene. This may give you a good 
start at creating a glowing object. This scene will not replicate the 
heating element, but should give you a nice glowing object:

global_settings
{
     // These are final radiosity settings,
     radiosity
     {
         pretrace_end 0.01 // Testing 0.05
         count 350      // Testing 100
         low_error_factor 0.3
         nearest_count 10 // Testing 5-8
         minimum_reuse 0.001 // Comment out for Testing
         media on    // This is needed if emitting media is to have
             // an effect on surrounding objects
     }
}

// Because Ambient objects emit light with radiosity, set all finishes 
to ambient 0 by default
default { finish { ambient 0 }}

plane { y,-1  pigment { color rgb 1 } }

     // This cylinder contains the glowing pattern
     cylinder { <10, 0, 0>, <0, 0, 0>, 1 pigment { color rgbt 1.0 }
         hollow
         interior
         {
             media
             {
         // Important part: Emitting media. Notice the scalar
         // multiply. Adjust to suit tastes/requirements
                 emission rgb <1.0, 0.7, 0.2>*1

         // This is the pattern I am using for density.
         // You may want to try something like spherical with
         // rgb values running from 0 to 1.

                 density
                 {
                     gradient x
                     sine_wave
                     density_map
                     {
                         [0 rgb <1,0.3,0>] // In this case, I wanted it
                         [1 rgb 1]       // to go to orange
                     }
                     scale 10
                     translate x*3
                 }
             }
         }
     rotate y*35
     translate z*20+y*.9
     }

camera {

     location <0, 10, 0>
     look_at <0, 0, 20>
}

light_source { <-5, 10, 20> color rgb 1
     area_light x*10,y*10,20,20
     circular
     orient
     adaptive 1
     }


Post a reply to this message

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