L3DT users' community
Large 3D terrain generator

TX/HF ratio

Got a problem or need advice?

TX/HF ratio

Postby carharttguy » Sun Feb 26, 2017 9:21 pm

Hello

I'm stuck with something. Let's say I want to create a terrain for an RPG like game of 256x256 metres. A horizontal scale of 1 metre (which seems ok, as mentioned in a guide on this site).
Now I want a texture for my terrain ofcourse. A TX/HF ratio of 4 is good, as I read in a guide on this site. That gives me a texture of 1024x1024.

But now, what I don't understand, If a character is on the map, looking at it's feet and the surroundings. The camera will see 4 colours per square metre? So that's no detail at all. How do we see things like grass or other smaller things in video games? Are they all using super textures?

Even on the highest TX/HF settings, 32, I would only see 32 distinct pixels per square metre. That's also not very much.

Or is a terrain texture only a base texture, not directly looked at? Other textures applied to it?

I'm lost, I have no idea how to create terrain that looks even a tiny little bit real. Thanks!
carharttguy
Newbie
 
Posts: 1
Joined: Sun Feb 26, 2017 8:33 pm

Re: TX/HF ratio

Postby Aaron » Mon Feb 27, 2017 11:48 am

Hi Carharttguy,

Welcome to the forum, and thanks for your questions.

If you've not seen it yet, some of this may be answered in the 'Rendering grass and highly detailed terrain textures' tutorial.

How do we see things like grass or other smaller things in video games?


In commercial games, grass and other small things are usually done with separate meshes for the grass, not with super-detail on the ground texture. For instance, here is grass overlays in Unreal:

Image

That's the heavyweight solution to getting high ground detail, but there are some other cheaper tricks to improve the look of ground textures...

Or is a terrain texture only a base texture, not directly looked at? Other textures applied to it?


Correct. It's quite common to use some form of detail map, which is a repeating greyscale image that is used to modulate the intensity of the colour map (as shown below, with no detail map at left, and detail map at right). You can use either the same detail map for all land types (I do this in L3DT's 3D renderer, because it's easy), or you can use different detail maps for different materials (this is much better, but requires custom shaders.)

Image

It's also pretty common to use a bump map, which is similar to a detail map, but is used as an input to the runtime shader to modify the surface topography to produce fine-scale lighting variations. This looks much more realistic than simple detail maps, and I'd guess all game engines would do this now.

Even on the highest TX/HF settings, 32, I would only see 32 distinct pixels per square metre.


It's not quite as bad as you think there. With a TX/HF ratio of 32, you will get a matrix of 32x32 texture pixels for each heightfield pixel, i.e. 1024 pixels per square metre. That said, you also get 1024x the amount of texture data, which creates its own headaches. Super-high-resolution pre-calculated textures (so called 'megatextures') are not widely used in game engines because it's hard to efficiently manage that much data, and because modern GPUs are so good at running very complex custom shaders to provide the file-scale detail. The happy medium seems to be around 4x to 8x texture resolution, with higher-resolution detail handled by detail/bump maps and geometry.

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


Return to Help and support

Who is online

Users browsing this forum: No registered users and 13 guests

cron