POV-Ray : Newsgroups : povray.newusers : How much is TOO FAR and TOO BIG? Server Time
26 Nov 2024 03:26:44 EST (-0500)
  How much is TOO FAR and TOO BIG? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: Jeff
Subject: How much is TOO FAR and TOO BIG?
Date: 2 Nov 2004 21:50:00
Message: <web.4188466fe9fa4a2034d765680@news.povray.org>
After a hiatus of a couple of years, I am getting back into PovRay (3.6.1
for Windows).

I've read the FAQ both in the Help File and in the Online Documentation.
There IS a clue, but not a hard answer ( " ... problems with very large
numbers when scaling ... " or something). I've also searched the newsgroup.

My main computer was destroyed in an accident, until I can afford a new one
I am using (cough...) this old Pentium 166 with 128 Mb RAM and just a
SuperVga chip for video. (I bought a cheap external serial port modem for
this thing after I lost my GOOD computer - so at least I can connect to the
Internet). This computer was originally just to run a few old legacy DOS
games. MAYBE this computer (the CPU? FPU?) has something to do with my
problem... maybe not, you never know... also I don't have a lot of time to
experiment, takes LOTS of time to render.

I am using *meters* as my basic scale, so a vector of <-3,2,-1> would be x=
-3 meters, y = 2 meters, z= -1 meter. Right now I am back to working with
old (tired?) favorites : spacecraft, space stations, planets etc. Working
with meters is great for this.

Currently I am trying to "improve" upon the "How to render a good starfield"
concept, and as an extension to that, planets, stars, nebula etc.

I am concerned with trying to render star systems as accurately *as
possible*. Naturally this means lots of BIG things that are VERY far away.
I already know that I can't accurately model, say, the sun (radius =
695,500 Km, with the scale I am working in it would be sphere { <0, 0, 0>,
695500000 } and translated to a position the approximate distance from the
earth it would be 149,600,000 or a translate using meters might be
translate <0, 0, 1.496E11> !!! These numbers are WAY too big, I know).

Since I KNOW I can't do things accurately, I need to know "How much is TOO
big and how much is TOO far?". Someone with a good knowledge of the innder
workings of PoV, say, one of the programmers might help?

Here are some clues:

When using a textured Big Sphere to make stars, if the sphere has a radius
of 10,000,000, the texture tends to *fail* below the x-z plane. When you
start to exceed 10,000,000, the star texture fails completely and all you
see is black. So far in my experiments a 9,999,999 meter Big Star Sphere
seems to be okay, but I haven't played with moving around and looking in it
yet (via changing the camera). When I get around to looking anywhere else
besides directly into the z axis, or changing the camera Y, or changing my
camera angle then 9,999,999 might fail too and I will have to "pull back".

When trying to use 3D objects instead of The Big Sphere, such as triangles,
discs, spheres, the failure distance seems to be much shorter (on the order
of thousands rather than millions). The acceptable distance for spheres
seems to be consistantly longer than for the finite patch primitives.

Other than "Just try things out until they work!", can anyone offer any
insight or *specific* useful information on this issue? Thanks. - Jeff


Post a reply to this message

From: Alain
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 3 Nov 2004 19:02:03
Message: <4189717b$1@news.povray.org>
Jeff nous apporta ses lumieres ainsi en ce 2004-11-02 21:46... :

