POV-Ray : Newsgroups : povray.newusers : Mysteriously Disappearing Planet Server Time
30 Jul 2024 10:24:31 EDT (-0400)
  Mysteriously Disappearing Planet (Message 1 to 3 of 3)  
From: Patrick
Subject: Mysteriously Disappearing Planet
Date: 29 Jul 2004 11:45:00
Message: <web.41091a596ec925de1e805b560@news.povray.org>
I'm putting this in the povray.newusers area because I suspect it may be a
question that only someone with limited knowledge of POV-Ray might find
themselves needing to ask.  I, however, have been using POV-Ray off and on
for quite a few years.  My first POV-Ray stuff was done back when it was a
DOS-based program.

That having been said, I'm having a very perplexing problem.  I'm trying to
make a planet with POV-Ray 3.6.  I create this humungous sphere with a
camera focused on it's edge at an extreme closeup.  At this point you can't
really tell that you're looking at a shpere; just like looking at the
horizon on Earth, everything is just flat and fades off in the distance.

Then I start moving the camera back to get a wider perspective.  It was my
intent to pick a position that would give me a view of the whole planet.  I
put my camera at -6E4 * z, then -6E5 * z, etc.  However, when I went to
-6E7, the planet completely disappeared!

To debug the problem, I set the distance at -6E6 (the last time I saw the
planet where it was supposed to be) and multiplied it by 2, 3, etc. to see
exactly where the planet disappears.  I found that the planet wasn't just
vanishing, it was dropping (downwards) out of the view.  But, my lood_at
value never changed!?!  My planet's position was never changed.  I don't
get it.

Below is the code that will demonstrate the effect.  If you increase the
Z_Multiplier value by increments of 0.2, you can watch the planet, step by
step, drop below the camera's view.  I don't want it to do that.

Can anybody tell me what is going on and, more importantly, what I can do to
fix it?

Thanks a bunch!

===== Code begins ======

// Vers: 3.5
// Desc: Basic Scene Example
// Date: mm/dd/yy
// Auth: ?
//

#version 3.6;

#include "colors.inc"

global_settings
{
   assumed_gamma 1.0
}

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

#declare View_WorldView = 1;
#declare View_CloseUp   = 2;

#declare SwitchView = View_WorldView;
//#declare SwitchView = View_CloseUp;

#declare Z_Multiplier = 2.0;

#declare CamPos_WorldView  = < 0.0,  0.0, -Z_Multiplier * 6E6 >;
#declare LookAt_WorldView  = < 0.0,  0.0, 0.0 >;

#declare CamPos_CloseUp    = < 0.0, 5.5, -12 >;
#declare LookAt_CloseUp    = < 0.0, 2.0, 0.0 >;

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

camera
{
   #switch ( SwitchView )
      #case ( View_CloseUp )
      location CamPos_CloseUp
      look_at  LookAt_CloseUp
      #break

      #case ( View_WorldView )
      location CamPos_WorldView
      look_at  LookAt_WorldView
      #break

   #end // of switch

   direction 1.5 * z
   right     x * image_width / image_height
}

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

background
{
   rgb < 0.6, 0.7, 1.0 >
}

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

light_source
{
   < 0, 0, 0 >            // light's position (translated below)
   color rgb < 1, 1, 1 >  // light's color
   translate < -30, 30000, -30000000 >
}

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

#declare PlanetaryRadius = ( 4000.0 * 5280.0 ); //3820.0;

#declare Water = false;

// The World
sphere
{
   0.0, PlanetaryRadius

#if ( Water )
   texture
   {
      pigment
      {
         color < 0, 0, 0 >
      }

      normal
      {
         bumps 0.03
         scale 0.2 //0.05
      }

      finish
      {
         reflection 0.7
      }
   }
#else
   texture
   {
      pigment
      {
         color rgb < 0.7, 0.5, 0.3 >
      }
   }
#end

   translate -PlanetaryRadius * y
}

// ----------------------------------------
==== End of code ====


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Mysteriously Disappearing Planet
Date: 29 Jul 2004 13:50:17
Message: <410938d9@news.povray.org>
In article <web.41091a596ec925de1e805b560@news.povray.org> , "Patrick" 
<pat### [at] hagwarecom> wrote:

> I'm putting this in the povray.newusers area because I suspect it may be a
> question that only someone with limited knowledge of POV-Ray might find
> themselves needing to ask.  I, however, have been using POV-Ray off and on
> for quite a few years.  My first POV-Ray stuff was done back when it was a
> DOS-based program.

Indeed, and the reason is given at
<http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems>
because this is a frequently asked question.

The solution is very simple (and the Q&T should probably be updated to
include that as it might not be obvious to beginners).  All you need to do
is scale down your solar system.  Apart from not being able to render it as
is, you will most likely find that an absolutely accurate use of real
distances and sizes will give you rather unsatisfactory results.  There is
simply too much "space" in space and the objects you render quickly get lost
in the void.

Thus, the solution to get a nice image is to reduce distances and scale
everything to fit within about one million units.  This gives you sufficient
room to spare.

    Thorsten

____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Patrick
Subject: Re: Mysteriously Disappearing Planet
Date: 29 Jul 2004 14:50:00
Message: <web.410945e9b27157af1e805b560@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote:
> In article <web.41091a596ec925de1e805b560@news.povray.org> , "Patrick"
> <pat### [at] hagwarecom> wrote:
>
> > I'm putting this in the povray.newusers area because I suspect it may be a
> > question that only someone with limited knowledge of POV-Ray might find
> > themselves needing to ask.  I, however, have been using POV-Ray off and on
> > for quite a few years.  My first POV-Ray stuff was done back when it was a
> > DOS-based program.
>
> Indeed, and the reason is given at
> <http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems>
> because this is a frequently asked question.
>
>     Thorsten
>
Well, I'd never before tried making anything as big as a planet.  I've taken
this as a lesson to read available FAQ material before asking a dumb
question.

I've printed the entire 19-page Questions and Tips section, 3-hole punched
it, and put it at the front of my POV-Ray notebook.  I won't make this kind
of mistake again.

Thanks for your help.

- Patrick


Post a reply to this message

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