User:SirYodaJedi/Porting IdTech 3 maps to Source/Shader2VMT: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Per material: some texture flags that are for some reason not stage flags)
m (→‎Per texture stage: apparently you can flat out use an FMV as a texture)
Line 21: Line 21:
Use DXT1 or DXT5 texture compression when creating the applicable VTFs, even if you are making most of the VTFs uncompressed (BGR565, BGR888, or BGRA8888)
Use DXT1 or DXT5 texture compression when creating the applicable VTFs, even if you are making most of the VTFs uncompressed (BGR565, BGR888, or BGRA8888)


== Per texture ==
== Per texture stage ==
; map
; map
This is the texture. It may be any sort of texture, not necessarily just a [[diffuse]] texture.
This is the texture. It may be any sort of texture, not necessarily just a [[diffuse]] texture.
; clampmap
; clampMap
Like `map`, but clamps the UV coordinates to prevent usage as a tiled texture. Set these in the [[VTF]].
Like `map`, but clamps the UV coordinates to prevent usage as a tiled texture. Set these in the [[VTF]].
; animmap
; animMap
Like `map`, but animated; up to 8 frames in vanilla Quake III. The number before the texture list indicates the frame rate. Combine these into a single VTF and use a [[material proxy]] to set the animation.
Like `map`, but animated; up to 8 frames in vanilla Quake III. The number before the texture list indicates the frame rate. Combine these into a single VTF and use a [[material proxy]] to set the animation.
; videoMap
Like `animMap`, but uses a ROQ video file instead of defining a set of individual image files. This allows for much longer animations, but lacks an alpha channel.
Use {{code|ffmpeg -i input.roq out%03d.png}} to extract all the frames from the ROQ, and {{code|ffprobe input.roq}} to determine the original framerate.


; blendFunc
; blendFunc
Can blend textures together (detail textures, glowing textures, etc.), be used for translucency, or even do specular lighting, depending upon parameters.
Can blend textures together (detail textures, glowing textures, etc.), be used for translucency, or even do specular lighting, depending upon parameters and stage position.


; alphaFunc
; alphaFunc

Revision as of 19:53, 8 June 2024

Some miscellanea for the User:SirYodaJedi/Porting IdTech 3 maps to Source#Converting materials section that would bloat the page if put there.

Per material

qer_editorImage

This is roughly equivalent to %tooltexture, although it differs slightly in that it can also be used in the 3D view for alignment purposes.

cull none
cull disable

$nocull

deformVertexes autoSprite

$spriteorientation VP_PARALLEL

deformVertexes autoSprite2

$spriteorientation VP_PARALLEL_ORIENTED

noMipMaps

Set the "no mipmaps" flag in the applicable VTFs

noPicMip

Set the "No LoD" flag in the applicable VTFs

noTC (in JK2, JA)
noCompress (in WolfET)

Don't use DXTn texture compression when creating the applicable VTFs

allowcompress (in WolfET)

Use DXT1 or DXT5 texture compression when creating the applicable VTFs, even if you are making most of the VTFs uncompressed (BGR565, BGR888, or BGRA8888)

Per texture stage

map

This is the texture. It may be any sort of texture, not necessarily just a diffuse texture.

clampMap

Like `map`, but clamps the UV coordinates to prevent usage as a tiled texture. Set these in the VTF.

animMap

Like `map`, but animated; up to 8 frames in vanilla Quake III. The number before the texture list indicates the frame rate. Combine these into a single VTF and use a material proxy to set the animation.

videoMap

Like `animMap`, but uses a ROQ video file instead of defining a set of individual image files. This allows for much longer animations, but lacks an alpha channel. Use ffmpeg -i input.roq out%03d.png to extract all the frames from the ROQ, and ffprobe input.roq to determine the original framerate.

blendFunc

Can blend textures together (detail textures, glowing textures, etc.), be used for translucency, or even do specular lighting, depending upon parameters and stage position.

alphaFunc

Alphatesting. Unlike Source, Quake III supports alpha-clipping translucent textures. Any textures with translucency will need to not have alpha-testing when ported to Source, and may need to be edited (to sharpen the alpha channel). It takes one parameter:

Parameter Description VMT equivalent and additional setup
GT0 Greater Than 0.

Usually used in conjunction with a translucent blendFunc, to avoid rendering the surface where completely transparent.

If not translucent (rare):
LT128 Less Than 128.

This designates an inverted alpha channel.

If not translucent:

First invert the alpha channel in an image editor (linear invert).

GE128 Greater than or Equal to 128.

Standard alpha testing; anything less than 127 will be transparent, and anything greater than or equal to 128 will be opaque.

If not translucent:
GE192 Greater than or Equal to 192.

Added in Jedi Academy. Like GE128, but with the clipping threshold set to 192

If not translucent: