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

From GTAMods Wiki
Jump to navigation Jump to search
 
m
 
(15 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{RW Section|Specular Material|0x0253F2FC}}
+
{{RW Section
 +
| NAME = Reflection Material
 +
| VENDORNAME = Rockstar Games
 +
| MODULENAME = Plug-In
 +
| MODULEID = 0253F2
 +
| IDENTIFIER = FC
 +
| VERSION = 3.6.0.3 (and higher)
 +
| PARENTS = [[Material (RW Section)|Material]] ''([[Extension (RW Section)|Extension]])''
 +
}}
  
A '''SA Reflection Material''' is one of Rockstar's [[List of RW section IDs#Rockstar.27s_Custom_Sections|custom sections]]. In [[:Category:GTA SA|GTA San Andreas]] it is used to override vehicle reflection maps. 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 > Material > Extension > 0x0253F2FC.
+
A '''Reflection 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 override vehicle reflection maps. The Reflection Material is exclusive to San Andreas. To use a reflective material, the rendering pipeline that is responsible for rendering the object must support reflective materials. This is true by default for vehicles, but not for buildings. To hook reflection into the rendering pipeline, the [[Pipeline Set (RW Section)|pipeline]] extension for the geometries [[Atomic (RW Section)|atomic]] needs to be changed.
  
The layout of a Specular Material Extension is as follows:
+
==Data Layout==
===Reflectivity===
 
float - reflection image amount: red channel
 
float - reflection image amount: green channel
 
float - reflection image amount: blue channel
 
float - reflection image amount: alpha channel
 
float - reflection intensity
 
dword - always 00
 
  
==Explanations==
+
4b - FLOAT    - Environment Map Scale X
  reflection image amount rgba channels - controls how much of this channel of the image shows up. For example, setting the green and blue channels to zero, while leaving the red channel at full, will result in only the red portions of the reflection image showing up on this material. Alpha is untested.
+
4b - FLOAT    - Environment Map Scale Y
  reflection intensity - how much of the image will be reflected back - 0 for none, to 1.0 for full.
+
4b - FLOAT    - Environment Map Offset X
 +
4b - FLOAT    - Environment Map Offset Y
 +
  4b - FLOAT    - Reflection Intensity (Shininess, 0.0-1.0)
 +
  4b - DWORD    - Environment Texture Ptr, always 0 (zero)
  
===Notes===
+
== See also ==
This SA Reflection Material is exclusive to San Andreas. The use is limited to vehicles; putting this Material extension on a building object will not yield the same results.
 
  
{{File-stub}}
+
* [[Material (RW Section)|Material]]
 +
* [[User Data PLG (RW Section)|User Data PLG]]
 +
* [[Material Effects PLG (RW Section)|Material Effects]]
 +
* [[Specular Material (RW Section)|Specular Material]]
 +
* [[UV Animation PLG (RW Section)|UV Animation PLG]]
 +
* [[Texture (RW Section)|Texture]]
 +
* [[Geometry List (RW Section)|Geometry List]]
 +
 
 +
{{N|SA}}

Latest revision as of 13:01, 11 September 2020

Reflection Material
RenderWare Stream Section
Vendor Rockstar Games
Module Plug-In
Module ID 0x0253F2
Identifier 0xFC
Chunk ID 0x0253F2FC
Versions 3.6.0.3 (and higher)
Hierarchy
Parents:
Material (Extension)
Children:
None
Extensions:
None
File Format

A Reflection Material is one of Rockstar's custom sections. In GTA San Andreas it is used to override vehicle reflection maps. The Reflection Material is exclusive to San Andreas. To use a reflective material, the rendering pipeline that is responsible for rendering the object must support reflective materials. This is true by default for vehicles, but not for buildings. To hook reflection into the rendering pipeline, the pipeline extension for the geometries atomic needs to be changed.

Data Layout

4b - FLOAT    - Environment Map Scale X
4b - FLOAT    - Environment Map Scale Y
4b - FLOAT    - Environment Map Offset X
4b - FLOAT    - Environment Map Offset Y
4b - FLOAT    - Reflection Intensity (Shininess, 0.0-1.0)
4b - DWORD    - Environment Texture Ptr, always 0 (zero)

See also