POV-Ray : Newsgroups : povray.newusers : Sphere with holes and lights shining out of it Server Time
26 Nov 2024 05:37:59 EST (-0500)
  Sphere with holes and lights shining out of it (Message 1 to 2 of 2)  
From: Carsten Schmitz
Subject: Sphere with holes and lights shining out of it
Date: 15 Oct 2004 18:45:42
Message: <41705316@news.povray.org>
Hi!

I am really clueless now.. I want to create a rotating sphere with the
effect seen here: http://users.pandora.be/eclypse/

I jsut dont get the emitting beams right. As soon as i add media the whole
scene is lit bright.
Rotating is working and I cut the holes using sphere... i would appreciate
any hint very much how to do the light emiting from inside the sphere right.

Thank you

Carsten

Here is what i have so far:


--------------- snip ---------------------
// Persistence of Vision Ray Tracer Scene Description File
// File: gomb.pov
// Vers: 3.5


#version 3.5;

#include "colors.inc"


global_settings {
  assumed_gamma 5.0
}



media {    // atmospheric media
  intervals 10
  scattering { 1, rgb 0.03 }
  samples 1, 10
  confidence 0.9999
  variance 1/1000
  ratio 0.9
}



camera {
  location  <1.5, 0, 0>
  rotate  <90,0, 360*clock>

  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 0.0,  0.0>
}




light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <10,10,10>  // light's color
  media_attenuation off
//  translate <-30, 30, -30>
}

// ----------------------------------------



difference{

sphere {
  0.0, .5
  color rgb <1, 1, 1>  // light's color
  hollow

texture {

    finish{
      specular 0.6
    }
    }

}


// Capped Cylinder, closed [or open ended]
// cylinder { <END1>, <END2>, RADIUS [open] }
//  END1 = coord of one end of cylinder
//  END2 = coord of other end
// RADIUS = size of cylinder
// open = if present, cylinder is hollow, else capped

#declare Index2 = 1;
#while(Index2 <= 10)

#declare Index = 1;
#while(Index <= 10)


cylinder {
  -1*x,  1*x,  0.03
   open
   hollow
   rotate <1,Index2*18,Index*18>

texture {
    finish{
      specular 0.6
    }
  }
}


  #declare Index = Index + 1;
#end

  #declare Index2 = Index2 + 1;
#end

}


Post a reply to this message

From: Mike Raiford
Subject: Re: Sphere with holes and lights shining out of it
Date: 21 Oct 2004 08:18:15
Message: <4177a907$1@news.povray.org>
Carsten Schmitz wrote:

> Hi!
> 
> I am really clueless now.. I want to create a rotating sphere with the
> effect seen here: http://users.pandora.be/eclypse/
> 
> I jsut dont get the emitting beams right. As soon as i add media the whole
> scene is lit bright.
> Rotating is working and I cut the holes using sphere... i would appreciate
> any hint very much how to do the light emiting from inside the sphere right.
> 
> Thank you
> 
> Carsten

Hi,

After meddling with the scene file you posted I came up with this..
I have commented some of the changes I made. I also made the holes a bit 
smaller to look more like the original.

Scene file follows:


// Persistence of Vision Ray Tracer Scene Description File
// File: gomb.pov
// Vers: 3.5


#version 3.5;

#include "colors.inc"


global_settings {
   assumed_gamma 1.0
}

// Enclose the media in the smallest sphere possible.
// This speeds up rendering and prevents the "white-out"
// you were experiencing
sphere { <0, 0, 0> .7 pigment { rgbt 1 } hollow interior {

media {    // atmospheric media
// For the default method (3) 1 interval is preferable.
   intervals 1

// RGB 2 seems to be enough to get this right
   scattering { 1, rgb 2 }

// 70 samples seems to be enough to get a smooth result
   samples 70, 70

// These slowed it down... I commented them out for testing ;)
   //confidence 0.9999
   //variance 1/1000

// Spherical density map to fade the scattered light as it reaches the
// edges.
   density
   { spherical
     density_map
     {
         [0 rgb 0]
         [.3 rgb  0]
         [.45 rgb  .5]
         [.5 rgb  1]
         [1 rgb  1]
     }

   }
   //ratio 0.9
}

}
}


// I moved the camera a bit.. feel free to move it back ;)
camera {
   location  <3.5, 0, 0>
   rotate  <90,0, 360*clock>

   direction 1.5*z
   right     x*image_width/image_height
   look_at   <0.0, 0.0,  0.0>
}




// Light's brightness was changed to 5
light_source {
   <0, 0, 0>            // light's position (translated below)
   color rgb 5  // light's color
   media_attenuation on
   fade_power 2
//  translate <-30, 30, -30>
}

// I created this light source, then commented it out (Was testing to
// see what I could see of the sphere.
/*light_source {
   <200, -200, 200>            // light's position (translated below)
   color rgb <1,1,1>  // light's color
   media_attenuation on
//  translate <-30, 30, -30>
}*/

// ----------------------------------------



difference{

// This sphere is non-hollow, and is no longer textured.
sphere {
   0.0, .5

   //hollow
}

// This sphere hollows out the sphere above, now it's more like a shell.
sphere {
   0.0, .49  }

// No changes to your cylinders except radius.

// Capped Cylinder, closed [or open ended]
// cylinder { <END1>, <END2>, RADIUS [open] }
//  END1 = coord of one end of cylinder
//  END2 = coord of other end
// RADIUS = size of cylinder
// open = if present, cylinder is hollow, else capped

#declare Index2 = 1;
#while(Index2 <= 10)

#declare Index = 1;
#while(Index <= 10)


cylinder {
   -1*x,  1*x,  0.015
    //open
    //hollow
    rotate <1,Index2*18,Index*18>

}


   #declare Index = Index + 1;
#end

   #declare Index2 = Index2 + 1;
#end

// The entire difference gets this texture.
// I know it seems silly to use a white texture, but... I wanted to!
// makes it easier to see when debugging light is turned on ;)

texture {
   pigment { color rgb <1, 1, 1> } // light's color

     finish{
       specular 0.6
       //ambient 1
     }
     }
}
-- 
~Mike


Post a reply to this message

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