1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Converting from GTA to Racer

Discussion in 'Racer Cars' started by Splashonda, Feb 15, 2010.

Thread Status:
Not open for further replies.
  1. [removed]
     
    • Like Like x 1
  2. KS95

    KS95
    RACER Moderator

    Well I haven't read much of it but I have to say; Brilliant work. This will be very useful for people who don't know/need a tutorial. Well done. :)
     
  3. Of course, you have to have a registered copy of Zmodeler2 to be able to progress any further than step 2, because the unregistered version does not import files. Registration costs $60.
     
  4. Yes, which is kind of an insane asking price I think lol
     
  5. I forgot to mention that you can import GTA III and VC cars with zmod 1.07. In fact, I recomend to import them with 1.07, because with zmod2 you sometimes get a buggy model (objects out of place and so on)! =)
     
  6. Is it possible to make this a sticky under tutorials perchance? Nice for reference.
     
  7. Hi. I don't claim to know squat about converting, but I can help a bit with the shaders.

    You don't want to put emission anywhere except where it's needed for anything which is meant to light up, such as headlamps etc. Normal car shaders shouldn't have emission, I know people put it in in the old days but you don't want it there now. It's been a while since I did old shaders, but your body shader looks fine, just remove those bits:

    Code:
    [FONT=Tahoma]shader_body[/FONT]
     [FONT=Tahoma]{[/FONT]
     [FONT=Tahoma]layer0[/FONT]
     [FONT=Tahoma]{[/FONT]
     [FONT=Tahoma]map=gradient.tga[/FONT]
     [FONT=Tahoma]texgen_s=sphere_map[/FONT]
     [FONT=Tahoma]texgen_t=sphere_map[/FONT]
     [FONT=Tahoma]}[/FONT]
     [FONT=Tahoma]layer1[/FONT]
     [FONT=Tahoma]{[/FONT]
     [FONT=Tahoma]map=$trackenvmap[/FONT]
     [FONT=Tahoma]texgen_s=reflection_map[/FONT]
     [FONT=Tahoma]texgen_t=reflection_map[/FONT]
     [FONT=Tahoma]texgen_r=reflection_map[/FONT]
     [FONT=Tahoma]blendfunc=filter[/FONT]
     [FONT=Tahoma]}[/FONT]
     [FONT=Tahoma]layer2[/FONT]
     [FONT=Tahoma]{[/FONT]
     [FONT=Tahoma]map=body.tga[/FONT]
     [FONT=Tahoma]blendfunc=dst_alpha src_alpha
    ;specular=0.5 0.5 0.5
    ;shininess=24
    [/FONT] [FONT=Tahoma];ambient=0.2 0.2 0.2
    ;diffuse=0.8 0.8 0.8
    }[/FONT]
     [FONT=Tahoma]}[/FONT]


    That's your body shader, it you want to change the look of it you can alter the blendfunc on layer 2 (look on racer.nl for that). I commented out specular, you only really need specular for metallic paint - solid colours don't need it IMO..but it's up to you if you add it in or not. You can either leave the specular white or tune it to your body colour (something like 0.8 0.2 0.3 for a metallic red perhaps). If you have specular you also want to uncomment the 'shininess=' line, that controls how far spread the specular is across your surface (just leave it at 24, there use to be some weird bugs with it higher/lower). You also might not want mipmap=0 in there, it really depends on the body texture..again all that matters is how it looks.

    Ambient and diffuse, those really depend on the Racer version you're running, later on you might need them if you get dark patches on everything but I left them commented because AFAIK Racer 065 doesn't use them, so you can put what you like there and it won't change the look of that material, but in later versions ambient and diffuse both set to 0 will give you black materials. The specular/ambient/diffuse settings hold true for any car/track shader, really it's up to you how you want that part to look.

    Your glass shader can be similar to the body shader (the one you posted doesn't have any env map layer so won't reflect), this is Boomer's glass shader I think so credit goes to him:

    Code:
    shader_glass
    {
      sort_offset=1
      layer0
      {
       map=glass.tga
       blendfunc=src_alpha one_minus_src_alpha
       mipmap=0
       depthwrite=0
      }
      layer1 
      {
        depthwrite=0
        texenv=replace
        map=fresnel2.tga
        texgen_s=sphere_map
        texgen_t=sphere_map
        blendfunc=one dst_alpha
      }
      layer2
      {
       map=$trackenvmap
       texgen_s=reflection_map
       texgen_t=reflection_map
       texgen_r=reflection_map
       blendfunc=src_color one_minus_src_color
       depthwrite=0
       shininess=55
       specular=0.55 0.55 0.55 1
      }
    }
    Again, the specular is up to you, I'd probably leave it out but that's how the shader was set up when it came to me. You probably don't need the sort_offset but it won't hurt to leave it in.


    Your interior shader is fine, except again for the ambient/diffuse/specular which you might want to add, for almost any matte material you should only need a basic shader like that.

    Here's what I would use for most matte stuff:

    Code:
    shader_trim
    {
    layer0
    {
    map=trim.tga
    specular=0.1 0.1 0.1
    shininess=24
    ;ambient=0.2 0.2 0.2
    ;diffuse=0.8 0.8 0.8
    }
    }
    Again, I've commented out ambient/diffuse because you won't need them in 065 but might in other versions. I put some slight specular on most things to give them a slight sheen where they catch the sunlight, but be careful of specular if your mesh is messy or low poly, it'll look bad with too much specular.

    One more thing, your body/glass texture will really want an alpha channel for those shaders, usually just loading the texture into Gimp and giving it a grey alpha channel will be fine to start with.

    Hope this helps :)
     
  8. I admit that my knowledge about shaders is very low, so I have to thank you for your help here Tiberius! :D My plan was to create a tutorial for Racer newbies, so I simplyfied pretty much everything, shaders included.

    If anyone has more sujestions, please say! ;)
     
  9. This is the Glass shader that I now use with cg's for non cg use just delete the ~vf_reflect:

    shader_glass~vf_reflect
    {
    sort_offset=3
    compression=0
    shininess=5 ;80 ; adjust size of specular highlight
    specular=0.5 0.5 0.5 ; color of specular
    reflect=0.7 ;amount of reflectivity
    tangents=1 ; was in Lambo?
    layer0
    {
    map=glass.tga
    alphafunc=greater 254 ;# must be greater than alpha # to make glass transparent
    blendfunc=blend
    depthwrite=0 ; might need = 1 if objects with alpha bleed thru glass
    shininess=0
    }
    layer1
    {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    blendfunc=src_color one_minus_src_color
    depthwrite=0
    shininess=0
    }
    layer2
    {
    map=glass.tga
    alphafunc=notequal 80 ;notequal 80 for color, 143 (alpha value) for no color, must use alphafunc
    blendfunc=src_alpha one_minus_src_alpha
    ambient=0 0 0.05 1 ; minus values give deeper color - sequence rgb
    depthwrite=0
    shininess=0
    }
    }
     
  10. Hey, maybe you can write about lights when you have some free time, because I still doesn't understand how to make them :/
     
  11. Sorry for double post, I gave up on the challenger and started a new car. Only problem is is that my textures in Zmodeler are all misplaced? How do you fix this?
     
  12. Nuginu,
    Just use a glass image (glass.tga) from a car in your cars folder, they are all the same format. then use my glass shader in your car.shd file and they should be ok.
     
  13. Hi, I got a car from GTA inside to try to convert to racer, but my only problem is that the textures are always misplaced all over the place. Ever had guages on your hood?
     
  14. RWanalyze used to fk up the textures sometimes.
     
  15. I recomend to insert the textures manually, and not select the automatic on the "import" menu.

    Also, you have to see if the texture is the correct for that material. Put the material that you selected in a bright colour, see what it is, give it the correct texture, and put it white again! ;)

    rwanalyse is only needed if the model is locked.
     
  16. KS95

    KS95
    RACER Moderator

    That's what I do Splashonda. Plus it looks quite funky with bright colours :p
     
  17. Eheh, I once edited a Challenger with hippie motives, but then I put it straigh again ^^ Hippie is for the Volks Camper, not for a mean, HEMI powered Muscle Car :p
     
Thread Status:
Not open for further replies.