Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've been thinking about developing a small engine not only to develop small experimental games, but also to serve as a base to test various rendering techniques and things like that. Right now I've been thinking a lot about how to handle textures and stumbled on megatexture, but this is something that is a bit puzzling. There is a lot of talk of it being better than the traditional approach to having a bunch of textures around and loading them as needed, but how does megatexture avoid this, I've read around that they use streaming and you can just stream bits and pieces of it as opposed to loading each texture individually, but how does that offer better performance, and isn't that just another form of tilling?

How do we sample such a texture when in a shader, do we stream part of it into memory then work on it. I've seen the latest videos of Rage and the texture do look great, but is that just the result of great artists or does the tech come into play.

To sum up, how does it work, why is it great and how could I do something similar.

share|improve this question
add comment

3 Answers

The basic idea of mega textures is the use of a texture atlas where you pack all your different textures into a big one and use UVs to index into this image. Good heuristics are needed to know what part of the texture you need to stream in from disk based on what you see on screen. The upside is that you can have completely unique textures throughout the game world and only keep the visible data in RAM. A good streaming and caching system is needed to make this affordable.

I recommend going through the material on this page for more detailed info on one approach: http://silverspaceship.com/src/svt/

share|improve this answer
    
Thanks for the link, interesting stuff. –  Daemoniorum Jul 22 '10 at 12:45
add comment

Check up clipmapping for the pre-existing SGI hardware implementation.

More recently Megatexture is being used as a pr name for Sparse Virtual Texturing(SVT)

SVT render a small resolution camera view, noting which texture and mipmap will be needed. Then a CPU routine issues loads to the disk system to bring those texture/mip chunk into memory (if not in memory) and then the loaded texture chunk is placed into a section of a large texture atlas (usually in chunks of say 128x128)

As texture chunks are brought in, a redirection texture (a virtual page map) is updated which take a models required textures and redirects it to the particular part of the large texture where its actually stored.

share|improve this answer
    
That explains quite a bit. I was wondering, if there was only streaming going on, how they managed to stream chunks of that massive texture, in either a HDD or a disk fast enough to be of any use, the intermediate atlas answers that quite nicely. Also I can now see why it's more memory efficient that traditional methods. I'll look around for more details on SVT (Flawe's link looks like a good starting point for that) –  Daemoniorum Jul 22 '10 at 19:52
add comment

You can think of Megatexture as a sort "streaming" texture. One massive, fully detailed texture image (put simply) that is read in as sections of it are needed to be displayed. I'm sure there's a hell of a lot more to it than that though, such as LOD/mipmapping, loading and resource management among the obvious things.

Wikipedia has an article on it.

share|improve this answer
    
I've read the article before, but it's a little light on details. It's a little hard getting actual details on that technique. I wish ID made a paper of it... –  Daemoniorum Jul 22 '10 at 11:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.