Night Vertex ColorsThis tutorial consists of 2 parts:
a) Import NVC (Night Vertex Colors) into 3Ds Max
b) Using NVC in GTAIV
Introduction.As some of you may know, SA, and I think GTAIII and VC as well, have a day and night system. It’s static lighting made within 3Ds Max, Day Vertex and Night Vertex. As of today DFF Import tools only import day vertex and cannot import night vertex. However, there is a way to replace the day vertex by night vertex, so the DFF Import thinks he imports day vertex but it is actually night vertex.
Programs you will need:3Ds Max that supports
DFF IORW AnalyzeA Hex editor like
XVI32When you got all programs up and running you can start modding. First you will need a DFF file that you want to import in 3Ds Max with NVC.
For this tutorial I will use VgsN_nitree_r01.dff. It's a palm tree in Las Venturas which has a yellow\orange light effect on the tree itself.
Analyzing DFFOpen your DFF file with RW Analyze, you see a bunch of green and blue dots, look for 'Struct' under 'Geometry'. At the right side you say a bunch of data, 3 things are important: GeometryTextured, GeometryNormals and GeometryModulate. Take note which are YES and which are NO. In my case only GeometryTextured is YES (there are actually 2 GeometryTextured, only the first one matters).
Also note the value from [Flags], in my case '/' which stands for 0x2F.
Exporting NVC dataWe are still in RW Analyze, scroll down the list. Somewhere at the bottom you see Extension (blue dot), underneath it you see Bin Mesh PLG, followed by UNKNOWN and another UNKOWN. Now, the last UNKNOWN is the NVC data. Make sure a Hex editor is applied in the options. Now double click on this UNKNOWN, so it will be opened in a Hex Editor.

Remove the first 4 bytes and keep the rest. Now save this file and call it NVC data or something.
Resaving DFF file without Vertex ColorsImport the DFF file with DFF IO in 3Ds Max. Now rollout Export DFF, make sure your object is selected, SA is selected (green) and 'Skip COL'.
Now you see 4 buttons: MMC - UV - Nor - VCol.
Now remember the YES and NO from RW Analyze
MMS = GeometryModulate
UV = GeometryTextured
Nor = GeometryNormals
VCol must NOT be selected no matter RW analyze sais yes or no.
So my palm tree only has GeometryTextures selected YES so I only click on UV, the rest is grey.
Now export DFF.
Importing NVC into resaved DFF fileOpen your new resaved DFF file with RW Analyze
Again go to 'Struct' underneath 'Geometry' and open it in a Hex Editor.
Change the the first byte to '/' (in my case at least) ('26' becomes '2F')
Click with your mouse on the 17th block (resize the window so that 8 blocks are on one line, then the first block in the 3rd row is the 17th)
Now go to File > Insert and open the file you just saved with the NVC data.
Save this file
Go back to RW Analyze, and again to 'Struct', right mouse button and select 'Import Section Data...' and open the file you just saved with Hex Editor.
Save this file to a new DFF file.
NVC in 3Ds MaxAgain open DFF IO and import your new DFF file.
Go to modifier list and scroll down to VertexPaint, and click on Vertex color display - unshaded
Result:
This post has been edited by Blaster_nl on Wednesday, May 18 2011, 20:23