Game Development Community

Atlas Limitation

by Vincent BILLET · in Torque Game Engine Advanced · 09/04/2005 (1:50 pm) · 29 replies

According documentation, their is one limit to Atlas terrain : JPEG Size (65535 x 65535).

But their is another limitation : FileStream seems to be able to handle no mor than 4 GB!

I tried this code :
ConsoleFunction(formatRAW,void,3,3,"FileName, Size X")
{
   char *stopstring;
   int img_size = int(strtod( argv[2], &stopstring));
   U16 buffer[65537];
   FileStream fs;
   if(!ResourceManager->openFileForWrite(fs, argv[1], File::Write))
   {
      Con::errorf("FormatRaw - failed to open output file!");
      return;
   }
   for (U32 i=0; i<img_size+1;i++) {buffer[i] = 32768;}
   for(U32 i=0; i<img_size+1; i++)
   {
	  fs.write(img_size*2+2,buffer);
   }
   fs.close();
   Con::printf("Formating RAW achieved");
}
In console I use it like this :
formatRAW("~/data/terrains/myraw.raw",65536);
The output file should be 65537*65537*2 = 8 590 196 738 bytes.
But fileSize = 4 294 901 708 bytes !!!
Why is it stop at 4 GB instead of 8 GB ?
Page«First 1 2 Next»
#22
09/09/2005 (1:05 pm)
Awesome.. now how do I get it? :p
#23
09/10/2005 (1:55 pm)
I'm writing documentation... It comes... It comes... :)
#24
09/10/2005 (2:08 pm)
Excellent, thanks.
#25
09/10/2005 (8:49 pm)
Vincent, does this write out a terrain file, or does it procedurally generate terrain pages for Atlas?

Procedurally generated huge fractal terrains would be mind-blowingly cool. Not to mention, a lot easier on the disk space :-).

And to answer the question of why anyone needs terrain that big... for example, for my current project I'm trying to use real world terrain with photographic textures. 75km x 75km at 1m resolution is a huge amount of data.

What we need here is an Atlas plugin to talk over the net to Google Earth (only half joking).
#26
09/11/2005 (2:39 am)
It writes a terrain generated by fractals. These fractals are controlled by Hexmap.

Actually I'm working on a 524x524Km terrain size for my game. It represent a huge amount of data (8GB RAW file), And I think photographic effect is near with HTC. I mean there is always some "computer like" terrains parts, but in general it looks like photo.


Quote:What we need here is an Atlas plugin to talk over the net to Google Earth (only half joking)
I have made a tool to texture Earth satellite height map data.. That's not very probing, because space between points are too spaced... :(
#27
09/16/2005 (12:48 pm)
Great job!

Going to Google Earth may violate their license agreements (the whole reason Keyhole came into being, IMHO).

There is plenty of data provided for the world, and in particular from state and municipals.

GDAL can read nearly all of them.

I'd be interested in helping you integrate GDAL with the fractal system.
#28
09/16/2005 (12:57 pm)
Thank you for your interest Nanomind. But, for the momment, their is some big troubles with Atlas engine. It crashes regulary with large amount of data (>8192x8192) and I need Ben's clarifications before continuing to work on this project. Unfortunately, he can't work on atlas for a couple of week.
#29
11/08/2005 (7:29 am)
Has there been any update on the Atlas engine?

I'm still interesting in adapting it to real GIS data feeds.
Page«First 1 2 Next»