Difference between revisions of "Specular Material (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
m (Data Layout)
m
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RW Section|Specular Material|0x0253F2F6}}
+
{{RW Section
 +
| NAME = Specular Material
 +
| VENDORNAME = Rockstar Games
 +
| MODULENAME = Plug-In
 +
| MODULEID = 0253F2
 +
| IDENTIFIER = F6
 +
| VERSION = 3.6.0.3 (or higher)
 +
| PARENTS = [[Material (RW Section)|Material]] ''([[Extension (RW Section)|Extension]])''
 +
}}
  
A '''Specular Material''' is one of Rockstar's [[List of RW section IDs#Rockstar.27s_Custom_Sections|custom sections]]. In [[GTA San Andreas]] it is used to store material information for specular lighting. The typical location in a SA [[model file|dff]] section hierarchy is ''[[Clump (RW Section)|Clump]] > [[Geometry List (RW Section)|Geometry List]] > [[Geometry (RW Section)|Geometry]] > [[Material List (RW Section)|Material List]] > [[Material (RW Section)|Material]] > [[Extension (RW Section)|Extension]] > Specular Material.
+
A '''Specular Material''' is one of Rockstar's [[List of RW section IDs|custom sections]]. In [[GTA San Andreas]] it is used to store material information for specular lighting. The Specular Material section is exclusive to San Andreas and Manhunt. To use a specular material, the rendering pipeline that is responsible for rendering the object must support specular materials. This is true by default for vehicles, but not for buildings. To hook specularity into the rendering pipeline, the [[Pipeline Set (RW Section)|pipeline]] extion for the geometries [[Atomic (RW Section)|atomic]] needs to be changed.
  
 
==Data Layout==
 
==Data Layout==
   4b - FLOAT    - Specular Level
+
 
 +
   4b - FLOAT    - Specular Level (0.0-1.0)
 
  24b - CHAR[24] - Specular Texture Name, see below
 
  24b - CHAR[24] - Specular Texture Name, see below
===Struct unpacked===
 
<source lang="cpp">struct gtaSpecularMaterialPlg
 
{
 
    float      m_fSpecLevel;
 
    RwTexture *m_pSpecMap;
 
};</source>
 
  
==Annotations==
+
On the PC and Xbox versions of the game a specular texture is not used. On the PS2 however, it is used as a second reflection map. The string is null terminated, and aligned to 4 byte boundaries with extra zeros appended.
 +
 
 +
== See also ==
  
; Specular Level : 0.0 is no spec and 1.0 is full spec. Values can go past 1.0, but may produce unrealistic results.
+
* [[User Data PLG (RW Section)|User Data PLG]]
; Specular Texture Name : On the PC and Xbox versions of the game this texture is not used. On the PS2 however, it is used as a second reflection map. The string is null terminated, and aligned to 4 byte boundaries with extra zeros appended.
+
* [[Material Effects PLG (RW Section)|Material Effects]]
 +
* [[Reflection Material (RW Section)|Reflection Material]]
 +
* [[UV Animation PLG (RW Section)|UV Animation PLG]]
 +
* [[Texture (RW Section)|Texture]]
 +
* [[Geometry List (RW Section)|Geometry List]]
  
The Specular Material section is exclusive to San Andreas and Manhunt. In San Andreas, the use is further limited to vehicles; putting a Specular Material extension on a building object will not yield the same results. Its use in Manhunt is unknown.
+
{{N|SA}}

Latest revision as of 12:55, 11 September 2020

Specular Material
RenderWare Stream Section
Vendor Rockstar Games
Module Plug-In
Module ID 0x0253F2
Identifier 0xF6
Chunk ID 0x0253F2F6
Versions 3.6.0.3 (or higher)
Hierarchy
Parents:
Material (Extension)
Children:
None
Extensions:
None
File Format

A Specular Material is one of Rockstar's custom sections. In GTA San Andreas it is used to store material information for specular lighting. The Specular Material section is exclusive to San Andreas and Manhunt. To use a specular material, the rendering pipeline that is responsible for rendering the object must support specular materials. This is true by default for vehicles, but not for buildings. To hook specularity into the rendering pipeline, the pipeline extion for the geometries atomic needs to be changed.

Data Layout

 4b - FLOAT    - Specular Level (0.0-1.0)
24b - CHAR[24] - Specular Texture Name, see below

On the PC and Xbox versions of the game a specular texture is not used. On the PS2 however, it is used as a second reflection map. The string is null terminated, and aligned to 4 byte boundaries with extra zeros appended.

See also