On Tuesday 02 December 2003 13:57, Curtis L. Olson wrote:
> [EMAIL PROTECTED] writes:
> > Couldn't we load the whole data into RAM before?
> > 1 GB Ram are cheap today.
>
> 1.  Threre is a big difference between having texture data loaded into
>     main RAM vs. having the texture data loaded into your cards video
>     RAM.  (There are probably a few exceptions, the only one I can
>     think of at the moment is the sgi O2 which has a unified
>     main/video ram structure.)

But when the data is allready in the RAM we wouldn't need 
to load the data from the slow hard drive.

>
> 2.  If my math is working this early, 1GB of ram = 1073741824 bytes.
>
>     Now, we need to store 3 bytes per pixel, so 1GB of ram actually
>     lets us store 1GB/3 = 357913941 pixels of data.
>
>     We would need to store a 2d array of RGB values.  So
>     sqrt(357913941) = 18918 x 18918 array of pixels we can store in
>     1Gb of RAM.
>
>     Assuming 1m texture resolution, this gives you a 18.9 x 18.9 km
>     area you can shove into 1Gb of RAM (assuming all your other
>     software is taking zero bytes of main RAM.)
>
>     That's not much.  Assuming even 10km visibility (6.2 miles) means
>     you could always see off the edge from any place in this area.

But we could use at a visibility of 5 km a 4 m texture resolution,
at 10 km a 8 m texture resolution and at 19 km or more nothing of that,
there we can use normal textures like it is today in flightgear.


distance < 5 km => 1m texture resolution => 10.0 x 10.0 km => 100000000 pixels 
of data
distance > 5 km and < 10 km => 4 m texture resolution => (20.0 * 20.0 km) -
(10.0 x 10.0 km) =>  300000000/4  = 75000000 pixels of data.

Now we we have 357913941-100000000-75000000 = 182913941 for the rest:

distance > 10 km and < 19 km => 8 m texture resolution => (39.0 x 39.0) -  
(20.0 * 20.0 km) =>1121000000 /8 = 140125000 pixels of data

And 182913941-140125000 = 42788941 pixel of data .
(42788941*3)/(1024*1024) = 122.42 MB
So we still have about 122 MB Ram for other things.

Now the only problem that still exists is the data transfer from the RAM 
to the video ram.
A new Atlhon 64 FX has a bandwidth of about 6.4 GB/s.
When we need to load the data from the local ram for every frame instead from
the video ram and our framerate should be about 25 fps we have
only 6.4GB/s / 25= 245 MB/frame that's IMHO not enough
especilly when we need also to load the polygon data.
We maybe need to adjust the values above a little bit. ;)
Like 
2km distance = 1m texture resoluton pixel 
2-5km distance = 4 m texture resolution/pixel
5-10 km distance = 8 m texture resolution/pixel
10 km < distance = old rendering solution
or something like that.

Best Regards,
 Oliver C.


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to