POV-Ray : Newsgroups : povray.newusers : Media, radiosity, and coffee Server Time
26 Nov 2024 17:37:58 EST (-0500)
  Media, radiosity, and coffee (Message 1 to 6 of 6)  
From: Matthew Pace
Subject: Media, radiosity, and coffee
Date: 5 Feb 2004 01:43:33
Message: <matthewpace-9E3040.22433104022004@news.povray.org>
I am tired, and have been rendering this image every moment I get for 
the past few nights (very very little sleep lately).  I basically want a 
box, dark, with glowing strips on it, reflected below it.  I currently 
have the box glowing, but it is insufficient.   The lines emit light, 
sure enough, but there is no glow to them, so I added a sphere to the 
scene, with media in it (looking back now, I realize I could/should have 
used atmospheric media, but that should not effect the outcome.  The 
media does not show up at all, I have played with densities, types (mie 
haze, mie murkey, and type 1- whichever that was).  Yes, media is on in 
the radiosity block, but I cannot get my media to show up.  The 
reflection below the cube is darker, but I think this is more from the 
dark reflective surface and the fact that it is blurred.

Not only is this my first real scene using media and radiosity, it is 
the first scene I really am putting full effort behind.

Things I have checked:
   Sphere is within camera view
   Media is on
   Radiosity is effected by media
   

Below is first a link to the image so far, and below that is my source 
code.  My source is ugly, uncommented, and not optimized, so dont 
criticize me, because I already know.

Thanks for any input! (besides source code criticism)

image located at (small, aliased render)

http://atlas.walagata.com/w/mdpace/box.png

source code :

//matthew pace
//feb 1 2004




#version 3.5;
global_settings 
{
   radiosity 
   {
      pretrace_start 0.08          
      pretrace_end   0.04           
      count 35                    
      nearest_count 5               
      error_bound .8               
      recursion_limit 4             
      low_error_factor .5           
      gray_threshold 0.0            
      minimum_reuse 0.015           
      brightness 2                  
      adc_bailout 0.01/2
         media on                    
    }
}


declare MyOrange= color rgbf <.78,.55,.12,.4> ;
#declare CyRadius=.1;


camera
{
   location <7,6,7>
   look_at 0
}
light_source
{
   <3,5,6>
   color rgb .005
}


sphere
{
   <1.5,1.5,1.5> 8
   pigment
   {
      color rgbf 1
   }
   interior
   {
      media
      {  
         absorption .5
         emission <.2,.2,.05> 
         scattering
         {
            3 
            color rgb 1
         }
         density
         {
            bozo
               color_map
               {
                  [0 color rgb 0]
                  [.5 color rgb 0]
                  [1 color rgb 1]
               }
         }
      }
   }
}


plane
{
   y, -.25  
texture 
  { 
   average texture_map 
    {
      #declare K = 0; 
      #declare S = seed(17); 
      #while(K < 20) 
        [1
           pigment { color rgb 0 } 
           finish { reflection .8 metallic .6 } 
           normal 
           { 
               bumps .05 
               translate <rand(S)*1.5,rand(S)*2,rand(S)>*15 
               scale 1000 
           } 
        ]
        #declare K = K+1; 
      #end 
   }  
  } 
}

difference
{

   box
   {
      0,3
      pigment
      {
         color rgb .3
      }
      finish
      {
         reflection .5
      }
   }
   cylinder
   {
      <1,-1,0>,<1,4,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }
   }
   cylinder
   {
      <2,-1,0>,<2,4,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }
   }
   cylinder
   {
      <2,-1,0>,<2,4,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }
   }


   cylinder
   {
      <2,-1,0>,<2,4,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }
   }  
   cylinder
   {
      <2,-1,0>,<2,4,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }
   }

   
   cylinder
   {
      <3,-1,1>,<3,4,1>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <3,-1,2>,<3,4,2>,CyRadius
      pigment
      {
         color MyOrange
      }     
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <2,-1,3>,<2,4,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <1,-1,3>,<1,4,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <1,3,0>,<1,3,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }

   cylinder
   {
      <2,3,0>,<2,3,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <0,3,1>,<3,3,1>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <0,3,2>,<3,3,2>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <1,-3,0>,<1,-3,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }

   cylinder
   {
      <2,-3,0>,<2,-3,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <0,-3,1>,<3,-3,1>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   
   cylinder
   {
      <0,-3,2>,<3,-3,2>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,1,0>,<3,1,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,2,0>,<3,2,0>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <3,1,0>,<3,1,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <3,2,0>,<3,2,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,1,3>,<3,1,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,2,3>,<3,2,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,1,0>,<0,1,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
   cylinder
   {
      <0,2,0>,<0,2,3>,CyRadius
      pigment
      {
         color MyOrange
      }
      finish
      {
         ambient 2
      }

   }
}


Post a reply to this message

From: Dan P
Subject: Re: Media, radiosity, and coffee
Date: 5 Feb 2004 03:01:02
Message: <4021f83e$1@news.povray.org>
"Matthew Pace" <mat### [at] earthlinknet> wrote in message
news:matthewpace-9E3040.22433104022004@news.povray.org...
>    I am tired, and have been rendering this image every moment I get for
> the past few nights (very very little sleep lately).  I basically want a
> box, dark, with glowing strips on it, reflected below it.  I currently
> have the box glowing, but it is insufficient.   The lines emit light,
> sure enough, but there is no glow to them, so I added a sphere to the
> scene, with media in it (looking back now, I realize I could/should have
> used atmospheric media, but that should not effect the outcome.  The
> media does not show up at all, I have played with densities, types (mie
> haze, mie murkey, and type 1- whichever that was).  Yes, media is on in
> the radiosity block, but I cannot get my media to show up.  The
> reflection below the cube is darker, but I think this is more from the
> dark reflective surface and the fact that it is blurred.

I had trouble with the atmosphere so this file didn't do the trick, yet it
might get you closer. The challenge is that even though you can push the
ambience of an object past 1, it does not actually emit light. To an object
emit light, use the looks_like in a light_source object. Example follows
(please don't be offended at the re-write... that was just for my own
understanding of how you made the object):


#include "colors.inc"


/*
global_settings
{
   radiosity
   {
      pretrace_start 0.08
      pretrace_end   0.04
      count 35
      nearest_count 5
      error_bound .8
      recursion_limit 4
      low_error_factor .5
      gray_threshold 0.0
      minimum_reuse 0.015
      brightness 2
      adc_bailout 0.01/2
         media on
    }
}
*/



#local MyOrange= color rgbf <.78,.55,.12,.4> ;
#local CyRadius=.1;


camera
{
   location <7,6,7>
   look_at <0, 0, 0>

   up y
   right image_width / image_height * x
}




light_source
{
   <3,5,6>
   color rgb 0.005
}



/*
media
{
 absorption .5
 emission <.2,.2,.05>

 scattering
 {
  3
  color rgb 1
 }

 density
 {
  bozo

  color_map
  {
   [0 color rgb 0]
   [.5 color rgb 0]
   [1 color rgb 1]
  }
 }
}
*/








plane
{
 y, -0.25

 texture
 {
  average texture_map
  {
   #declare K = 0;
   #declare S = seed(17);
   #while(K < 20)
   [1
      pigment { color rgb 0 }
      finish { reflection 0.8 metallic 0.6 }
      normal
      {
          bumps .05
          translate <rand(S)*1.5,rand(S)*2,rand(S)>*15
          scale 1000
      }
   ]
   #declare K = K+1;
   #end
  }
 }
}






#declare rod =
light_source
{
 0
 color MyOrange

 looks_like
 {
  cylinder
  {
   <0,-2.1,0>, <0, 2.1, 0>, CyRadius


   pigment
   {
    color MyOrange
   }


   finish
   {
    ambient 2
   }
  }
 }
}



sphere
{
 <0, 0, 0>, 1
 translate 3*z

 pigment { color White }
}




#declare face =
union
{
 object { rod translate -0.75*x }
 object { rod translate 0.75*x  }
 object { rod rotate 90*z translate 0.75*y }
 object { rod rotate 90*z translate -0.75*y }
}




#declare puzzlebox =
difference
{
 box
 {
  <-2, -2, -2>, <2, 2, 2>

  pigment
  {
    color rgb <0.3, 0.3, 0.3>
  }

  finish
  {
   reflection 0.5
  }
 }

 object { face translate -2*z }
 object { face translate 2*z }

 object { face rotate 90*y translate -2*x }
 object { face rotate 90*y translate 2*x }

 object { face rotate 90*x translate 2*y }
 object { face rotate 90*x translate -2*y }
}



object { puzzlebox translate 1.5*y }


Post a reply to this message

From: Philippe Debar
Subject: Re: Media, radiosity, and coffee
Date: 5 Feb 2004 07:23:39
Message: <402235cb$1@news.povray.org>
Dan P wrote:
 > I had trouble with the atmosphere so this file didn't do the trick, 
yet it
 > might get you closer. The challenge is that even though you can push the
 > ambience of an object past 1, it does not actually emit light. To an 
object
 > emit light, use the looks_like in a light_source object.

This is true only when not using radiosity.

With radiosity, every object with ambient>0 emits light (provided you
didn't set global_settings { ambient_light <0,0,0> }).

Hence, it is a good method to use ambient and not looks_like when using
radiosity. High ambient objects will give you "real" area lights.


Povingly,


Philippe


Post a reply to this message

From: Mike Raiford
Subject: Re: Media, radiosity, and coffee
Date: 5 Feb 2004 08:20:28
Message: <4022431c$1@news.povray.org>
"Matthew Pace" <mat### [at] earthlinknet> wrote in message
news:matthewpace-9E3040.22433104022004@news.povray.org...

> Things I have checked:
>    Sphere is within camera view
>    Media is on
>    Radiosity is effected by media

Ahh, but you didn't check that the sphere containing the media was hollow ;)

after messing with your scene a bit, I would suggest simply using small
cubes with an orange light source inside (maybe emitting media in the
cracks) to get the effect you're looking for.  It doesn't look like
Radiosity + high ambient will create the "light" to be scattered. You need a
true light source for this.

Example:

sphere
{
   <1.5,1.5,1.5> 8 hollow  // Must be hollow for media
   pigment
   {
      color rgbf 1
   }
   interior
   {
      media
      {
         //absorption .5
         //emission <.2,.2,.05>
         scattering
         {
            3
            color rgb .1
            extinction 0.0
         }
         /*density
         {
            bozo
               color_map
               {
                  [0 color rgb 0]
                  [.5 color rgb 0]
                  [1 color rgb 1]
               }
         } */
      }
   }
}


Post a reply to this message

From: Matthew Pace
Subject: Re: Media, radiosity, and coffee
Date: 5 Feb 2004 23:06:47
Message: <matt-pace-14630B.20064505022004@news.povray.org>
>  It doesn't look like
> Radiosity + high ambient will create the "light" to be scattered. You need a
> true light source for this.


Thanks a ton to all your advice everyone.  The hollow thing has gotten 
me before, I should have known.  That and the above nusance are my 2 
recommendations for the next POV.

Once again, thanks to all.


Post a reply to this message

From: Dan P
Subject: Re: Media, radiosity, and coffee
Date: 5 Feb 2004 23:57:03
Message: <40231e9f$1@news.povray.org>
"Matthew Pace" <mat### [at] lycoscom> wrote in message
news:matt-pace-14630B.20064505022004@news.povray.org...
> >  It doesn't look like
> > Radiosity + high ambient will create the "light" to be scattered. You
need a
> > true light source for this.
>
>
> Thanks a ton to all your advice everyone.  The hollow thing has gotten
> me before, I should have known.  That and the above nusance are my 2
> recommendations for the next POV.
>
> Once again, thanks to all.

I learned a lot too. Thanks!!!


Post a reply to this message

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