GTA1 to GTA2 car converter and Delta generator

Anything to do with GTA1/GTA2 modding (tools, scripts and more).
Post Reply
User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

GTA1 to GTA2 car converter and Delta generator

Post by elypter »

These scripts allow you to convert gta1 to gta2 car deltas and to recompose gta2 deltas.

to be able to do this i have to know what car in a delta is for what purpose.
for gta2 this page describes what the 20 delta cars are for http://en.wikigta.org/wiki/Creating_veh ... %29#Deltas
gta1 seems to have 12 delta cars. if there is no doc i could probably figure it out.
but there is also 1 or more cars that have 16 delta cars (one example in attachment). has anybody an idea what they are good for?
Edit: there are also cars with 18 cars per delta


no idea if it is possible to use palettes with imagemagick. i asked in their forums. but until now you can do it by hand in gimp. Fortunately you can use palettes of all remaps for that with the pal export function of the new sty tool version now.

How to use:
-for all scripts you need to have a portable imagemagic in subfolder "im"
-to compose you need cdelta00 -cdelta19 in the folder. if one is missing it is replaced by a mirror version if it is a dent and otherwise with "gta2car.bmp". make a copy of the single car image to with that name if one or more deltas are missing. then run compose_gta2.bat.
-to decompose gta2 deltas drop the Delta file on decomp_gta2.bat file
-to decompose gta1 deltas count the cars in the Delta file and drop it on the right .bat
-to remove edit files execute clean.bat
-to convert gta1 to gta2 cars decompose, then run arrange_gta1_gta2.bat and then run compose_gta2.bat
-To create pseudo deltas for a car that doesn't have deltas name the car file gta2car.bmp and run compose_gta2.bat
-DeltaSet_gta2out.bmp is the final Delta
-gta2car is generated out of the gta1 delta when you convert from gta1 to gta2.
-it outputs rgb bmps.
to make it gta2 compatible do this:
-Open gimp, open image, image>mode>indexed, choose optimal palette, acknowledge and save
-you have to apply the palette also to the single car image
to make it remapable do this (works also for single color cars in gta2):
-First export a palette that matches your car the most (car pals are from 168-202) with the NEW sty tool. use gimp to apply an external palette: open image, display palettes dialog, right click on any palette, choose import palette, choose palette file, select the palette you have exported, acknowledge, image>mode>indexed, choose own palette, select the one you imported, deactivate "remove unused colors", acknowledge and save.
-If it is already indexed make it rgb and then indexed again.
-If the remapable area are contains colors that are in all palettes this can cause problems.
-If it doesn't look very well export any default car from gta2, remap it in gimp with the pal, adjust the colors of car you want to import by comparing, then apply palette.
-If it still doesn't look good enough you have to edit by hand. if it only looks bad when it is remapped then you could try to apply only the differing color part of the palette to the painted parts of the car. use gimp to separate the image and use a text editor/or palette editor in gimp to separate the colors of the palette. then recombine and apply whole palette. (<- i never did this, don't know if this is required for any car at all. I put it here just in case)

If you are searching for gta1 cars go there: over 5000 cars only for gta1
http://earth.solardns.com/~gouranga/azz ... sort=score

Which delta is which?
GTA2: http://en.wikigta.org/wiki/Creating_veh ... %29#Deltas
GTA1: GTA1 delta files can have 12 16 or 18 delta cars. the meaning doesn't depend on that. left/right is from car perspective.

delta1 Default car

delta2 Dent front right
delta3 Dent back left
delta4 Dent left side (not in gta2)

delta5 Dent front left
delta6 Dent back right
delta7 Dent right side (not in gta2)

delta8 Front Door (almost closed)
delta9 Front Door (slightly open)
delta10 Front Door (almost open)
delta11 Front Door (open)

delta12 cracked window (not in gta2)

delta13 Back Door (almost closed)
delta14 Back Door (slightly open)
delta15 Back Door (almost open)
delta16 Back Door (open)

