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: 69
Joined: Sat Oct 23, 2004 3:51 pm
Location: NH, USA

Help on terrain resolution for a texture map

Post by yarro » Sat Apr 08, 2017 12:49 pm

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: 5107
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Re: Help on terrain resolution for a texture map

Post by JeffM » Sat Apr 08, 2017 7:06 pm

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

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

Re: Help on terrain resolution for a texture map

Post by yarro » Mon May 15, 2017 9:31 pm

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: 5107
Joined: Fri Dec 13, 2002 4:11 am
Location: [Redacted]
Contact:

Re: Help on terrain resolution for a texture map

Post by JeffM » Mon May 15, 2017 11:32 pm

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.

User avatar
blast
General
General
Posts: 4576
Joined: Fri Mar 21, 2003 3:49 pm
Location: playing.cxx
Contact:

Re: Help on terrain resolution for a texture map

Post by blast » Tue May 16, 2017 12:14 am

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: 69
Joined: Sat Oct 23, 2004 3:51 pm
Location: NH, USA

Re: Help on terrain resolution for a texture map

Post by yarro » Tue May 16, 2017 12:18 am

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

Who is online

Users browsing this forum: No registered users and 1 guest