POV-Ray : Newsgroups : povray.general : objects not rendering because of distances, etc Server Time
2 Aug 2024 14:20:03 EDT (-0400)
  objects not rendering because of distances, etc (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: EagleSun
Subject: objects not rendering because of distances, etc
Date: 31 Dec 2004 17:15:01
Message: <web.41d5ced023b780309011d8b10@news.povray.org>
Hi yall,

I'm trying to render the sun and earth... the problem is, if I set the sun
far away properly to 149 million kilometers (scale = 1000), or even 149
billion meters (scale = 1), the sun won't render at all, but the object
details on earth look nice.

If I try to change the scale, like setting the sun to 149 thousand
megameters (scale = 1,000,000), the sun renders fine, but the earth details
are bombed.

I made every effort to set proper scaling on earth surface, water turbulance
(water seems to look nice on any scale), clouds (looks nice on scale 1 thru
100), atmosphere (looks nice on scales 1 thru 100), distance of sun
(renders if scale is larger than 1000).

Can anyone give me clues?

Ideally, I would like to render the sun at 149 billion meters, and
eventually trillions of meters for Pluto.

Thanks.


Post a reply to this message

From: Maurice
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 18:36:01
Message: <41d5e261$1@news.povray.org>
EagleSun wrote:
> Hi yall,
> 
> I'm trying to render the sun and earth... the problem is, if I set the sun
> far away properly to 149 million kilometers (scale = 1000), or even 149
> billion meters (scale = 1), the sun won't render at all, but the object
> details on earth look nice.

The obvious question here would be whether you are sure that you have 
the size of the sun and earth right. But I'm guessing that is way too 
obvious, so that must be okay. In that light (pun not intended) I'm 
wondering were the camera is, relative to the sun and earth?


Post a reply to this message

From: Severi Salminen
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 18:55:19
Message: <41d5e6e7$1@news.povray.org>
EagleSun wrote:

> Can anyone give me clues?
> 
> Ideally, I would like to render the sun at 149 billion meters, and
> eventually trillions of meters for Pluto.

This might give you some answers:

http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems

Severi S.


Post a reply to this message

From: Tim Cook
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 18:58:28
Message: <41d5e7a4$1@news.povray.org>
EagleSun wrote:
> Can anyone give me clues?

The problem is basically in how computers handle numbers.  They can't 
easily do very small and very large (or normal and extremely large) 
numbers at the same time.  This isn't to say that they can't do that at 
all, but because it isn't common it isn't handled by modern algorithyms, 
and even if it were it would be significantly slower than other methods.

Computer speed is all about taking shortcuts with math; not using 
forward raytracing except in limited ways relating to specific instances 
in POV, or using heavy optimizations to make games run at usable 
framerates...or using two digits to store the year because it takes up 
half the memory...XD

-- 
Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Slime
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 19:10:26
Message: <41d5ea72@news.povray.org>
> This might give you some answers:
>
> http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems

That VFAQ entry could probably benefit from a suggestion or two about
workarounds.

To EagleSun: Specifically, the best solution is probably to greatly scale
down your solar system (aside from the earth) with reference to the camera's
position. So basically, do this:

object {earth ...}

union {
object {sun ...}
object {planet ...}
... more objects ...

translate -cameraPosition
scale smallValue
translate cameraPosition
}

If you don't scale it down *too* much, it will still look extremely similar
(to the point where you can't possibly notice the difference by eye), but
you'll avoid the huge range of values which is causing the problem.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Alain
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 19:33:42
Message: <41d5efe6@news.povray.org>
EagleSun nous apporta ses lumieres ainsi en ce 2004-12-31 17:12... :

>Hi yall,
>
>I'm trying to render the sun and earth... the problem is, if I set the sun
>far away properly to 149 million kilometers (scale = 1000), or even 149
>billion meters (scale = 1), the sun won't render at all, but the object
>details on earth look nice.
>
>If I try to change the scale, like setting the sun to 149 thousand
>megameters (scale = 1,000,000), the sun renders fine, but the earth details
>are bombed.
>
>I made every effort to set proper scaling on earth surface, water turbulance
>(water seems to look nice on any scale), clouds (looks nice on scale 1 thru
>100), atmosphere (looks nice on scales 1 thru 100), distance of sun
>(renders if scale is larger than 1000).
>
>Can anyone give me clues?
>
>Ideally, I would like to render the sun at 149 billion meters, and
>eventually trillions of meters for Pluto.
>
>Thanks.
>
>
>
>  
>
You hit a hardware limitation, that of the FPU that is "only" 64 bits 
(double presision). To be able to use such whide ranges, you'd need quad 
(128 bits) or octuple (256 bits) presision math, with a processor 
equiped with a FPU capable of such.
Maybe some super computer have such a beast...

The best way around that problem is to fake the scaling. Make you'r sun 
1000 tomes closer, 1000 times smaller. Have a light_source with the 
"parallel" atribute to fake the actual sun distance. For Pluto, you'd 
need to put it 1 000 000 times closer and smaller, maybe more, than it 
should. In this case, it'll look like a single pixel point at 1600*1200 
resolution.

Alain


Post a reply to this message

From: Warp
Subject: Re: objects not rendering because of distances, etc
Date: 31 Dec 2004 20:52:17
Message: <41d60250@news.povray.org>
Tim Cook <z99### [at] bellsouthnet> wrote:
> The problem is basically in how computers handle numbers.  They can't 
> easily do very small and very large (or normal and extremely large) 
> numbers at the same time.

  Actually the reason why the object disappears is not floating point
inaccuracy but because POV-Ray drops the object if it's too far away.
  Naturally POV-Ray does this in order to avoid the accuracy problems,
but it's not the accuracy which is dropping out the object but POV-Ray.
There's a reason for this: It's very possible that if POV-Ray didn't
drop the object, it might render with bad artifacts.

  See http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems
for details.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: EagleSun
Subject: Re: objects not rendering because of distances, etc
Date: 1 Jan 2005 22:55:00
Message: <web.41d7705333b795a43ffc53560@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:

> > http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems
>
> That VFAQ entry could probably benefit from a suggestion or two about
> workarounds.
>
> To EagleSun: Specifically, the best solution is probably to greatly scale
> down your solar system (aside from the earth) with reference to the camera's
> position. So basically, do this:
>
> object {earth ...}
>
> union {
> object {sun ...}
> object {planet ...}
> ... more objects ...
>
> translate -cameraPosition
> scale smallValue
> translate cameraPosition
> }

Ahh :( Thanks for this tip guys....

I tried 2 views... basically at 1 point, I was 4 meters above water viewing
at a position 20 meters away, the sun was 149 billion meters away with a
diameter approximately 10* the size of the sun, so that you should have
been able to see the sun sphere quite big and bright.  To make it appear, I
brought it closer and made it smaller (both by factors of 10000 and
1/10000, respectively).  This scaling factor can get complicated, because
at 1 point, I wanted to render a scene where the camera was about 4000 km
above the surface (or 4,000,000 meters above the surface).  Setting the
scale to 1000 caused too much fading of color in the atmosphere, and in
certain situations, setting the scale to 1 caused the atmosphere to be
"disconnected" from the planet.  I guess rendering scenes that Astronauts
get to see are extremely difficult......

Changing the scale and distance of various objects is gonna be tricky.......
and I was hoping to reserve this kind of mixed scaling for objects outside
of Solar System....

And after reading the article at
"http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems", I
agree that it's too restrictive... and I was hoping that POV Team could let
the users decide on the restrictions.  Granted faraway objects will not be
accurate.... but... viewing the sun at such a faraway distance, I don't
think anyone will notice.


Post a reply to this message

From: Warp
Subject: Re: objects not rendering because of distances, etc
Date: 2 Jan 2005 09:58:25
Message: <41d80c11@news.povray.org>
EagleSun <nomail@nomail> wrote:
> And after reading the article at
> "http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems", I
> agree that it's too restrictive... and I was hoping that POV Team could let
> the users decide on the restrictions.  Granted faraway objects will not be
> accurate.... but... viewing the sun at such a faraway distance, I don't
> think anyone will notice.

  If the sphere is full of dark and white random pixels, they will.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Michael Raiford
Subject: Re: objects not rendering because of distances, etc
Date: 2 Jan 2005 20:14:36
Message: <41d89c7c$1@news.povray.org>
EagleSun wrote:

> And after reading the article at
> "http://tag.povray.org/povQandT/languageQandT.html#largescaleproblems", I
> agree that it's too restrictive... and I was hoping that POV Team could let
> the users decide on the restrictions.  Granted faraway objects will not be
> accurate.... but... viewing the sun at such a faraway distance, I don't
> think anyone will notice.

Unfortunantly, the restriction isn't imposed by POV-Ray in and of 
itself. Its a precision problem inherent to how most computers handle 
floating point (decimal) numbers. While the numbers show an astronomical 
range, the *precision* of the numbers has only a relatively very narrow 
range, somewhere in the neighborhood of a few billion truely 
representable numbers before you have to start dropping digits. When the 
digits are dropped, the calculations are no longer accurate enough and 
artifacts do occur.


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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