NetRadiant - Additional map compiler features - Alientrap Development

Поиск:

# NetRadiant

История

# Additional map compiler features¶

The following features for use by mappers have been added in NetRadiant and thus are not documented elsewhere:

## Floodlighting¶

A very quick and dirty way to light a map is adding the following key to `worldspawn`:

    "_floodlight" "240 240 255 1024 128 1"

The parameters work as follow: the first three numbers select the color of the lighting. The fourth number sets a distance to trace, and the fifth number sets the intensity of the floodlight.

This lighting is somewhat similar to `-dirty`, combined with use of the `ambient` key in `worldspawn`.

This feature was contributed by the Urban Terror team.

## Lightmap exposure¶

The q3map2 light compile parameter `-exposure` changes the handling of overbright pixels to look more realistic. Try values like `-exposure 200`! The higher the value, the darker the result gets.

It is most interesting if you intentionally put colored lights of a far too high light value in your map.

This feature was contributed by the Urban Terror team.

## dotProductScale¶

dotProduct | dotProduct2 | dotProductScale | dotProduct2scale

The following shader parameters are added for use with terrain blending:

    q3map_alphagen dotProduct2scale ( X Y Z MIN MAX )

As with `dotProduct2`, `X Y Z` denote the normal on the plane to use for dotProduct terrain blending. The values `MIN` and `MAX` specify a range of squared cosine values, so that `MIN` is mapped to alpha value 0, `MAX` is mapped to alpha value 1, and everything in between is mapped linearily.

If you prefer working with angles, you can set `MIN` to the squared cosine of the most steep angle of the blending, and `MAX` to the squared cosine of the most flat angle of the blending. Example:

    q3map_alphagen dotProduct2scale ( 0 0 1 0.250 0.933 )

will set alpha value 0 for anything steeper than 60 degrees, and alpha value 1 for anything more flat than 15 degrees.

The same extension to `dotProduct` is called `dotProductScale`. Note that the `MIN` and `MAX` values are not squared there. You get a different curve with the same min/max angles by writing:

    q3map_alphagen dotProductScale ( 0 0 1 0.500 0.966 )

## Minimum sample size¶

The compiler option `-minsamplesize` in the BSP stage enforces a given minimum
sample size, even if shaders or `func_groups` set a lightmap scale. This allows
higher quality compiles of existing maps that use these features without having
to create extraordinarily large amounts of lightmaps, especially when using
external lightmaps.

## Converting to ASE prefabs¶

Use `-convert -format ase -shadersasbitmap` for this purpose. That way, the
created ASE files work as prefabs, and thus contain shader names, instead of
texture file names. In a model editor, however, these ASE files will not show
up with textures, as modelling software does not support Q3 shaders.

## Zero-effort cel shading¶

If you already have a cel shader (in Nexuiz, cel/black_ink), you can compile
the map using it easily by adding the option `-celshader cel/black_ink` to the
BSP stage.

## MiniMap generator¶

This version of the map compiler can generate minimaps as used by Nexuiz.
The specs of the minimap's texture mapping are:

- Let M be the rectangle of the world's mins/maxs coordinates.
- If `keepaspect` is set: let S be the smallest square completely covering M whose center matches the one of M. Otherwise, let S be M.
- Let S' be S scaled by factor `1/(1-2*border)` around the center of S.
- The "mins" corner of S' corresponds to the top left corner of the image.
- The "maxs" corner of S' corresponds to the bottom right corner of the image.

floodlight.jpg (7 КБ) divVerent, Вт, 05 мая 2009, 13:26:00 -0400

exposure.jpg (27.8 КБ) divVerent, Вт, 05 мая 2009, 13:26:31 -0400

dotproduct-small.jpg (25.9 КБ) divVerent, Вт, 05 мая 2009, 13:29:00 -0400

dotproduct2-small.jpg (24.2 КБ) divVerent, Вт, 05 мая 2009, 13:29:36 -0400

dotproductscale-small.jpg (23.3 КБ) divVerent, Вт, 05 мая 2009, 13:29:54 -0400

dotproduct2scale-small.jpg (22.8 КБ) divVerent, Вт, 05 мая 2009, 13:30:08 -0400

minimap.jpg (6.4 КБ) divVerent, Вт, 05 мая 2009, 13:30:30 -0400

Экспортировать в HTML TXT

Загрузка...