|
本帖最后由 永恆之火 于 2014-10-17 21:33 编辑
在國外論壇找到這個工具,似乎可以讓武器使用法線貼圖(normal map)
似乎是要用RW Analyze修改DFF,研究了好久還是無解
人物似乎也可以用
原文討論串
readme內容:
MatFX tool 1.0
Author: DK22Pac
Assembly
MatFX section file has an extension .mfx.
In the folder with MatFxTool.exe there are two folders - mfx and txt.
Txt folder used to build .mfx files from .txt files.
Mfx folder is used to retrieve .txt files from .mfx files.
For example, we have a file m4.txt, which describe the parameters necessary for our section.
Put this file in the folder txt, run exe, and we obtain (in the same folder) .mfx file,
which must be imported into dff.
Txt-file format
The first parameter in file is a version of DFF (version of RenderWare).
The number has HEX-format with leading 0x.
0x00000304 - GTA III PS2
0x00000310 - GTA III PS2, GTA III PC
0x0800FFFF - GTA III PC
0x0C02FFFF - GTA VC PC
0x1003FFFF - GTA III XBOX, GTA VC XBOX
0x1005FFFF - GTA VC Android
0x1400FFFF - GTA III Android
0x1803FFFF - GTA SA, Manhunt
It is followed with the type of effect.
Supported types of effects:
BUMPMAP - height map
ENVMAP - reflection map
BUMPENVMAP - bump map + reflection map
DUAL - double texturing
And then - the data section.
Example file format: BUMPMAP
DffVersion: 0x1803FFFF
MatFxType BUMPMAP
### parameters ###
BumpMapBumpiness 5.0
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
Texture 0
BumpMapTex 1 4 1 1 0 subplt_bump -
BumpMapBumpiness - intensity of the effect
Texture - the texture parameters to substitute the main texture
BumpMapTex - texture parameters for height map
Example file format: ENVMAP
DffVersion: 0x1803FFFF
MatFxType ENVMAP
### parameters ###
EnvMapCoefficient 0.500
FrameBufferAlpha 0
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
EnvMap 1 6 1 1 1 vehicle_generic_chromeprts -
EnvMapCoefficient - intensity of the reflections
FrameBufferAlpha - if you use a bump, and this option is enabled, the reflection map will take bump
distortion into account
Next come the texture parameters for reflection map.
Example file format: BUMPENVMAP
DffVersion: 0x1803FFFF
MatFxType BUMPENVMAP
### parameters ###
BumpMapBumpiness 5.000
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
Texture 0
BumpMapTex 1 6 1 1 0 m4_bump -
### Env Map
EnvMapCoefficient 0.500
FrameBufferAlpha 0
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
EnvMap 1 6 1 1 0 m4_chrome -
This file combines two effects parameters.
Example file format: DUAL
DffVersion: 0x1803FFFF
MatFxType DUAL
### parameters ###
SrcBlendMode 2
DstBlendMode 2
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
DualTex 1 6 1 1 0 dualtex -
SrcBlendMode - source pixel blending parameter
DstBlendMode - destination pixel blending parameter
DualTex - blending texture
Blend parameters:
0 rwBLENDNABLEND
1 rwBLENDZERO (0, 0, 0, 0 )
2 rwBLENDONE (1, 1, 1, 1 )
3 rwBLENDSRCCOLOR (Rs, Gs, Bs, As )
4 rwBLENDINVSRCCOLOR (1-Rs, 1-Gs, 1-Bs, 1-As)
5 rwBLENDSRCALPHA (As, As, As, As )
6 rwBLENDINVSRCALPHA (1-As, 1-As, 1-As, 1-As)
7 rwBLENDDESTALPHA (Ad, Ad, Ad, Ad )
8 rwBLENDINVDESTALPHA (1-Ad, 1-Ad, 1-Ad, 1-Ad)
9 rwBLENDDESTCOLOR (Rd, Gd, Bd, Ad )
10 rwBLENDINVDESTCOLOR (1-Rd, 1-Gd, 1-Bd, 1-Ad)
11 rwBLENDSRCALPHASAT (f, f, f, 1 ) f = min (As, 1-Ad)
Parameters of textures
Texture parameters are described in a single line, for example:
### Enable Filtering U-addressing V-addressing HasMipMaps Name Alpha
EnvMap 1 6 1 1 0 m4_chrome -
Enable - enables/disables texture. When texture is disabled, its not necessary
to describe other parameters.
Filtering - texture filtering
U-addressing, V-addressing - texture addressing
HasMipMaps - presence of texture mipmapping
Name - name of the texture
Alpha - the name of the texture alpha mask
Types of texture filtering:
0 rwFILTERNAFILTERMODE
1 rwFILTERNEAREST
2 rwFILTERLINEAR
3 rwFILTERMIPNEAREST
4 rwFILTERMIPLINEAR
5 rwFILTERLINEARMIPNEAREST
6 rwFILTERLINEARMIPLINEAR
Types of texture addressing:
0 rwTEXTUREADDRESSNATEXTUREADDRESS
1 rwTEXTUREADDRESSWRAP
2 rwTEXTUREADDRESSMIRROR
3 rwTEXTUREADDRESSCLAMP
4 rwTEXTUREADDRESSBORDER
This file may contain comments. To insert a comment put a '#' or ';' character (without quotes)
at the line beginning.
Importing section
MatFX section should be located in a section of the material Extension. ID of this section - 0x120
Material
<Material data>
Extension
MatFX
Atomic geometry which uses this material must also have MatFX section
in extensions. However, here we are talking about a different format section
(use file MatFXAtomic.mfx) or take this section from dff which
uses MatFX effects (vehicles for example).
Atomic
<Atomic data>
Extension
MatFX (MatFXAtomic.mfx)
Restrictions
Bump texture effect
-They can not use compressed raster
-They can not use a transparent bitmap
-They can not use mipmapping
In GTA SA MatFX effects don't work on vehicle models.
Assembling textures
Use OpenIV and WTD2TXD for assembly and final txd (for bump textures - use format X8R8G8B8, without mip-mapping).
That's all. If you happen to collect the working section -
congratulations, you have a new level of hard modders!
Long live the notepad-modding!
百度云附件:MatFXTool (3,VC,SA).rar
|
|