Difference between revisions of "2d Effect (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
m
Line 1: Line 1:
 +
{{Cleanup-rewrite}}
 +
 
{{RW Section|2dfx|0x0253F2F8}}
 
{{RW Section|2dfx|0x0253F2F8}}
  
Line 11: Line 13:
 
==Entries==
 
==Entries==
  
There is a common 20 byte header for 2dfx entries:
+
There is a common 20 byte header for each 2dfx entry:
  
 
  12 byte - FLOAT[3] - Position Vector (xyz)
 
  12 byte - FLOAT[3] - Position Vector (xyz)
Line 17: Line 19:
 
   4 byte - DWORD    - Data Size
 
   4 byte - DWORD    - Data Size
  
"Entry Type" defines the type of the 2dfx entry, and "Data Size" the number of bytes that follow the first 20, until the next entry starts.
+
'''Entry Type''' defines the type of the 2dfx entry, and '''Data Size''' the number of bytes that follow the first 20, until the next entry starts.
  
 
===Entry Type 0 - Light===
 
===Entry Type 0 - Light===
  
This type defines lights and has a size of 80 bytes.
+
This type defines lights and has a size of 80 bytes.{{ref|1}}
  
 
   4b - BYTE[4]  - RGBX, where X = 200d
 
   4b - BYTE[4]  - RGBX, where X = 200d
Line 34: Line 36:
 
   3b - BYTE[3]  - flare parameters (?)
 
   3b - BYTE[3]  - flare parameters (?)
  
