L3DT users' community
Large 3D terrain generator

John Carmack on Megatextures

Any and all chit-chat regarding L3DT.

John Carmack on Megatextures

Postby Aaron » Tue May 02, 2006 3:35 am

Hi All,

I thought this might interest game-developers out there. John Carmack (of id, DOOM, etc fame) discusses the technology behind id's next generation of terrain-texturing, called 'megatexture':

http://www.gamerwithin.com/?view=article&article=1319&cat=2

The brief summary is that texture-splatting has fallen out of favour because of the tiling artefacts, so we should all use massive textures instead (32000x32000 pixels).

Cheers,
Aaron.
Last edited by Aaron on Wed May 03, 2006 1:40 pm, edited 1 time in total.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Kiraya » Tue May 02, 2006 12:09 pm

interesting.
carmack talked about megatexture few years ago, and now seems to be implemented.

i think that megatexture si more better than splatting, but i think that hardware is too limited for now, to implement and use so big textures.
he talked about a paged MegaTexture, and i think i very similar to l3dt mosaic approach.
my only doubt is on how much a "3d world" should take on HD or DVD..
Kiraya
New member
 
Posts: 9
Joined: Tue Nov 22, 2005 4:13 pm

Postby Aaron » Tue May 02, 2006 6:05 pm

Hi Kiraya,

Kiraya wrote:i think that megatexture si more better than splatting, but i think that hardware is too limited for now, to implement and use so big textures.


I certainly agree that you’ll get prettier results with a pre-calculated megatexture; you have lots and lots of off-line time to do really pretty effects, whereas with splatting you've only got 50ms or so between renders. However, I’m not sure the performance penalties are necessarily all that bad on modern hardware, so long as you use a serious texture LOD-manager to keep the on-screen texture size within reason. You'd have to be really careful with that - if you go over the graphics memory limit for a moment the whole show will grind to a halt. Tricky.

Kiraya wrote:he talked about a paged MegaTexture, and i think i very similar to l3dt mosaic approach.


Mmm...that thought had crossed my mind too ;).

I’ve just started generating a megatexture (well, really a gigatexture) to make sure it all still works, and hopefully get some new screenshots. L3DTVi2 doesn’t have texture LOD, though, so I have to keep the view-distance fairly short or my graphics card will explode.

Kiraya wrote:my only doubt is on how much a "3d world" should take on HD or DVD..


That's a good thought. How big can a game be before it's too big? HD-DVD's going to be, what, 45GB? That's a whole lotta map. If one was cynical one might think this was a new strategy to fight piracy. Think about it, who would download a game that large?

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Aaron » Wed May 03, 2006 1:44 pm

Hello again,

There’s some more information on the subject in this interview. The textures are indeed procedurally generated, based on slope &c.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Kiraya » Fri May 05, 2006 12:22 pm

aaron wrote:Hello again,

There’s some more information on the subject in this interview. The textures are indeed procedurally generated, based on slope &c.

Cheers,
Aaron.


the texture is generated with a tool (megagen) that use procedural teq. to build up the world with automatic positioning for vegetation assests (like grass, rocks ,etc).. but how much disk space it take? he talk about 5 GB for the source texture.. i don't know how he render the terrain with this texture because he says "The really amazing thing about the MegaTexture technology is that only around ten megabytes of video memory and twenty megabytes of system memory are used to display it"..
i still not understand this teq very well...
Kiraya
New member
 
Posts: 9
Joined: Tue Nov 22, 2005 4:13 pm

Postby Aaron » Fri May 05, 2006 12:49 pm

Hi Kiraya,

Kiraya wrote:...but how much disk space it take? he talk about 5 GB for the source texture..


Presumably that's uncompressed. id's MegaTextures are 32k x 32k = 1Gpxl = 4Gb (@ 32-bit). They also store multiple low-res versions of the texture, which is where the other 1Gb comes from. Still, I would be kind of surprised if the texture wasn't compressed in some way (JPEG2000, etc). 5Gb for one map is excessive.

Kiraya wrote: i don't know how he render the terrain with this texture because he says "The really amazing thing about the MegaTexture technology is that only around ten megabytes of video memory and twenty megabytes of system memory are used to display it"..


As I understand it, they use level-of-detail optimisation on the texture, where terrain close to the camera is rendered with the full-res texture, and terrain further away is rendered with a lower-res version. I don't know how many of these detail levels are used, but I would be guessing at least three.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Joshua » Sat May 06, 2006 2:07 am

There's a good thread on this topic at gamedev.net floating. My personal quibble is that I haven't seen any megatexture results that have the up-close quality that current splatting methods have provided.

Definately an interesting topic though.
Joshua
Luminary
 
Posts: 59
Joined: Thu May 04, 2006 8:57 am

Postby Kiraya » Mon May 08, 2006 11:26 am

two question..
a 32kx32k at 1 meter resolution how much is in meter?

aaron i rod that you have integrated the freeimage lib in l3dt. i read in the freeimage mailing list that there is a limit on how big can be a texture read/write with the lib . you noticed this?

(sorry for my bad english)
Kiraya
New member
 
Posts: 9
Joined: Tue Nov 22, 2005 4:13 pm

Postby DeathTwister » Mon May 08, 2006 2:10 pm

Side note:

I wonder how much ram it would take to open one of those
MegaTextures 32k x 32k = 1Gpxl = 4Gb (@ 32-bit)
in photo shop??? shesh hahaha....Isn't your texures like mega textures really Aaron? or a smaller version? sorry couldn't resist a coment, very interesting post.

DeathTwister
User avatar
DeathTwister
Dearly missed
 
