[KNOWLEDGEBASE] Modding FAQ-and help thread

Recommended Posts

If you're having issues with models or are looking for help on how to achieve certain results, feel free to ask in here.
Note: Please check the Guide section before asking questions in here. 


Frequently Asked Questions on GTA modding

the FAQ is on 3DS Max, though can be applied for various app's

Lighting and Shading

#1 Why can't I change the smoothing of my model?
Your model contains duplicate vertices - this is a typical issue within GTA importers. They tend to break the vertices/split the edges on import, requiring to be welded.
View the spoiler for a potential fix.


Go to upper left corner of viewport > [ + ] > xView > Overlapping vertices. 
Enable vertex selection, click the green text Click here to update > Overlapping vertices: xx Vertices > Select results
Scroll down in modify panel where it says Weld selected, set the threshold to 0,001 and then click weld selected.

Now your mesh can be smoothened, as what you did was merging the duplicate vertices, gluing together the mesh and thus allowing for smoothing groups.

#2 My map model is overexposed in day and night time.
Your model lacks vertex color and illumination respectively. The GTA engine uses vertex color information to define lighting which is baked into the model.
View spoiler for a potential fix.


Navigate to Modify Panel > Surface Properties. Click the Color, on the color GUI set its Value to 100, and 'Illumination' to 40.  Export your model with vertex colors and prelight checked.

