POV-Ray : Newsgroups : povray.general : Limits to size and distance? Server Time
28 Nov 2024 10:32:36 EST (-0500)
  Limits to size and distance? (Message 1 to 10 of 12)  
Goto Latest 10 Messages Next 2 Messages >>>
From: FexFX
Subject: Limits to size and distance?
Date: 7 Mar 2007 10:30:01
Message: <web.45eed98f7f59e8b2556a5ed80@news.povray.org>
Are there built in limits to size and distance in povray?
There seems to be...
If I Add a zero to the scale and Z position of the spheres in the below
starfield generator, the render speed drops to a dead crawl, and the stars
cease to render...The actual cut off point is something between 500,000 and
600,000 distance...I haven't bothered to find the exact limits, but this is
very annoying limitation because it makes modeling things like solar
systems either impossible or painful (try making earth a size of 1 radius,
and you still run out of room before you hit the outer planets, so earth
needs to be like .0001 or something crazy like that...obviously this makes
smaller obects like the moon or a space station suddenly become
...00000000001...bleh)
Does anyone know the limits?  or is there something fundamentally wrong with
my code (beyond a lack of compact-code, or the fact that the memory overhead
for this is far greater than for a bit map).

#declare xrndstar=seed(54321);
union{
#declare Count = 0;
#while (Count<500)
object{
sphere{<0,0,500000>,720}
rotate< rand(xrndstar)*360, (rand(xrndstar)*360+rand(xrndstar)*360) ,
(rand(xrndstar)*360+rand(xrndstar)*360)>
pigment{rgb< 1+(rand(xrndstar)*2) , 1+(rand(xrndstar)*1.5) ,
1+(rand(xrndstar)*1) >*.75}
finish{ambient 2}
no_shadow}
#declare Count = Count+1;
#end
#declare Count = 0;
#while (Count<750)
object{
sphere{<0,0,500000>,720}
rotate< rand(xrndstar)*360, (rand(xrndstar)*360+rand(xrndstar)*360) ,
(rand(xrndstar)*360+rand(xrndstar)*360)>
pigment{rgb< .5+(rand(xrndstar)*1) , .5+(rand(xrndstar)*.75) ,
...5+(rand(xrndstar)*.5) >*.75}
finish{ambient 1.5}
no_shadow no_reflection}
#declare Count = Count+1;
#end
#declare Count = 0;
#while (Count<1000)
object{
sphere{<0,0,500000>,720}
rotate< rand(xrndstar)*360, (rand(xrndstar)*360+rand(xrndstar)*360) ,
(rand(xrndstar)*360+rand(xrndstar)*360)>
pigment{rgb< .25+(rand(xrndstar)*.5) , .25+(rand(xrndstar)*.375) ,
...25+(rand(xrndstar)*.25) >*.75}
finish{ambient 1}
no_shadow no_reflection}
#declare Count = Count+1;
#end
}


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Limits to size and distance?
Date: 7 Mar 2007 10:34:59
Message: <45eedba3@news.povray.org>
FexFX wrote:
> Are there built in limits to size and distance in povray?

<http://tag.povray.org/povQandT/misconceptions.html#simulatingsun>


Post a reply to this message

From: Bill Pragnell
Subject: Re: Limits to size and distance?
Date: 7 Mar 2007 11:35:00
Message: <web.45eee9468c55fdc4731f01d10@news.povray.org>
"FexFX" <fex### [at] comcastnet> wrote:
> Are there built in limits to size and distance in povray?
> There seems to be...

Things can get dicey when you reach solar system proportions. See this
thread:

http://news.povray.org/povray.binaries.images/thread/%3Cweb.4360929f30852916731f01d10%40news.povray.org%3E/?mtop=3

for a lengthy discussion (and partial solution) to this problem when some of
us tried to produce a Ringworld (a big dumb object from Larry Niven's SF
novel of the same name).

Bill


Post a reply to this message

From: FexFX
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 12:30:01
Message: <web.45f047908c55fdc4556a5ed80@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> FexFX wrote:
> > Are there built in limits to size and distance in povray?
>
> <http://tag.povray.org/povQandT/misconceptions.html#simulatingsun>

