🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Terrain generation, megatextures

Started by
5 comments, last by JoeJ 1 year, 6 months ago

I found Instant Terra online, and it looks pretty cool! I think it uses megatextures. What is the basic idea behind megatextures? I’m aborting the RPG project, and starting a shmup!

Advertisement

The basic idea behind megatextures is to create a single, seamless texture that can be applied to a large area or environment in a video game, rather than using multiple smaller textures. This allows for more detailed and realistic graphics, as well as more efficient rendering and processing.

Megatextures are typically created by scanning and combining real-world textures, such as rocks, grass, and other natural materials, into a single, high-resolution texture map. This map can then be applied to a game environment, and can be updated and modified as needed.

The use of megatextures can greatly improve the visual quality of a game, as well as make the game world more believable and immersive. It can also help to reduce the amount of memory and processing power required to render the environment, allowing for more complex and detailed graphics.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

Thanks for all of this information.

I'm wondering how it all works underneath the hood, so to speak. Like, the GL_MAX_TEXTURE_SIZE on my system is a measly 16384. How does one get around this limitation?

One way to get around the GL_MAX_TEXTURE_SIZE limitation of 16384 on your system is to use texture atlases, also known as texture packing. This involves combining multiple smaller textures into a single, larger texture, which can then be applied to your models and environments.

Texture atlases can help to reduce the number of draw calls and texture switches, which can improve the performance of your application. They can also allow you to use larger, more detailed textures without exceeding the maximum texture size limit.

To create and use texture atlases, you can use a texture packing tool, such as TexturePacker or ShoeBox. These tools allow you to combine multiple textures into a single atlas, and generate the necessary data and coordinates for using the atlas in your application.

🙂🙂🙂🙂🙂<←The tone posse, ready for action.

There is a HW feature for this - ‘tiled resources’, to achieve ‘virtualized texture mapping’.

It counts as one texture i'm sure. Have a huge texture, but it's divided into tiles. On CPU you can decide which tiles have actual data (resident). The other tiles have no data. So you need to know which tiles are visible and upload the data.
HW cares about proper texture filtering across the tiles.

When Rage came out, this was not ready. So they implemented this in software using an indirection table.

Random blog post find: http://diaryofagraphicsprogrammer.blogspot.com/2013/07/tiled-resources-partially-resident.html

taby said:
I’m aborting the RPG project, and starting a shmup!

Yay, a ‘proper action game’, i'm excited : )

Instead trying to fake natural terrain with tiling textures, which won't look good because in a top down view the tiling really becomes noticeable quickly, that's now the point where you really want to look into terrain generation tools.
Shmup means distance to terrain remains still pretty constant, so you don't need close up stuff where tiling is used just to get some detail (even if it looks bad).

For small resolutions, the tools are often free. At least Gaea is. But ofc. you need more than just 1024^2.

So if you want to do this yourself, repeating the link to erosion sim.: https://github.com/LanLou123/Webgl-Erosion

Extending this to multi frequency simulation, it gives very high quality and that's how professional tools work afaict.

This topic is closed to new replies.

Advertisement