>After a hiatus of a couple of years, I am getting back into PovRay (3.6.1
>for Windows).
>
>I've read the FAQ both in the Help File and in the Online Documentation.
>There IS a clue, but not a hard answer ( " ... problems with very large
>numbers when scaling ... " or something). I've also searched the newsgroup.
>
>My main computer was destroyed in an accident, until I can afford a new one
>I am using (cough...) this old Pentium 166 with 128 Mb RAM and just a
>SuperVga chip for video. (I bought a cheap external serial port modem for
>this thing after I lost my GOOD computer - so at least I can connect to the
>Internet). This computer was originally just to run a few old legacy DOS
>games. MAYBE this computer (the CPU? FPU?) has something to do with my
>problem... maybe not, you never know... also I don't have a lot of time to
>experiment, takes LOTS of time to render.
>
>I am using *meters* as my basic scale, so a vector of <-3,2,-1> would be x=
>-3 meters, y = 2 meters, z= -1 meter. Right now I am back to working with
>old (tired?) favorites : spacecraft, space stations, planets etc. Working
>with meters is great for this.
>
>Currently I am trying to "improve" upon the "How to render a good starfield"
>concept, and as an extension to that, planets, stars, nebula etc.
>
>I am concerned with trying to render star systems as accurately *as
>possible*. Naturally this means lots of BIG things that are VERY far away.
>I already know that I can't accurately model, say, the sun (radius =
>695,500 Km, with the scale I am working in it would be sphere { <0, 0, 0>,
>695500000 } and translated to a position the approximate distance from the
>earth it would be 149,600,000 or a translate using meters might be
>translate <0, 0, 1.496E11> !!! These numbers are WAY too big, I know).
>
>Since I KNOW I can't do things accurately, I need to know "How much is TOO
>big and how much is TOO far?". Someone with a good knowledge of the innder
>workings of PoV, say, one of the programmers might help?
>
>Here are some clues:
>
>When using a textured Big Sphere to make stars, if the sphere has a radius
>of 10,000,000, the texture tends to *fail* below the x-z plane. When you
>start to exceed 10,000,000, the star texture fails completely and all you
>see is black. So far in my experiments a 9,999,999 meter Big Star Sphere
>seems to be okay, but I haven't played with moving around and looking in it
>yet (via changing the camera). When I get around to looking anywhere else
>besides directly into the z axis, or changing the camera Y, or changing my
>camera angle then 9,999,999 might fail too and I will have to "pull back".
>
>When trying to use 3D objects instead of The Big Sphere, such as triangles,
>discs, spheres, the failure distance seems to be much shorter (on the order
>of thousands rather than millions). The acceptable distance for spheres
>seems to be consistantly longer than for the finite patch primitives.
>
>Other than "Just try things out until they work!", can anyone offer any
>insight or *specific* useful information on this issue? Thanks. - Jeff
>
>
>
>  
>
Have you tried the good ol sky_sphere? It's "surface" is set at 
"infinity". You only have to find a good pattern for your stars (you 
don't scale a sky_sphere pattern like you do on la large sphere). For 
the other objects, the use of scaling can be used to fake a greater 
distance. A small or tiny object at a moderate distance will look like a 
large object very far away.

Alain


Post a reply to this message

From: Warp
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 4 Nov 2004 06:29:13
Message: <418a1289@news.povray.org>
Alain <aze### [at] qwertygov> wrote:
> Have you tried the good ol sky_sphere? It's "surface" is set at 
> "infinity".

  Actually, technically a sky_sphere is a unit sphere (ie. radius 1)
around the camera (well, not really around the camera, but around the
origin of each ray). Not really "infinite". :P
  (The reason why it looks like it's farther away than any other
object is that its color is taken only if the ray did not hit anything
else. Thus the color of the sky sphere looks like it's behind every
object.)

-- 
#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: Alain
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 4 Nov 2004 08:26:54
Message: <418a2e1e$1@news.povray.org>
Warp nous apporta ses lumieres ainsi en ce 2004-11-04 06:29... :

>Alain <aze### [at] qwertygov> wrote:
>  
>
>>Have you tried the good ol sky_sphere? It's "surface" is set at 
>>"infinity".
>>    
>>
>
>  Actually, technically a sky_sphere is a unit sphere (ie. radius 1)
>around the camera (well, not really around the camera, but around the
>origin of each ray). Not really "infinite". :P
>  (The reason why it looks like it's farther away than any other
>object is that its color is taken only if the ray did not hit anything
>else. Thus the color of the sky sphere looks like it's behind every
>object.)
>
>  
>
Even if it's not realy at infinity, it look like it is.


Post a reply to this message

From: Jim Charter
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 4 Nov 2004 22:55:57
Message: <418af9cd$1@news.povray.org>
Warp wrote:
> Alain <aze### [at] qwertygov> wrote:
> 
>>Have you tried the good ol sky_sphere? It's "surface" is set at 
>>"infinity".
> 
> 
>   Actually, technically a sky_sphere is a unit sphere (ie. radius 1)
> around the camera (well, not really around the camera, but around the
> origin of each ray). Not really "infinite". :P
>   (The reason why it looks like it's farther away than any other
> object is that its color is taken only if the ray did not hit anything
> else. Thus the color of the sky sphere looks like it's behind every
> object.)
> 
As counter-intuitive ideas go, put that near the top of the list.  How 
does it work if a reflected ray never hits?


Post a reply to this message

From: Slime
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 4 Nov 2004 23:14:18
Message: <418afe1a$1@news.povray.org>
> As counter-intuitive ideas go, put that near the top of the list.  How
> does it work if a reflected ray never hits?

Then it takes the color of the sky_sphere as though it were centered at the
origin of the reflected ray.

What Warp was saying was merely a distinction about how the ray-sky_sphere
intersection is actually calculated. For practical purposes, it's sufficient
to imagine it as a sphere with infinite radius, but it's always useful to
know exactly what's going on as this can explain some otherwise unintuitive
behaviors (such as the interaction between a sky_sphere and an orthographic
camera).

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


Post a reply to this message

From: Warp
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 5 Nov 2004 05:14:59
Message: <418b52a3@news.povray.org>
Slime <fak### [at] emailaddress> wrote:
> What Warp was saying was merely a distinction about how the ray-sky_sphere
> intersection is actually calculated. For practical purposes, it's sufficient
> to imagine it as a sphere with infinite radius

  It is actually quite important to know that the sky_sphere behaves like
a unit sphere around the origin of the ray.
  Why? Because when you apply a pigment to it, it works like a unit sphere.

  If you start thinking "hey, sky sphere is infinitely large, how can I
apply a gradient pigment to it? I can't scale it infinitely large!" you
get into problems.

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 7 Nov 2004 14:53:38
Message: <cjameshuff-2F4724.14533507112004@news.povray.org>
In article <418afe1a$1@news.povray.org>, "Slime" <fak### [at] emailaddress> 
wrote:

> > As counter-intuitive ideas go, put that near the top of the list.  How
> > does it work if a reflected ray never hits?
> 
> Then it takes the color of the sky_sphere as though it were centered at the
> origin of the reflected ray.

Actually, centered at < 0, 0, 0>, no matter what the origin of the ray. 
Otherwise reflections and refractions would look really, really weird. 
(Consider an image of smooth water...two nearby points on the water 
would see totally different skies. And the sky seen through a window 
would be completely different from that seen directly, because the rays 
would originate from the glass, not the camera.)

And there's not really any surface, it's just a pigment determining the 
background color. That's why you can't use normal, finish, or interior. 
(Though you could define the normal as the mirror of the ray direction, 
POV-Ray didn't last I checked.)

Basically, it takes the normalized direction of the ray as the pigment 
evaluation point.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Slime
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 7 Nov 2004 15:40:54
Message: <418e8856$1@news.povray.org>
> Basically, it takes the normalized direction of the ray as the pigment
> evaluation point.

That's what I was trying to say. I guess I should have clarified that the
texture of the sphere is taken as though it were centered on the origin.
When I said that it was centered at the origin of the ray, I was only
thinking of the intersection calculation.

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


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: How much is TOO FAR and TOO BIG?
Date: 12 Nov 2004 15:08:50
Message: <Xns959FD77BCFDC9raf256com@203.29.75.35>
nomail@nomail news:web.4188466fe9fa4a2034d765680@news.povray.org


Objects smaller then 0.1 unit are begining to have shadow-problems if they 
are semi-transparent.

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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