Posts: 562
Joined: Thu Dec 15, 2005 12:30 pm
Location: Klamath, CA.

Postby monks » Mon May 08, 2006 9:41 pm

woah- I missed this !- runs off to read...

monks
monks
Oracle
 
Posts: 292
Joined: Tue Nov 22, 2005 10:38 pm
Location: Middle Earth

Postby monks » Mon May 08, 2006 10:18 pm

Very cool. I read an article on Gamasutra, ooh some time ago now, detailing a method of using a single massive texture of all of the elements one would need, and then using a procedural algorithm for placement. This sounds similar.

I especially like the implications for a more procedural sound generation. There are people working on the equivalents of grafix shaders but for sound. This sounds like it will be more immeditely useful- I think that tech may be a way off.

Physics is really going to make things very complicated for the sound guys methinks. This could be a big help.

Textures are so important. That's why I wasn't keen on the look of Doom 3 and Far Cry. Plasticcy. Then you have the other approach such as STALKER (was/is?) using: getting together really detailed and varied textures. I prefer the latter. Now it looks like we'll get to have the best of both worlds.
I imagine you have an advantage when using a real world scenario (such as STALKER) because you have real world refs- just go to the site and take pictures or whatever. This really showed up in Half Life imo, where you had really convincing wall textures, etc, but then the aliens stood out as not quite sitting right in the enviroment. Great game though.

monks
monks
Oracle
 
Posts: 292
Joined: Tue Nov 22, 2005 10:38 pm
Location: Middle Earth

Postby Aaron » Tue May 09, 2006 1:45 am

Hello,

Kiraya wrote:a 32kx32k at 1 meter resolution how much is in meter?


Umm...1 pixel per metre. Maybe I misunderstood the question?

On the issue of scaling, has anyone heard what size heightfield they're using with these textures? Since they're brute-force rendering the entire terrain mesh, it's hard to think it could be larger than 2048x2048 (that would be ~4 million triangles!). So, based on that assumption, the texture/heightfield ratio must be at least 16. If they're using a terrain grid-spacing of, say, 1-2m (good for FPS), that buys them 2-4km of map with texture pixels around 6cm in size (2-3in for the old guard). That sounds rather good to me.

Kiraya wrote:aaron i rod that you have integrated the freeimage lib in l3dt. i read in the freeimage mailing list that there is a limit on how big can be a texture read/write with the lib . you noticed this?


Thanks for the heads-up. It's not really an issue here, though, since FreeImage only has to save the mosaic tiles (usually ~512x512). Overall, the limit of 4M x 4M still stands for mosaic textures.

Deathtwister wrote: I wonder how much ram it would take to open one of those


The short answer is 'too much'. The thing is, though, that you should never need to have the whole thing in memory. With id's system, as with L3DT and L3DTVi2, the texture is cached on disk, and only fetched as required.

Monks wrote:I read an article on Gamasutra, ooh some time ago now, detailing a method of using a single massive texture of all of the elements one would need, and then using a procedural algorithm for placement. This sounds similar.


This is slightly different. What you're describing, with procedural placement, sounds more like texture-splatting. With MegaTextures, all the placement has been sorted-out beforehand, so the texture is in-fact just one enormous image to be draped over the terrain. However, because the texture is too large to use in toto, a level-of-detail algorithm is used to switch the high-res texture for a low-res texture when bits of the terrain are too far away for you to notice the difference.

Monks wrote: Textures are so important. That's why I wasn't keen on the look of Doom 3 and Far Cry. Plasticcy.


Both of those titles used texture-splatting. One of the limitations with that approach is that you are severely limited in the number of textures you can apply, so things tend to look a little generic. Highly detailed, mind you, but generic.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby monks » Tue May 09, 2006 9:46 am

Ah, so that's texture splatting- it sounded very cool. Are you using this technique at the moment ?

Yes, genericism. I suppose it's to be expected at first. As the technique improves, more possibilty of variation can be introduced. New procedures = rookie programmer/artist ?

monks
monks
Oracle
 
Posts: 292
Joined: Tue Nov 22, 2005 10:38 pm
Location: Middle Earth

Postby Aaron » Fri May 12, 2006 8:18 am

Hi Monks,

monks wrote:Ah, so that's texture splatting- it sounded very cool. Are you using this technique at the moment ?


Nope. I try to avoid 3D-graphics programming as much as possible at the moment. L3DT supports splatting by generating the alpha maps, however, so users are welcome to try.

monks wrote:Yes, genericism. I suppose it's to be expected at first. As the technique improves, more possibilty of variation can be introduced. New procedures = rookie programmer/artist ?


I'd say the artists and programmers involved are probably quite brilliant, and the technique itself is mature, but the current hardware is just too limited. For texture-splatting, you've got to have all your textures in the GPU memory, and you've got to do all the blending, over the entire visible terrain, in a hundredth or a second (or thereabouts). In contrast, when you're pre-calculating the textures (such as in L3DT) you've got full access to system memory and storage, and no real time restrictions. This means you can afford to do effects that would take too long for splatting, and you can use many more ground textures than you could with splatting.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Postby Aaron » Fri May 12, 2006 8:25 am

Hi DeathTwister,

DeathTwister wrote:Isn't your texures like mega textures really Aaron? or a smaller version?


It's actually a larger version! id's limit is 32k x 32k (1 billion pixels), whereas L3DT's limit is 2M x 2M (4 trillion pixels). Then again, 32k x 32k is still going to look really, really good, and at ~5Gb, you probably wouldn't want to go any larger right now.

Cheers,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Next

Return to General discussion

Who is online

Users browsing this forum: No registered users and 25 guests