Check out the model that Talon1024 put together for WolfenDoom
here. It is just a plain cube, but each face is grouped as a separate surface - top, bottom, east, west, north, south. Additionally, the textures on the model were set in whatever editor was used, pointing them to "textures/skyboxes/plainssun/_____.png" (where _____ is the appropriate texture for that side of the skybox).
The MODELDEF entry for this actor is relatively simple:
Code: Select all
Model PlainsSun3D
{
Path "models"
Model 0 "plainssun3D.md3"
Scale 1.0 1.0 1.2
USEACTORPITCH
USEACTORROLL
FrameIndex MDLA A 0 0
}
If we wanted to specify the skin via MODELDEF instead of using the compiled-in texture paths, we'd use the SurfaceSkin property:
Code: Select all
SurfaceSkin model-index surface-index skin-file
To get the surface-index number, we need to know the order of the surfaces within the model file. The easiest way to see this is to import the model into your editor or model viewer and look at the order that the groups are listed in. In the case of the plainssun3d model, surface indexes 0 to 5 correspond to west, south, east, top, bottom, and north, in that order.
Defining the various face's textures in MODELDEF would then look something like this:
Code: Select all
Model PlainsSun3D
{
Path "models"
Model 0 "plainssun3D.md3"
Scale 1.0 1.0 1.2
USEACTORPITCH
USEACTORROLL
Path "textures/skyboxes/plainssun"
SurfaceSkin 0 0 "abra_w.jpg"
SurfaceSkin 0 1 "abra_s.jpg"
SurfaceSkin 0 2 "abra_e.jpg"
SurfaceSkin 0 3 "abra_t.jpg"
SurfaceSkin 0 4 "abra_b.jpg"
SurfaceSkin 0 5 "abra_n.jpg"
FrameIndex MDLA A 0 0
}
This also allows you to use the same model again with different textures without having to bloat your mod and add additional copies of model files.