delta17 Emergency light right
delta18 Emergency light left
Attachments
image_magic.zip
(1.66 KiB) Downloaded 357 times
DeltaSet_gta2out.jpg
DeltaSet_gta2out.jpg (25.9 KiB) Viewed 12232 times
Last edited by elypter on 04 Feb 2011, 16:09, edited 15 times in total.
yur sa'nok ngeyä

User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Delta generator

Post by Cuban-Pete »

nice idea/script, but here it does not really work... :)
Attachments
not_good.png
not_good.png (21.58 KiB) Viewed 12249 times
"Mmmm, your eyes are so beautiful."

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Delta generator

Post by elypter »

yeah, that wont work. gta2 has 20 cars in the delta file. gta1 has 12. this one has 16. i have no idea why this is different.
yur sa'nok ngeyä

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA1 to GTA2 car converter and Delta generator

Post by elypter »

Everything seems to work now. only palettes have to be applied by hand. thats probably not possible with imagemagick.

If you really need a gta2 to gta1 converter i could do that too.
yur sa'nok ngeyä

User avatar
JernejL
Hitman
Hitman
Posts: 110
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: GTA1 to GTA2 car converter and Delta generator

Post by JernejL »

Some gta1 cars have different amout of deltas - this applies to cars with "rear door", and some cars like gta1 monster also have different deltas scheme.

Ordinary cars are like.. 2*10 deltas, some have more deltas per-row.

EDIT: have you ever considering using various imagemagick filters to generate car damage distortion deltas? this would be SUPER USEFUL.

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA1 to GTA2 car converter and Delta generator

Post by elypter »

yeah i figured out that deltas have different sizes depending on car. 12 16 or 18. i made a batch file for each of them. the one of the monster truck is new to me, thanks for the info. i hope this is the only exception. the deltas from the monster truck tires cannot be used in gta2 anyway but if you want to decompose that special deltas you can tweak the batch a bit and arrange the deltas for gta2 on your own. you just have to turn 9x2 into 7x2 somewhere. Are there other cars that don't use 12 16 or 18 deltas?

distortion generation would be cool. i'm new to imagemagick so it's probably not easy. if is is possible to create decent results with i.m. i take definitely this in consideration. i played around with gimp a bit but failed so maybe i have more luck with i.m.
yur sa'nok ngeyä

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA1 to GTA2 car converter and Delta generator

Post by elypter »

i tried Shepards distortion http://www.imagemagick.org/Usage/distorts/ but this bends the whole car and if i restricted it to an area it would cut off the edges. besides that there is the problem that many cars have much black space on the side (for doors for example) but others dont. If you have an idea how to get around this i coul try to continue.
yur sa'nok ngeyä

User avatar
JernejL
Hitman
Hitman
Posts: 110
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: GTA1 to GTA2 car converter and Delta generator

Post by JernejL »

perhaps a region of car shephard-distorted and overlaid again over same region onto clean copy of the car might work?

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA1 to GTA2 car converter and Delta generator

Post by elypter »

the problem is that if the edge to the unchanged part is bend only slightly you will get a cut, either a straight if you overlay an unchanged part or the curved form if you don't. the other problem is, that it doesn't even look good. if there is a combination of filters that give good results i could try to find a solution.
yur sa'nok ngeyä

User avatar
JernejL
Hitman
Hitman
Posts: 110
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: GTA1 to GTA2 car converter and Delta generator

Post by JernejL »

The solution might be probably something along a distorted-lense effect to generate dents in the matter same way as displacement maps work.

http://en.wikipedia.org/wiki/Displacement_mapping

User avatar
elypter
Immortal
Posts: 1121
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: GTA1 to GTA2 car converter and Delta generator

Post by elypter »

i thought of that in combination with wreck images and layer effects. but that's quite complicated. i don't know yet when or if i will finish it.
yur sa'nok ngeyä

Post Reply