Re: Procedural landscape generating algorithm.
- From: Bart <bc@xxxxxxxxxx>
- Date: Sun, 31 Aug 2008 12:03:03 -0700 (PDT)
mike3 wrote:
I was trying to figure out a method to solve the following problem.
I wanted to build a program, like a game (although not with any
objective), where you could explore a whole virtual "galaxy" of
planets and stars in a star ship. But the thing is that I want it so
The problem with _star systems_ though is, of course, running out of
math
precision. Vertices will lose resolution due to the huge displacement
terms.
Although at double-precision we can go to 4 x 10^15 m before error
becomes
larger than 1m, the furthest planets in a star system may be at like
10^13 m
or beyond. This is enough to start getting (somewhat) visible
quantization
artifacts. Which would mean the star-system data would likely have to
be stored
via some arbitrary-precision format (quad-precision would be plenty, I
think,
I think 64-bit floats will be plenty. In a galaxy 100000 light years
(10^18)km across, with an origin in the centre say, you can specify a
star's position to 10 or 100km resolution. That's not bad, given that
a star might be millions of km across.
Then you store positions within each star-system relative to the
centre of the star, already giving you resolution better than 1m. And
then perhaps relative to the centre of each planet (now you can
specify things to the nearest micron).
When you work out the maths, the result only needs to be accurate to
the nearest pixel (or sub-pixel) on your screen.
Your star-data may also have to be procedurely generated as well as
the planets, as there might be 10^11 stars in your galaxy (although
being your own galaxy, you can choose a rather sparse one compared
with ours).
This way you might as well put a few extra galaxies floating around,
while you're about it.
You might want to look at Celestia, if you haven't already done so,
for a couple more ideas.
--
Bartc
.
- Prev by Date: Re: Suggestions for arbitrary binary data format and support libraries
- Next by Date: Re: How to send data..
- Previous by thread: Re: Suggestions for arbitrary binary data format and support libraries
- Next by thread: Re: Procedural landscape generating algorithm.
- Index(es):
Relevant Pages
|