Skip to main content

MaterialType

Enum MaterialType 

Source
#[repr(u16)]
pub enum MaterialType {
Show 51 variants BowWave = 22, NonRenderable = 26, TextureComboVertexWind = 29, TextureCombo = 30, DecalWaterfall = 31, StandardSimple = 32, CampaignTrees = 34, PointLight = 38, StaticPointLight = 45, DebugGeometry = 46, CustomTerrain = 49, WeightedCloth = 58, Cloth = 60, Collision = 61, CollisionShape = 62, TiledDirtmap = 63, ShipAmbientmap = 64, Weighted = 65, RsTerrain = 66, ProjectedDecal = 67, DefaultMaterial = 68, Grass = 69, WeightedSkin = 70, Decal = 71, DecalDirtmap = 72, Dirtmap = 73, Tree = 74, TreeLeaf = 75, WeightedDecal = 77, WeightedDecalDirtmap = 78, WeightedDirtmap = 79, WeightedSkinDecal = 80, WeightedSkinDecalDirtmap = 81, WeightedSkinDirtmap = 82, Water = 83, Unlit = 84, WeightedUnlit = 85, TerrainBlend = 86, ProjectedDecalV2 = 87, Ignore = 88, TreeBillboardMaterial = 89, RsRiver = 90, WaterDisplaceVolume = 91, Rope = 93, CampaignVegetation = 94, ProjectedDecalV3 = 95, WeightedTextureBlend = 96, ProjectedDecalV4 = 97, GlobalTerrain = 98, DecalOverlay = 99, AlphaBlend = 100,
}
Expand description

Material type identifier determining rendering behavior and data structure.

Each material type corresponds to a specific shader and vertex format combination. The numeric value is stored in the RigidModel file format as a u16.

§Categories

  • 22-46: Effects and special materials (BowWave, PointLight, DebugGeometry)
  • 49-64: Terrain and campaign materials
  • 65-82: Weighted (skeletal) materials and variants
  • 83-100: Water, unlit, terrain blends, projected decals

Variants§

§

BowWave = 22

Boat bow wave effect (water displacement).

§

NonRenderable = 26

Non-rendered material (collision, occlusion, etc.).

§

TextureComboVertexWind = 29

Texture combo with vertex-based wind animation.

§

TextureCombo = 30

Combined texture material.

§

DecalWaterfall = 31

Waterfall decal effect.

§

StandardSimple = 32

Simplified standard material.

§

CampaignTrees = 34

Campaign map tree rendering.

§

PointLight = 38

Dynamic point light source.

§

StaticPointLight = 45

Static baked point light.

§

DebugGeometry = 46

Debug visualization geometry (wireframe, normals, etc.).

§

CustomTerrain = 49

Custom terrain material variant.

§

WeightedCloth = 58

Cloth material with skeletal weights and physics.

§

Cloth = 60

Cloth material with physics simulation.

§

Collision = 61

Collision mesh (invisible, physics only).

§

CollisionShape = 62

Collision shape variant.

§

TiledDirtmap = 63

Tiled dirt texture mapping.

§

ShipAmbientmap = 64

Ship ambient mapping (possibly incorrect identification).

§

Weighted = 65

Generic weighted material (skeletal animation).

§

RsTerrain = 66

Minimal terrain material (Rome 2 style).

§

ProjectedDecal = 67

Projected decal (first version).

§

DefaultMaterial = 68

Default full-featured material (most common).

§

Grass = 69

Grass and vegetation material.

§

WeightedSkin = 70

Weighted skin material (characters with bone weights).

§

Decal = 71

Surface decal material.

§

DecalDirtmap = 72

Decal with dirt mapping.

§

Dirtmap = 73

Dirt map material.

§

Tree = 74

Tree trunk/branch material.

§

TreeLeaf = 75

Tree leaf material (alpha transparency).

§

WeightedDecal = 77

Weighted decal (animated decals on characters).

§

WeightedDecalDirtmap = 78

Weighted decal with dirt mapping.

§

WeightedDirtmap = 79

Weighted dirt mapping.

§

WeightedSkinDecal = 80

Weighted skin with decal overlay.

§

WeightedSkinDecalDirtmap = 81

Weighted skin with decal and dirt mapping.

§

WeightedSkinDirtmap = 82

Weighted skin with dirt mapping.

§

Water = 83

Water surface material.

§

Unlit = 84

Unlit material (no lighting calculations, full bright).

§

WeightedUnlit = 85

Weighted unlit material.

§

TerrainBlend = 86

Terrain texture blending material.

§

ProjectedDecalV2 = 87

Projected decal version 2.

§

Ignore = 88

Ignored/placeholder material.

§

TreeBillboardMaterial = 89

Billboard-style tree material (always faces camera).

§

RsRiver = 90

River rendering material (Rome 2 style).

§

WaterDisplaceVolume = 91

Water displacement volume (physics interaction).

§

Rope = 93

Rope rendering material.

§

CampaignVegetation = 94

Campaign map vegetation.

§

ProjectedDecalV3 = 95

Projected decal version 3.

§

WeightedTextureBlend = 96

Weighted texture blending.

§

ProjectedDecalV4 = 97

Projected decal version 4 (latest).

§

GlobalTerrain = 98

Global terrain material.

§

DecalOverlay = 99

Overlay decal material.

§

AlphaBlend = 100

Alpha-blended material.

Trait Implementations§

Source§

impl Clone for MaterialType

Source§

fn clone(&self) -> MaterialType

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MaterialType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for MaterialType

Source§

fn default() -> MaterialType

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for MaterialType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<MaterialType> for u16

Source§

fn from(value: MaterialType) -> u16

Converts to this type from the input type.
Source§

impl PartialEq for MaterialType

Source§

fn eq(&self, other: &MaterialType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for MaterialType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<u16> for MaterialType

Source§

type Error = RLibError

The type returned in the event of a conversion error.
Source§

fn try_from(value: u16) -> Result<Self>

Performs the conversion.
Source§

impl Copy for MaterialType

Source§

impl StructuralPartialEq for MaterialType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,