NVIDIAGameWorks / NVIDIAGameWorks/rtx-remix
GTA III / VC / SA vehicle color and alpha values for materials
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.7k
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
All vehicles in GTA San Andreas (as so GTA III and GTA Vice City) have body painted on white instead of using correct car colors from carcols.dat.
I'm going to talk more specifically about GTA San Andreas, but the trilogy work essentially the same or similar.
I have 12 years experience modding GTA SA and I know the inner workings of it. This information that may not be directly related, but may help in case of problems: Just before rendering a car, the game changes the properties of its materials, to apply the body colors, remapping (car paintjobs, changes one texture to other), colors and ambient lighting for light textures etc. Therefore, all vehicles of the same model use the same materials, as well as the same mesh, but the materials are adjusted just before rendering each one.
There is also a second uvmap for a second texture (env map, called "xvehicleenv128" or "vehicleenvmap128" from "vehicle.txd") which is rendered over the top of the body, window and some other parts to simulate chrome reflections. But this, in my view, has nothing to do with the problem at the moment, as the same bug is seen even in parts without this env map, but it's interesting to keep this in mind for future debugging, btw it's also a good way to detect where the car's body painting is to apply the correct shaders, not always the colors of the car is used for bodywork.
Not only the car's body painting, but also materials painted by the game, are also white (example, the original Dodo plane has transparent black faces to simulate fake shadows, but with RTX Remix, the faces are opaque white).
Related to this, vehicle windows do not have opacity. They're still black because the game uses the 1 pixel mapping of the "vehiclegeneric256" texture, but the alpha value is in the material, so it's not transparent.
Another detail is that the game itself or mods can also use painting materials on other models, such as map objects and weapons. This issue is not necessarily about vehicles, but essentially, the issue is only noticeable on them.
- Version 0.2.0
- RTX 3060
- Known bug/limitation in all versions of the game. I use 1.0 US retail version with Essentials Pack (built by me).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the vehicle material property changes immediately before rendering, using carcols.dat and vehicle.txd as the relevant asset references. Compare body paint, painted materials, and window alpha behavior across GTA San Andreas, GTA III, and Vice City. Done means vehicle colors render correctly and material alpha produces transparent windows and Dodo shadow faces.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100