#3 Why is my Infernus model so bright?
GTA engine calculates brightness of vehicles based on map objects collision brightness (that it's standing on) and the vehicle surface properties.
View the spoiler for a potential fix.


On material browser, click the Eyedropper icon, then click your chassis (do the same steps for every other component). This will bring up a multimaterial that contains all of the materials stored in that particular component. Find the materials that has a lime green colored icon, these are the primary color materials. Set the Ambient (KAMS) or Surface properties (RW) value 0,45. This will reduce the exposure on your paint.

#4 My striped Bullet has different brightness for primary and secondary colors.
GTA engine uses different lighting techniques for vehicles than map objects. Some of which are specular lighting, which in short brings a fake highlight onto the vehicle surface, illuminating it. 
View spoiler for a potential fix.


Make sure that your primary and secondary vehicle color has equal shader values (ambient, diffuse, specular, reflection). You can modify those by pressing M for material browser, select a polygon with either primary or secondary color, click the Eyedropper icon and drop it on the selected polygon. It will create the material in your material browser. 
Ambient = fake material brightness, Specular = highlight intensity. Depending on which material script you're using, the specular highlight name may differ. For Kam's it's glossiness, for RW it's specularity. Do this step for both primary and secondary.

Another culprit may be that the stripe is a separate element from the primary color's mesh. Simply weld those together and the issues should be nonexistant. This is due to the specular lighting working per vertex, and so if the stripe's vertices are a lot closer to eachother than the bonnet's vertices, there will be different lighting calculations used.



#5 Certain polygons are not visible ingame, but looks fine on 3D editor.
GTA engine among most other game engines uses backface culling, which kills the faces that are not facing/are blocked by ones facing  the camera. This procedure is done to save memory.
View the spoiler for a potential fix.


In most cases, setting doublesided="true" for the map object in question will do the trick. 
Another issue may be that the model has no texture assigned to its material, which corrupts some of the faces. Simply give it a bitmap, an empty white image will do fine. This however only occurs for certain exporters e.g Kam's.

#6 Can I make scissor doors for my vehicle without requiring scripts?
It is possible to modify how vehicle doors appear in their open phase. It involves changing the rotations of dummies and their children objects, the doors.
View the spoiler for a potential method.


These instructions are made by inspecting how a certain scissor mod is done. Anyhow, isolate your front doors and their parent dummies for an easier overview.

You'll have two sets of dummies. door_rf_dummy and door_lf_dummy. Clone the both of them and name d_rf and d_lf respectively.

The newly created dummies needs to be the parent of each the two older dummies and their children objects, the doors. The hierarchy should look like this.

same for the _rf ones.

Now, onto the dummy rotation values.

d_lf rotation values 90, -180, 90
door_lf_dummy rotation values 90, 180, 90
door_lf_ok rotation values 90, 180, 90

d_rf rotation values 90, -180, -90
door_rf_dummy rotation values 90, -180, -90
door_rf_ok rotation values 90, -180, -90

Job's done, scissor doors are ready for delivery!

#7 How does vehicle reflections and chrome work?
GTA vehicles uses 2 UV channels; first for diffuse, second for env and chrome mapping. If the secondary UV channel is not unwrapped properly, the env/chrome will either not work or flashes too often.
View the spoiler for a potential method.


It is all up to personal preference how one unwraps their secondary UV channel mapping. Make sure that the polygons which needs reflections/chrome already has the env/chrome maps in their respective materials. In this example I want ENV mapping for the sides of the model using xvehicleenv128. One of the ways to make a working UV mapping is as following.

Select the polygons in question. On Modifier list select Unwrap UVW


The yellow rectangle going through the model is what projects the texture onto the model. In this case it is incorrectly positioned. To edit this...

Go back to the Modify panel and scroll down until you're at the section that says Edit UVs > click on Open UV Editor. Still on the modify panel, scroll further down and set Map channel as 2 > select Abandon on the GUI. Now you'll see the UV's island changing their form on the UV editor window. Scroll further down on Modify panel, find Projection section. 
Click Planar map > select which dimension is most suitable, in my case it is Y. Uncheck Planar map. Now the UV island has changed its form.


If you leave it as is, the brown part of the env map will repeat on the bottom and top of our model, which is not what we want. We want the top of the model to have the blue visible and center and bottom to have the brown part visible. To do this, select Freeform mode on the UV editor, then hover your mouse over the orange dummy at the corner separating the UV island from the grey canvas. 
Hold LShift and drag it down to somewhat the center. Now you're done, go back to Modify panel, right click the Unwrap UVW modifier and select Collapse to.

Note: Depending on whether you want the ENV map to be stretched (smaller but quicker visual changes, more likely to have flashing issues) you can stretch the UV's horizontally to your likings. 

#8 I can see through my vehicle chassis when looking at the police decals, why is that?
Materials that are responsible for alpha needs to be last in the multimaterial list. If this is not done, textures like police decals will not render parts of the vehicle behind the alpha.
View the spoiler for a potential fix.


Go to Modify panel > Select by Polygon Skrmbillede_5408.png > Select one of the polygons that has alpha. Locate the section Surface properties. You'll notice a number (e.g 13) where it says Material:. Now click Select ID and then every polygon using the same material will be selected.

Click the dropdown bar to see what the last ID is that your model has. Let's say it's ID 20. With that in mind, now that you have selected all of the alpha decals, click the Eyedropper icon from material browser and then on model. This will give you the material used for the alpha. Where it says RW_Mtl or GTA_Mtl, right click it and copy, then click on an empty material slot and right click it, select Paste. This will create a new copy of your material, though it's not an instance, so any edit you make to it will not affect your model's material.

Go back to the Modify panel and at Skrmbillede_5409.png change the ID (in my case 13) to 21, press Enter. Now, with the new material from the material browser and having the alpha material polygons selected, click Assign material to selection on the material browser. Now the model's last material ID is 21 being the alpha decals.

#9 How do I make a vehicle paintable?
GTA SA requires models to have a certain colorcoded material applied to the surface of vehicles that needs to be paintable. It also needs (optionally if using textures) a texture that is not black. As anything that isn't black will be. If parts of the texture is grey, the color ingame will look sort of dirty or old.
View the spoiler for a method.


Import the model of your liking. For this example I am using Cargobob. I am using RW import/exporter. Note that after exporting the model, the omni lights data will be erased. This can be re-added using RWanalyze, but I will not cover this part.

Having imported the model, hide everything that does not have components which needs editing. Head over to #8 on how to use selection by material ID.

I have selected the material that I want to be paintable, but some of the rotors, which should not have the same paintable materials, are also selected. I need to deselect those poly by poly. (See the front part of the side rotors, the dark grey part needs to be deselected)


Now you click the eyedropper icon and drop it onto the vehicle, this will give you the material that is used. On where it says RW_Mtl, right click it, copy, then click an empty material slot and paste it. This makes a new material, which you can give the special paint colorcode (use Kam's material to get the colorcode from Color guide) for it to be paintable. Name this material as Paintable. Add it to the selected polygons. Do that and add Paintable material to every other part that needs to be paintable. 

Now the majority of the vehicle should be dark green. To make the paint better ingame, we'll need to edit the texture.


It clearly needs some adjustments to be better painted ingame. You'll need an image editor at this point.
Adobe Photoshop and Paint.net are great. I will be using Paint.net just for this example.

This selection should be all I need. Copy that, then make a new layer and paste on the new one.


The adjustments that I'd like to make for this selection is:
Desaturate all the way to 0, increase levels and keep the shadows very subtle, as they can negatively contribute to a dirty paint. I want the bottom of the heli to remain black though.

The vehicle is now properly colored.


Using the following texture which you're welcome to use for your own mod if you like.


You can now export the model. Provided you're also using RW script by The Hero, use the following export settings.



Congratulations - you have now created a paintable vehicle. Use the same techniques for vehicles like Patriot and FBI truck! 



#10 I have imported des_sherrifsgn1.dff into 3ds and extracted the textures into a folder, but they aren't displayed.
It is not enough to extract the images, you'll have to tell the program where your textures are stored for it to apply them on the model.
View the spoiler for a potential solution.


After having extracted  your textures into a folder (e.g modelProjects\sheriffsign), you'll have to set the path. Do so by following the steps.

Top menu > Customize > Configure User Paths... > External Files > Add > Select your texture folder.
Having done that, now import your model. Make a test render (Lshift Q) and verify that the materials are correct.
To show them in viewport, follow the steps.

Upper left viewport settings ... [ Standard ] > Materials > Shaded materials with maps > [ Standard ] > High quality > [ Standard ] > Standard.
If you encounter backface culling and weird transparent display issues: 
[ Standard ] > High quality > [ Standard ] > Lighting and Shadows > Uncheck Shadows & Ambient Occlusion > [ Default shading ] > Flat color.

#11 I want to remove Wuzimu's glasses and export it to my game. How do I do this?
You're going to need a GTA formats importer. I prefer Kam's vanilla tools for skins due to its decent support for bones and skinned models.
View the spoiler for a potential method.


Open GTA3.IMG with any IMG editor or TXD workshop. I prefer TXD workshop. Find wuzimu.dff. As you're only here to remove a part of the skin, you don't need the .txd. Extract the .dff file to a new projects folder.

On 3ds max, on the right side, navigate to Utilities panel. There you should see the Kam's GTA Scripts rollout. Click DFF IO. On the dialog that pops up, click on the Import DFF section. As you aren't using textures for this, the image type is irrelevant.
On the same section there's a button with A on it. Click that every time you are importing skins. Now click Import DFF button. Find your projects folder and select the .dff file.

The model is now imported. It is most likely lying on the floor, but don't mind that. Do not rotate or move anything. Now you'll have to follow Q/A #1 on how to weld overlapping vertices. Once you've done that, let's proceed. You'll see on top of the Editable mesh there's a modifier. This is the skin modifier which has information on which vertices are glued to which bone, AKA the character rig. Now click on the editable mesh, and click Select by element Skrmbillede_5411.png

Select the glasses. You'll notice how the entire glasses mesh is selected - gotta love element selection!.. Skrmbillede_5410.png

Simply press delete button on your keyboard or the Delete button under Edit Geometry.

Now, exit selection mode and select the modifier Skin, then go back over to your DFF IO GUI. Collapse the Import DFF as you're done with that step. Now click the rollout Export DFF
With the exact same settings as on this picture, click Bones/Skin Export and save it in your chosen folder. That is it! No rigging required.


PS. You don't need MMC (modulate material color) and probably not UV either (?). It is up to you whether or not to lock the DFF, though by doing this you'll have to find a way to unlock it in order to import it back, in case you forget to make a 3ds max project scene.

#12 What file types are worth to know about?
GTA has many, many file types, and a lot of them are not natively available in MTA unless you modify your server's anti-cheat system to allow locally custom data files etcetera. So if we're going with MTA friendly files, there are a few.
View the spoiler.


DFF = 3D model. It can not store embedded textures unlike on GTA V. It can however store lighting, materials, multiple objects (linked to a dummy) etcetera.
TXD = Texture dictionary. It can only store textures. I'm not certain of the images limit but it might be 50 per file. (?)
COL = Collision archive. In GTA SA, .col files are used for map objects and are assigned to IPL districts e.g LAE, and contains numerous collision models. However, on MTA, we cannot specify which children collision model to load, so .col files are refered to as collision models.These stores physics models to tell the engine how models interact with eachother, e.g a skyscraper would have a tall rectangular primitive shape. Collisions are not very performance friendly and needs optimisation by using primitives primarily. These models has special materials assigned to them for the game to produce particles and brightness for vehicles and peds driving/standing on them. 
IFP = Animation file. These, much like .col files, has the ability to contains multiple different animations, and unlike .col, MTA supports multiple animations per .ifp. 

Although there are many other files like IDE (item definitions, allowing for extra alpha transparency etc) and IPL (most notably allowing for interior (real time) reflections) which are very valuable to have knowledge on, in case MTA adds native support for them in the near future, so I'm not saying that you should forget about those.

#13 Where do I find shared vehicle textures, and what's each their use?
You can locate the .txd for shared textures in GTA SA dir\models\generic\vehicle.txd. It stores textures which are used for SA vehicle lights, lighting and many more textures, which are used across hundreds of vehicles. As these textures are found in your local files, none of them are required to be added to custom vehicle .txd files, making for potentially very low file sizes.
View the spoiler for a full list.


carpback = rear car plate (?)
carplate = front car plate (?)
plateback1 = San Fierro plates
plateback2 = Las Venturas plates
plateback3 = Los Santos plates
platecharset = bitmap using all possible characters for number plates.
vehicledash32 = dashboard/speedometre (?)
vehicleenvmap128 = environment map used primarily for chrome on SA vehicles.
vehiclegeneric256 = miscellaneous texture used for engine blocks, contents below the bonnet, bottom of chassis, glass, various metallic components.
vehiclegrunge256 = dirt texture for vehicles, it is used as body texture for chassis, doors, bonnet, etcetera.
vehiclelights128 = texture used for SA vehicle lights when their lights are off.
vehiclelightson128 = texture used for SA vehicle lights when their lights are on. 
vehiclepoldecals128 = decals for police vehicles, has the PD initials, a logo and POLICE text. Alpha cut-out using DXT3 compression.
vehiclescratch64 = damage texture for doors, bumpers, etcetera.
vehicleshatter128 = cracked glass for windows and windshields.
vehiclespecdot64 = specular lighting image.
vehiclesteering128 = various steering wheels in half, which requires the model to be textured as a half plane, then mirrored.
vehicletyres128 = stores various tire textures.
xvehicleenv128 = much like vehicleenvmap128, though it is used for the vehicle's paint to create a fake sky/environment map reflection onto the vehicle surface.

#14 I have downscaled my model, but in-game it remains the same size as before.
If your model's scale values says something like 76,144, 76,144, 76,144, it will reset to 100, 100, 100 on export. To correct this, go to Utilities panel, click Reset xForm, Reset selected, then right click the modifier and collapse to. Now your model will have its new scale applied.

#15 I have converted a Counterstrike map and turned the main mesh into a collision which is 250kb. I am getting invisible walls, why is that?
GTA has a very low polycount limit in regards to collision models. Not to be confused with collision primitive models, which are spheres or boxes, but the CM itself. If it is above or around 5000 (needs additional sources...) polygons, issues will occur, such as invisible walls or as if there's a large box blocking the entire model off. 
Another culprit for collision issues is the pivot point and position that the collision is exported at. You need to set the collisions to 0, 0, 0 and pivot point needs to resemble that of the main model, otherwise they will not line up properly.

#16 My character movement is bugging on custom modeled stairs.
GTA III, VC and SA do not have support for advanced staircase collisions, and so they require a different approach, which is a planar ramp or slope if you will. This may not look very good when the character steps on the stairs, however it is the most performance and bug-less method around.

**Please feel free to contribute to the FAQ by leaving a comment here or through PM. It will be greatly appreciated.**

little note for colors
#B8E0B6 #4A4A4A

Edited by Tut
added link to guides section
  • Like 6
  • Thanks 4

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.