Help on terrain resolution for a texture map

General talk about the map making process.
Post Reply
User avatar
yarro
Private First Class
Private First Class
Posts: 84
Joined: Sat Oct 23, 2004 3:51 pm
Location: NH, USA

Help on terrain resolution for a texture map

Post by yarro »

I want to make a realistic ground with roadways and am trying to figure the image resolution to map to the map terrain.
Say I have a standard size map, what would fit the ground and would have detail enough to see passing lines on a road, for instance?

As part of the thought experiment if I now wanted to make a map twice the standard size what are the resolution requirements then, the same or twice as much?

Thanks for any help or insight you have.

YRR000
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Help on terrain resolution for a texture map

Post by JeffM »

The standard ground texture is repeated. So replacing it won't give you a single big "map" on the ground. If you wanted roads and stuff, you'd not want to do it as a single large texture map.

Bzflag has a maximum texture limit that you'll run into real fast.

You'll want to break your ground textures into chunks and use meshes to place them on top of the ground, covering the default grass. Then you can use as many textures as you want to cover as large of an area as you want. If you do it smart, you can reuse texture parts for things like roads that look the same in different parts of the map
ImageJeffM
User avatar
yarro
Private First Class
Private First Class
Posts: 84
Joined: Sat Oct 23, 2004 3:51 pm
Location: NH, USA

Re: Help on terrain resolution for a texture map

Post by yarro »

OK JeffM,
Do you know what the maximum resolution of one BZW unit might be?
In a formula like pixel per unit.
Or are you aware of relevant documentation where I can get answers to this that is a standard reference?
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: Help on terrain resolution for a texture map

Post by JeffM »

pixels and units are not related. for meshes the UV texture coordinates determine how many times the texture repeats for a specific distance. For parametric objects, a texture is repeated anywhere between 1 and 4 times per unit.

The default max texture size should be 8192x8192(8k) for a modern OS/Card, but depending on your setup it may be less. BZFlag starts out at 1024x1024 and then asks your video card what it's maximum is.
ImageJeffM
User avatar
blast
General
General
Posts: 4931
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Help on terrain resolution for a texture map

Post by blast »

It actually looks like BZFlag limits to 1024.

Code: Select all

  // get maximum valid size for texture (boost to 2^m x 2^n)
  GLint maxTextureSize;
  glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize);

  // hard limit, some drivers have problems with sizes greater
  // then this (espeically if you are using glTexSubImage2D)
  const GLint dbMaxTexSize = BZDB.evalInt("maxTextureSize"); // (This defaults to 1024)
  GLint bzMaxTexSize = 1;
  // align the max size to a power of two  (wasteful)
  while (bzMaxTexSize < dbMaxTexSize) {
    bzMaxTexSize <<= 1;
  }

  if ((maxTextureSize < 0) || (maxTextureSize > bzMaxTexSize)) {
    maxTextureSize = bzMaxTexSize;
  }
"In addition to knowing the secrets of the Universe, I can assure you that I am also quite potty trained." -Koenma (Yu Yu Hakusho)

Image
User avatar
yarro
Private First Class
Private First Class
Posts: 84
Joined: Sat Oct 23, 2004 3:51 pm
Location: NH, USA

Re: Help on terrain resolution for a texture map

Post by yarro »

I'm not only doing repeating textures, if that matters.
I'm hand painting roadways and then mapping onto road section objects.
So perhaps a pavement texture but a vectored traffic legal line.
Post Reply