Unfortunately this does not really answer my question.
The "stars" in question are not being used as light sources...
Are you suggesting that the problems I am having are due to these objects
trying to recieve light from the light sources in my scene?
Because even without light sources The scene slows to a crawl (about 1/100th
the speed) if i try to place an object at 5 million units away from the
camera...and then no matter how large I make it the object will not show up
unless some edge of the object is within ~500,000 units...
That is what I was looking for a reson for...I am perfectly fine with
running this with the solar system not to actual scale, but stars sould be
quadrillions of units away from the camera yet I can only place them a mere
500k units away before things crash to a standstill.


Post a reply to this message

From: FexFX
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 12:40:01
Message: <web.45f049d58c55fdc4556a5ed80@news.povray.org>
"Bill Pragnell" <bil### [at] hotmailcom> wrote:
> "FexFX" <fex### [at] comcastnet> wrote:
> > Are there built in limits to size and distance in povray?
> > There seems to be...
>
> Things can get dicey when you reach solar system proportions. See this
> thread:
>
>
http://news.povray.org/povray.binaries.images/thread/%3Cweb.4360929f30852916731f01d10%40news.povray.org%3E/?mtop=3
>
> for a lengthy discussion (and partial solution) to this problem when some of
> us tried to produce a Ringworld (a big dumb object from Larry Niven's SF
> novel of the same name).
>
> Bill

Thanks for the link...Looks like I may be up against a wall on an even
slammer scale than ringworld scales...
I have bult a space station (small and retro-sci-fi styled) using 1 unit = 1
foot as a scale...
Then I placed a "Jupiter" like object behind it which is roughly 350k units
distant Z and 250k Units Radius...the problem is that the Stars cannot be
more than 500k out...which means that the back edge of "jupiter" is hitting
the stars...
This causes some obvious issues...
Any suggestions beyond rescallign everything so that 1 unit = 100 miles and
then resizing jupiter, the space station, and everything else and leaving
the stars at 500K units?


Post a reply to this message

From: Bruno Cabasson
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 13:05:00
Message: <web.45f04f098c55fdc4f5fba6ef0@news.povray.org>
"FexFX" <fex### [at] comcastnet> wrote:
> Thorsten Froehlich <tho### [at] trfde> wrote:
> > FexFX wrote:
> > > Are there built in limits to size and distance in povray?
> >
> > <http://tag.povray.org/povQandT/misconceptions.html#simulatingsun>
>
> Unfortunately this does not really answer my question.
> The "stars" in question are not being used as light sources...
> Are you suggesting that the problems I am having are due to these objects
> trying to recieve light from the light sources in my scene?
> Because even without light sources The scene slows to a crawl (about 1/100th
> the speed) if i try to place an object at 5 million units away from the
> camera...and then no matter how large I make it the object will not show up
> unless some edge of the object is within ~500,000 units...
> That is what I was looking for a reson for...I am perfectly fine with
> running this with the solar system not to actual scale, but stars sould be
> quadrillions of units away from the camera yet I can only place them a mere
> 500k units away before things crash to a standstill.

What is to be kept in mind is that the accuracy interval of POV for the 3D
space of your scenes is something around [1e-5 .. 1e+5], whatever you deal
with: positions (light_sources or objects), distances, sizes, and perhaps
densities, colors ...

You cannot put together a 5mm insect on a 10cm stone, on a 2000m high
mountain, on a 6378.137km earth, with a 150000000km distant sun with
10000000000000 km distant stars. The range of the size-dynamic should be
kept reasonable within those intervals, because of POV internal thresholds
and epsilons, and because of numerical accuracy.

So in order to make a planetary scene, just try POV's maximum possibilities
with a sample scene in order to make yourself an idea. Then you can place
objects where POV can handle them, and far enough for your stars to be
realistic. You could be lead to change your global scene scale from 1 pov
unit = 1 m  to 1 pov unit = 1km. It depends ... but 100k units for the sun
is not far from the max I think.

    Bruno


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 13:26:19
Message: <45f0554b@news.povray.org>
FexFX wrote:
> That is what I was looking for a reson for...I am perfectly fine with
> running this with the solar system not to actual scale, but stars sould be
> quadrillions of units away from the camera yet I can only place them a mere
> 500k units away before things crash to a standstill.

