Quantcast

Jump to content

» «
Photo

[TUT|SA] Creating 2dfx for your models

No replies to this topic
_DK
  • _DK

    gta3 cleo

  • Feroci Racing
  • Joined: 12 Apr 2009
  • None

#1

Posted 23 August 2013 - 05:48 PM Edited by _DK, 21 December 2013 - 03:37 PM.

Tools
RwAnalyze
2dfx tool

General information
2dfx is a section of .dff file in GTA:SA. This section allows attaching special things to models. In San Andreas we have 10 types of 2dfx effects. One of them can be added through .ide files only (furnitur 2dfx), so you couldn't put it into dff (it simply won't work).

2dfx section in RwAnalyze
We can find this section (if it exists) in Clump->Geometry List->Geometry->Extension section.
zugf.png
You can export/import this section by clicking RMB and selecting needed command.
juh1.png
After you exported the section, it will have no extension. Add ".2dfx" extension to the name of the file, so we could use it in 2dfx tool.

2dfx tool
This tool is very simple. It generates .txt file from .2dfx, and .2dfx files from .txt ones.
So, if you want to edit original 2dfx section, you need:
  • export original section to file, add ".2dfx" extension to file's name;
  • put .2dfx file to "2dfx" folder;
  • launch SA2dfx.exe tool;
  • open generated .txt file (it will be placed in same, "2dfx" folder) and edit it;
  • put edited .txt file to "txt" folder;
  • launch SA2dfx.exe tool;
  • get generated .2dfx file from "txt" folder and import it into dff with RwAnalyze.
File structure
Text file starts with number of 2dfx effects in the section.

NumEntries       12
After this, effects are described.
Each effect has its own format, but all of them start with this:
2dfxType         LIGHT
Where "LIGHT" is effect type.
Available types are:
LIGHT
PARTICLE
PED
SUNFLARE
ENEX
ROADSIGN
SLOTMACHINEWHEEL
NAVIPOINT
ESCALATOR
After tool will read the effect type, it will select specific format read the information.
LIGHT type
This type is used to create a light. It consists of
  • corona (2d sprite);
  • shadow (projection on a ground);
  • pointlight (dynamic light affects peds & vehicles).
Format of this section:
2dfxType         LIGHT
Position         2.468750 3.131592 4.541241
Color            191 206 132 200
CoronaFarClip    100.000000
PointlightRange  18.000000
CoronaSize       1.000000
ShadowSize       8.000000
CoronaShowMode   DEFAULT
CoronaReflection 0
CoronaFlareType  0
ShadowColorMP    40
ShadowZDistance  0
CoronaTexName    coronastar
ShadowTexName    shad_exp
Flags1           AT_NIGHT
Flags2           -
ViewVector       0 0 100
I think most of parameter don't need additional explanation, we will look into some of them only.
CoronaShowMode
This param is like an additional type of light.
DEFAULT
ALWAYS_AT_WET_WEATHER
TRAFFICLIGHT
TRAINCROSSLIGHT
AT_RAIN_ONLY
These are known modes. But you can also try unknown (put numbers 1,3,4,5,6,9,11,12,13 instead of text value).
Flags1
CORONA_CHECK_OBSTACLES
FOG_TYPE1
FOG_TYPE2
WITHOUT_CORONA
CORONA_ONLY_AT_LONG_DISTANCE
AT_DAY
AT_NIGHT
BLINKING1
Flags2

CORONA_ONLY_FROM_BELOW
BLINKING2
UDPDATE_HEIGHT_ABOVE_GROUND
CHECK_DIRECTION
BLINKING3
Using flags
If you want to use few flags, you need to separate them with "," symbol. If you don't want to use any of available flags, you must fill the field with symbol "-".
For example, this

Flags1   AT_DAY,AT_NIGHT
Will make the light is working during hole day.

PARTICLE
Attaching particle effect.
2dfxType         PARTICLE
Position         0.000000 0.000000 0.000000
Name             simplefx
PED
Attracting peds to model's object.

2dfxType         PED
Position         -0.572941 0.661896 0.030715
Type             SIT_ON_BENCH_DAY_ONLY
Rotation         -0.993852 0.006778 -0.110507  -0.993852 0.006778 -0.110507  0.995570 -0.009073 0.093582
ExternalScript   -
ExistingProb     75
Unknown1         0
Unknown2         0
Available types of attracting:
USE_ATM_DAY_ONLY
SIT_ON_BENCH_DAY_ONLY
STANDSTILL_DAY_ONLY
STANDSTILL_THEN_GO_AWAY
GO_AWAY_BUT_STAY_IF_RAINY
SCRIPTED
STANDSTILL_GO_AWAY_2
LIE_DAY_ONLY_GO_AWAY_AFTER_6PM
SIT_AT_HOUSE
If using type SCRIPTED, "ExternalScript" field must be filled with script name.

SUNFLARE
Simulating sun flare on a model with creating a corona.
2dfxType         SUNFLARE
Position         0.000000 0.000000 0.000000
ROADSIGN

2dfxType         ROADSIGN
Position         1637.679321 -2063.918701 28.069563
Size             5.000000 2.500000
Rotation         48.999981 -90.000008 -90.000015
NumLines         4
SymbolsInLine    16
Color            WHITE
Text1            Bluffs_^_______
Text2            Downtown_^_____
Text3            Mulholland^____
Text4            Vinewood_^_____
Color types

WHITE
BLACK
GREEN
RED
SLOTMACHINEWHEEL

2dfxType         SLOTMACHINEWHEEL
Position         0.074211 0.510475 0.921751
WheelIndex       0
NAVIPOINT

2dfxType         NAVIPOINT
Position         -0.637695 -12.929321 -4.864481
XY               -0.000001 -1.000000
Type             1
ESCALATOR

2dfxType         ESCALATOR
BasePosition     -0.957153 6.627189 -3.237147
BottomPosition   -0.947021 4.526084 -3.237147
TopPosition      -0.980835 -4.370117 3.380810
EndPosition      -0.985107 -6.449219 3.380810
Direction        UP
Direction types

UP
DOWN
  • Masog and Lukis37 like this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users