[Gtkradiant] Support for other games

Forest Hale lordhavoc at ghdigital.com
Mon Jan 28 23:19:56 CST 2008

sebarnolds [Seb / Frip] wrote:
> Hi again.
> I know it's been a while since your answer to my original post. I didn't
> had a lot of time to investiguate everything but now, I really started
> working on the .map compiler. However I don't understand Q3 maps texture
> coordinates.

They're the same as Q1 and Q2 map.

> The Worldcraft map stored textures coordinates as
> "[ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1" which means [U-axis (rotation) U-shift
> (translation)] [same for V] rotation (useless as already included in the
> axis) U-scale V-scale

That's HalfLife's texture vector format, not used by any id map compilers.

> Now, with GtkRadiant configured for Quake3, they are stored as
> "0 0 0 0.5 0.5 0 0 0" which means... I don't know.

offset[0] offset[1] angle scale[0] scale[1] contents flags value

Contents is a set of additional bit flags that can be set in the editor, chiefly used for the DETAIL flag (134217728) which indicates that a brush should not be encoded into the BSP tree, but only
linked into it for rendering/collision purposes.

flags...  I don't know what that is for.

value...  I also don't know what that is for, in Quake2 there was something similar controlling how much light is emitted from a surface (radiosity lighting) which was called value, but I do not know
if q3map or q3map2 use this.

> In fact, I looked at your code (hmap2) and I understood the following :
> it is no bpface (brush primitie) and no Half-Life texture definition.
> So, it seems you take two values to be stored in vecs[0][3] and
> vecs[1][3]... I would say these are U and V-shift (translation).


> They
> you take the rotation angle and two inverted scales (as you use scale[0]
> = 1.0 / scale[0] later on them).

The easy part. :)

> Then, you use the "fake proper texture
> vectors from QuakeEd style" part of the code I guess and you calculate
> some vectors and I don't really understand what vectors these are.
> Are they the U-axis and V-axis I had with my Worldcraft map ? What exactly
> are the different cases "X primary", "Y primary" and "Z primary" ? Are
> they only there to define which axis the rotation must be done on to ?

The only difference between HL .map format and Q1/Q2/Q3 vectors is whether they're stored explicitly (HL .map format), or looked up from a table of 3 axial projections.

In both cases you have rotation angle and scales in addition to that, I don't really know if the rotation angle is used on HL .map format.

The vectors in HL .map may be rotated and otherwise manipulated in the editor, but have a similar purpose to the table lookup.

To be honest I find *all* the formats confusing, because the HL .map format is redundant (angles and scale[] could easily go away with the explicit texture vectors), and the others are just a pain to
manipulate and compile.

The bpface format is possibly the most painful of the bunch, because it stores a 2x3 matrix to apply to the vectors it produces directly from the normal (they are perpendicular to it in that case, not
looked up from a table).

Author of DarkPlaces Quake1 engine and mod
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass

More information about the Gtkradiant mailing list