Jump to content
  • Advertisement
Sign in to follow this  
Norman Barrows

ground quad and ground texture sizes

This topic is 521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently using ground quads that are 10 d3d units across, at a scale of 1 d3d unit = 1 foot.  I'm using 256x256 ground textures.   I'm tring to get the size of the image on the texture at the correct scale, so it looks the correct size in the game.  In essence, my grass is too big.  I've made a texture that looks good - correct size and such. but its 1024x1024.  Using it that way lookspretty good, but scaling it down to a 256x256 texture makes it blurry in the game.

 

What sizes are typical for ground quad and its ground texture?   in the past i've experimented with large textures.  as i recall 2048x2048 worked, and 4096x4096 didn't. But that may have been a limitation of the old GPU. 

 

Are my ground quads bigger than usual? is everyone using 512x512 ground textures at a minimum these days?

 

This is the old issue of  "a five foot texture, and a ten foot rock".  IE your mesh is bigger than the texture image, and trying to get it to look good.  The only answers i've found in the past are get a bigger texture,or a smaller rock, or both, or live with the blurriness - once you've done what you can with MIP level bias.

 

should i knock it down to some thing more like 1 meter per quad (2.5 feet would make the numbers work out nicely).

 

or should i continue to try to find photos at a large enough scale such that 10 feet of grass in the photo is 256 pixels?  aerial photos are too big a scale, about 50 pix or less per 10 feet.  grass textures tend to be too small, more like 10,000 pix per 10 feet.   i got something decent looking by creating a 1024x1024 from a pretty large scale 800x500 photo, and a lot of clone stamp! <g>.

 

I've tried tiling the textures using DX, but Moire' patterns are an issue.  a typical grass texturre at 256x256 needs 4x or 5x texture scaling to be the correct size. so my texture image is essentially 2 feet wide, while the quad is 10 feet wide.

Edited by Norman Barrows

Share this post


Link to post
Share on other sites
Advertisement

What about detail mapping, cover the large terrain with one texture, then add a repeating detail map after that.  The larger texture should prevent any patterns, while the detail map mostly improved the detail closer up so that things aren't as blurry.  Rastertek has a good series of terrain articles, including one specifically about detail mapping.  

Share this post


Link to post
Share on other sites

xy...yx is right, there is way to improve texel density farther than pure texture size, procedural texturing, detail maps. Even if you were able to get a texture the size you like at let say 1080p, once you switch to 4K, you would need an extra mip map to account for the increase of pixels anyway, it is an endless problem with technology evolution. Plain texture mapping can't keep up on quality.

Share this post


Link to post
Share on other sites

To be honest, even 512x512 is considered pretty tiny for a ground texture these days.

It depends how much of the ground you cover with it, if it is one meter square ground, it is a texel for 2mm, not bad :) Maybe for a tiny standing VR game :)

Share this post


Link to post
Share on other sites

1024x1024 over a 10 foot wide (~3 meter) quad looks ok.

 

i cut  the quad size to 5, and ran out of memory half way through loading textures.

 

the game loads meshes (including creating buffers for ground meshes), then textures, then rigid body models, then rigid body animations, then skinned meshes with animations, then audio (some thing like that).  only meshes, textures, and skinned meshes go in vidram.

 

smaller quads means more quads per terrain chunk ground mesh. thus a bigger vb. i cut the terrain cache size from 90 back down to 30. tried quad size = 2. looks good scale wise with a 256x256. pretty bad moire' patterns though. a quad is only lthe size of a large floor tile.

 

so it looks like memory is becoming an issue.

 

It also looks like bigger textures will use less vidram than high poly meshes. 8 floats per vert vs 4 bytes per pix.    and i need a ground mesh for each terrain chunk. but i only need 1 or a tile set of 4 textures for all the chunks of a given terrain type.

 

The game in question is an open world type thing like skyrim.  but its 2500 mile across, not just 4 miles.  and it changes every day.

 

Rastertek has a good series of terrain articles, including one specifically about detail mapping.  

 

Thanks for the suggestion. i'll check into it.

Share this post


Link to post
Share on other sites

...ran out of memory half way through loading textures

 

4 bytes per pix

 

It sounds like you really want to be using DXT compressed textures. DXT1 is 4 bits per pixel (i.e. 8 times smaller than RGBA). You do lose a bit of image quality, but it usually not significant. If you need an alpha channel, then you want DXT5 instead of DXT1, which doubles the size to 1 byte per pixel.

 

Note that they don't only save space on disc, they also stay compressed in video memory. Because of that rendering with them can also be quicker than uncompressed textures.

Share this post


Link to post
Share on other sites
You do lose a bit of image quality

 

that's a deal breaker right there.     the whole game is lossless data formats for all audio and video assets.    nothing less than the best will do.  or at least high fidelity....  <g>

 

 

 

Because of that rendering with them can also be quicker than uncompressed textures.

 

so far speed hasn't been an issue. except when sending wind vectors on a per instance basis each frame when rendering 1 million plant meshes. i came up with an algo based on a single Vwind vector passed to the shader. works ok, stll gets 62 FPS.

 

i checked into detail texturing, and started to implement it. Got as far as making chunks use shaders to draw the ground meshes. just had to add the detail texture bit.  then it occurred to me that most of my ground textures have a fair amount of detail in them (grass blades and rocks and leaves and sticks and such). to make the images match the detail texture, the image texture would have to be high detail as well.   I'm not just trying to add detail to a green-brown smear like the Rastertek tutorial.   i have high detail textures already.  but on many of them, the image size is too big  (1 foot long grass blades), and a bit blurry.  

 

i tested texture sizes from 256 to 2048 on 10 foot quads.  1024 was sharp enough.  i ran the numbers on memory usage for bigger textures vs smaller quads (more verts per gound mesh). its about a wash with the vertex size i'm using. textures might be a little better. and smaller quads means worse Moire' patterns.  So i decided that detail texturing wasn't the answer, and that high rez textures would yield superior results, since both the image colors and detail patterns are high rez in a high rez texture, while only the detail is high rez in detail texturing.

 

I just finished creating new 1024x1024 ground textures for the game.  looks effing awesome.  

 

but i'm getting some noticeable Moire' patterns in terrain where large amounts of the ground mesh are visible, such as sandy deserts and open scrub land.

 

before, my solution was a set of 4 ground texture tiles, and each quad was pre-assigned one texture at random. this cut down on Moire' patterns a lot.  

 

But i'm wondering if there's another way, such as blending the same texture twice at different scales and offsets.

 

That will probably be the next question i post.

Edited by Norman Barrows

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!