For additional info see [http://www.gtaforums.com/index.php?showtopic=128451&view=findpost&p=3905781 this post].
+
{{Incomplete}}
  
 
===Entry Type 1 - Particle Effects===
 
===Entry Type 1 - Particle Effects===
Line 46: Line 48:
 
===Entry Type 3 - PEDs===
 
===Entry Type 3 - PEDs===
  
The PED-Section consists is 56 bytes. It`s used for spawning PEDs (Like on ticketbooth, Windows of shops, Blackjack-tables,...)
+
The [[PED]]-Section consists is 56 bytes. It`s used for spawning PEDs (Like on ticketbooth, Windows of shops, Blackjack-tables,...)
 
It includes information about the PED Animation, it`s facing angle and it`s behaviour.
 
It includes information about the PED Animation, it`s facing angle and it`s behaviour.
  
Line 60: Line 62:
  
 
For the PED-Animations there are entries like ''PEDSLOT'' or ''TICKET''. If the PED just stand/sit/lay/... there Animation is set to 'none'
 
For the PED-Animations there are entries like ''PEDSLOT'' or ''TICKET''. If the PED just stand/sit/lay/... there Animation is set to 'none'
 +
 +
{{Incomplete}}
  
 
===Entry Type 6 - Unknown===
 
===Entry Type 6 - Unknown===
  
This may crash the game! Its used in ''barrio3b_lae.dff'', which is never used ingame (It is even not defined in one of the [http://www.gtamodding.com/index.php?title=IDE IDE]s.)
+
{{Research}}
 +
<!--- This may crash the game! Its used in ''barrio3b_lae.dff'', which is never used ingame (It is even not defined in one of the [http://www.gtamodding.com/index.php?title=IDE IDE]s.)
 
Maybe it can also be for robbery-missions or related to SCM in another way or maybe its even unused and garbage from the development stage of San Andreas.
 
Maybe it can also be for robbery-missions or related to SCM in another way or maybe its even unused and garbage from the development stage of San Andreas.
  
Line 75: Line 80:
 
   4b - BYTE[4]  - Unknown
 
   4b - BYTE[4]  - Unknown
 
   8b - CHAR[8]  - Unknown (Name of [http://www.gtamodding.com/index.php?title=Item_Placement#ENEX teleporter] ?)
 
   8b - CHAR[8]  - Unknown (Name of [http://www.gtamodding.com/index.php?title=Item_Placement#ENEX teleporter] ?)
   4b - BYTE[4]  - Unknown (RBGA Color of teleporter?)
+
   4b - BYTE[4]  - Unknown (RBGA Color of teleporter?) --->
  
 
===Entry Type 7 - Street Signs===
 
===Entry Type 7 - Street Signs===
Line 100: Line 105:
 
===Entry Type 9===
 
===Entry Type 9===
  
Size is 12 bytes, used quite often and in large ammounts per file. Could be simple lights that use the default corona/shadow textures?
+
Size is 12 bytes, used quite often and in large ammounts per file.  
 +
 
 +
{{Research}}
  
 
===Entry Type 10 - Escalators===
 
===Entry Type 10 - Escalators===
Line 117: Line 124:
 
Legend to the picture:
 
Legend to the picture:
  
Escalator_Standart_Position - Positioninfo from the header<br>
+
* '''Escalator_Standart_Position''' - Positioninfo from the header<br>
Escalator_Bottom - Bottominfo from the section<br>
+
* '''Escalator_Bottom''' - Bottominfo from the section<br>
Escalator_Top - Topinfo from the section<br>
+
* '''Escalator_Top''' - Topinfo from the section<br>
Escalator_End - Endinfo from the section<br><br><br><br><br><br><br><br><br>
+
* '''Escalator_End''' - Endinfo from the section<br><br><br><br><br><br><br><br><br>
 +
 
 +
==External Link==
 +
* {{note|1}} {{GTAF|post|128451|3905781|Encryption of light information}}
 +
 
  
 
==Tools and Scripts==
 
==Tools and Scripts==
* [http://www.gtaforums.com/index.php?showtopic=261624 DexX Tools] by [[User:DexX|DexX]] &ndash; 2dfx export from 3DSMax (MaxScript)
+
* {{GTAF|261624|DexX Tools}} by {{U|DexX}} &ndash; 2dfx export from 3DSMax (MaxScript)
* [http://www.steve-m.com/?page=2&ID=21&act=details RW Analyze] by [[User:steve-m|steve-m]] (no 2dfx support yet, but needed by above script)
+
* {{GTAF|282387|2dfx Editor}} by {{U|Aschratt}} &ndash; 2dfx Editing
* [http://www.gtaforums.com/index.php?showtopic=282387 2dfx Editor] by [[User:Aschratt|Aschratt]] &ndash; 2dfx Editing
+
* [http://www.steve-m.com/?page=2&ID=21&act=details RW Analyze] by {{U|steve-m}} (no 2dfx support yet, but needed by above script)
  
  
 
{{File-stub}}
 
{{File-stub}}
 +
 +
{{SA-navi}}

Revision as of 18:47, 15 April 2009

40px-Ambox rewrite orange.svg.png This article may need to be rewritten.
Please help improve this article. The discussion page may contain suggestions.
{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

2dfx is one of Rockstar's custom sections. In GTA San Andreas it is used to store particle and light effects, which were located in ide files in previous versions. The typical location in a SA dff section hierarchy is Clump > Geometry List > Geometry > Extension > 2dfx.

There can be multiple effects per section, their types are defined by an ID.

Header

A 2dfx section starts with a 4 byte DWORD which is the number of 2dfx entries that follow.

Entries

There is a common 20 byte header for each 2dfx entry:

12 byte - FLOAT[3] - Position Vector (xyz)
 4 byte - DWORD    - Entry Type
 4 byte - DWORD    - Data Size

Entry Type defines the type of the 2dfx entry, and Data Size the number of bytes that follow the first 20, until the next entry starts.

Entry Type 0 - Light

This type defines lights and has a size of 80 bytes.[1]

 4b - BYTE[4]  - RGBX, where X = 200d
 4b - FLOAT    - draw distance
 4b - FLOAT    - outer range
 4b - FLOAT    - size
 4b - FLOAT    - inner range
 5b - BYTE[5]  - parameters
24b - CHAR[24] - corona texture name
24b - CHAR[24] - shadow texture name
 4b - INT32    - flare
 3b - BYTE[3]  - flare parameters (?)

This section is incomplete. You can help by fixing and expanding it.

Entry Type 1 - Particle Effects

This type defines particle effects and has a size of 24 bytes.

24b - CHAR[24] - particle effect name

The particle effect name is an entry in effects.fxp.

Entry Type 3 - PEDs

The PED-Section consists is 56 bytes. It`s used for spawning PEDs (Like on ticketbooth, Windows of shops, Blackjack-tables,...) It includes information about the PED Animation, it`s facing angle and it`s behaviour.

 4b - INT32    - Type (1 - Stitting, 5 - Standing...)
 8b - BYTE[8]? - Unknown
16b - FLOAT[4] - Rotation (XYZW)
12b - BYTE[12]?- PED IDs?
 8b - CHAR[8]  - PED-Animtaion
 4b - INT32    - PED-Existing-Probability 
 4b - INT32    - Unknown (always zero)

The rotations are stored in quarternions (That means like in IPLs).

For the PED-Animations there are entries like PEDSLOT or TICKET. If the PED just stand/sit/lay/... there Animation is set to 'none'

This section is incomplete. You can help by fixing and expanding it.

Entry Type 6 - Unknown

Entry Type 7 - Street Signs

This type defines the texts that appear on street signs and has a size of 88 bytes.

 8b - FLOAT[2] - scale (xy)
12b - FLOAT[3] - rotation (xyz)
 2b - WORD     - possibly unused
64b - CHAR[64] - sign text, 16 byte per line
 2b - ?        - padding

The lines can start with arrows, such as <, ^ and >; also _ is used instead of a whitespace.

Entry Type 8 - Slotmachine-wheels

This is for Slotmachines.

4b - Int32 - Wheelindex

Every wheel in the slotmachine has an index, increments by 1 and starrting with 1. The position of the index is the position of the wheel in the Slotmachine. Maybe it can be controlled using SCM.

Entry Type 9

Size is 12 bytes, used quite often and in large ammounts per file.

Entry Type 10 - Escalators

This type defines escalators and has a size of 40 bytes.

12b - FLOAT[3] - bottom of escalator (xyz)
12b - FLOAT[3] - top of escalator (xyz)
12b - FLOAT[3] - escalator end (Z pos, matches top Z if escalator goes up, bottom Z if it goes down)
 4b - DWORD    - direction 0/1 (down/up)
An Escalator in 3ds Max. The dummies stand for the position-info in the Section/Header.

The normal position info of the header gets the same function of th estart-position in opposite to the end-position. Positions seem to be roundet to *.5 or *.0 by the game, so it doesnt make many sense to create escalators with the value of *.3 or *.7. This got the effect that a Escalator looks like in the picture (Example: vgseesc01.dff). Legend to the picture:

  • Escalator_Standart_Position - Positioninfo from the header
  • Escalator_Bottom - Bottominfo from the section
  • Escalator_Top - Topinfo from the section
  • Escalator_End - Endinfo from the section








External Link


Tools and Scripts