Materials - Parik27/DragonFF GitHub Wiki

Material Properties

Properties

Name Description
Color The color of the material or texture tint
Ambient How much ambient lighting affects the material
Specular The intensity of specular highlights
Diffuse How much dynamic lights affect the material
Texture The diffuse texture of the material
Filtering The filtering type to use on the texture
Adressing The uv adressing modes of the texture

Notes

  • In order for the material color to work, the 'Modulate Material Color' option needs to be enabled
  • Filtering and uv adressing modes from the TXD usually override the ones set in the model
  • The small drop down menu next to the color has quick presets for features such as lights

Material Effects

Bump Mapping

Creates the illusion of a bumpy surface by overlaying a bump map that perturbs lighting.

Properties

Name Description
Texture Grayscale image that defines the bump height
Strenght Multiplies the strenght of the effect
Use Diffuse Alpha Uses the alpha channel of the diffuse texture as a bump map

Notes

  • Does not support compression and mipmaps unless diffuse alpha is used
  • You can not have a bump effect and transparency on the same material
  • For the best efficiency use LUM raster format for the bump texture

Environment Mapping

Simulates reflective surfaces by projecting an environment image onto the material.

Properties

Name Description
Texture An image that will get projected onto the surface
Coefficient The intensity of the reflexion texture
Use Framebuffer Alpha Uses the alpha channel of the diffuse texture as a mask

Notes

  • Using a high coefficient can result in an emissive effect
  • Can be combined with bump maps to get the mask effect without the transparency

Dual Texture

Overlays a second texture over the diffuse texture with custom blending.

Properties

Name Description
Texture Texture to overlay over the diffuse texture
Blending Blending mode for the second texture and framebuffer color

Notes

  • Can use the second uv map of the object in order to be used as a light map

UV Animation

Applies a custom transformation to the uv map of the object that results in an animated texture effect.

Properties

Name Description
Name The name of the animation
Force Dual Pass Forces blending modes when combined with a dual texture

Notes

  • Only supports position and scale transformations

Rocktar Extensions

Specular Material

Adds a fake light reflection on surfaces to simulate a metallic material.

Properties

Name Description
Texture The texture used for the specular highlight
Level The intensity level of the specular highlight

Notes

  • This effect is primarily used on vehicles

Reflection Material

Extends the enviroment map effect with new parameters.

Properties

Name Description
Scale Controls the scale of the enviroment texture
Offset Controls the offset of the enviroment texture
Intensity Forces blending modes when combined with a dual texture

Notes

  • This effect is primarily used on vehicles
  • Requires the enviroment map material effect to be enabled
  • Supports both camera reflections and wave reflections
  • If the texture name starts with an 'x' it use the latter

Compatibility table

Effect Bump Map Enviroment Map Dual Texture UV Animation
Bump Map + - -
Enviroment Map + - -
Dual Texture - - +
UV Animation - - +

Enums

Filtering Modes

Name
Nearest
Linear
Mip Nearest
Mip Linear
Linear Mip Nearest
Linear Mip Linear
Image Nearest, Linear


Addressing Modes

Name
Wrap
Mirror
Clamp
Border
Image Wrap, Mirror, Clamp, Border


Blending Modes

Name R G B A
Zero 0 0 0 0
One 1 1 1 1
Src Color Rs Gs Bs As
Inv Src Color 1-Rs 1-Gs 1-Bs 1-As
Src Alpha As As As As
Inv Src Alpha 1-As 1-As 1-As 1-As
Dst Alpha Ad Ad Ad Ad
Inv Dst Alpha 1-Ad 1-Ad 1-Ad 1-Ad
Dst Color Rd Gd Bd Ad
Inv Dst Color 1-Rd 1-Gd 1-Bd 1-Ad
Src Alpha Sat f f f 1
  • f = min(As, 1-Ad)
Image SRC (B -> T) DST (L -> R)


⚠️ **GitHub.com Fallback** ⚠️