Of course, but it won't matter as all as long as you adjust them to their
relative size. Besides, if you really want good looking stars, I would
strongly recommend a texture, not actual objects.

	Thorsten


Post a reply to this message

From: FexFX
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 15:45:01
Message: <web.45f075c78c55fdc4556a5ed80@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
> FexFX wrote:
> > That is what I was looking for a reson for...I am perfectly fine with
> > running this with the solar system not to actual scale, but stars sould be
> > quadrillions of units away from the camera yet I can only place them a mere
> > 500k units away before things crash to a standstill.
>
> Of course, but it won't matter as all as long as you adjust them to their
> relative size. Besides, if you really want good looking stars, I would
> strongly recommend a texture, not actual objects.
>
>  Thorsten

Try the code I posted...You'll like it I think...
:)
However, even if I used a texture as you reccomend, the sphere on which the
texture was painted would still suffer the same limitations (albeit with
less memory overhead)
One thing I was thinking is that the stars can move with the camera location
(not rotationally, but in the prime directions) because according to paralx
you should never get ANY closer to any of the stars in a scene unless you
were traveling at insane speeds...


Post a reply to this message

From: Charles C
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 17:00:01
Message: <web.45f086a28c55fdc4ee21010a0@news.povray.org>
"FexFX" <fex### [at] comcastnet> wrote:
.....
> However, even if I used a texture as you reccomend, the sphere on which the
> texture was painted would still suffer the same limitations (albeit with
> less memory overhead)
> One thing I was thinking is that the stars can move with the camera location
> (not rotationally, but in the prime directions) because according to paralx
> you should never get ANY closer to any of the stars in a scene unless you
> were traveling at insane speeds...

Don't forget sky_sphere....

Charles

PS Since this seems to come up a lot, I sometimes wish for some sort of an
alternate parse/render mode where every float uses even more bits, not
necessarily defined by what the local architecture/compiler/FPU is designed
around.  Imagine being able to set float bit length to 128, 256, 512!? in an
INI file. I know, I know, it'd be super slow, probably hard to implement and
I'm dreaming ;-)


Post a reply to this message

From: Alain
Subject: Re: Limits to size and distance?
Date: 8 Mar 2007 19:00:10
Message: <45f0a38a$1@news.povray.org>
FexFX nous apporta ses lumieres en ce 08-03-2007 15:44:
> Thorsten Froehlich <tho### [at] trfde> wrote:
>> FexFX wrote:
>>> That is what I was looking for a reson for...I am perfectly fine with
>>> running this with the solar system not to actual scale, but stars sould be
>>> quadrillions of units away from the camera yet I can only place them a mere
>>> 500k units away before things crash to a standstill.
>> Of course, but it won't matter as all as long as you adjust them to their
>> relative size. Besides, if you really want good looking stars, I would
>> strongly recommend a texture, not actual objects.

>>  Thorsten

> Try the code I posted...You'll like it I think...
> :)
> However, even if I used a texture as you reccomend, the sphere on which the
> texture was painted would still suffer the same limitations (albeit with
> less memory overhead)
> One thing I was thinking is that the stars can move with the camera location
> (not rotationally, but in the prime directions) because according to paralx
> you should never get ANY closer to any of the stars in a scene unless you
> were traveling at insane speeds...



Place your camera at the origin and paint your stare on a large world sphere. 
Wrap everything else in a large union, and move that union.
-OR-
Use a sky_sphere. It's a background feature that use an unis sphere centered on 
the camera location whose pigment is returned if a ray don't encounter anything 
else. It is not rotated if you apply a rotation to the camera.

If you need a planet 10 000 000 unit away, place it only 1000 unit away, but 
scale it 10 000 times smaler. The end result will be the same.

-- 
Alain
-------------------------------------------------
History, in general, only informs us of what bad government is.
Thomas Jefferson


Post a reply to this message

Goto Latest 10 Messages Next 2 Messages >>>

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