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.

Lights in Racer

Discussion in 'Racer' started by Splashonda, Jan 14, 2010.

  1. Hello everyone!

    I have a doubt about how to make realistic lights in Racer. I'm currently using the flares option and it looks a bit unrealistic.

    Can somebody teach me how to make some realistic lights, like the ones that most of the released cars have? :)

    Thanks in advance! :D
     
  2. It's just a textured mask that goes over the headlamp, with an emissive shader - if the model is unlocked, I usually just copy the polies that form that part of the headlamp, copy the headlamp texture to another texture and brighten it up a bit and give it an alpha channel.

    Then a basic shader to make it glow:

    shader_headlamp
    {
    layer0
    {
    map=headlamp.tga
    ambient=1.0 1.0 1.0
    diffuse=1.0 1.0 1.0 ;ambient and diffuse to make sure it's lit correctly
    emission=1.0 1.0 1.0 ;this makes the texture glow
    blendfunc=blend ;this makes transparent parts of the texture blend nicely with what's behind
    }
    }

    I don't like the flares either, even with proper light models - they look really, really fake. But that's how it is, being able to change the flare texture per car would be something, but you can't do that as far as I know.
     
  3. Ok! :D

    First I have to download photoshop and give a go at trying to make alpha channels! I'll say something soon!

    Thanks very much Tiberius! :D
     
  4. Of course you mean, legally download photoshop, eh?
     
  5. You can always download GIMP, it's free!
     
  6. Off course, I legally download eveything! *cought* ^^

    Haven't heard about GIMP. I'll give it a try as soon as I got more spare time! ;)
     
  7. Gimp is really good, it's just the interface that I don't like, floating toolbars everywhere - compared to the ancient copy of Paint Shop Pro that I have, the interface feels like a real mess. Also I can never work out how to get TGA textures which have an alpha channel to load without Gimp loading the alpha channel into the image, so I end up loading them into Paint Shop and removing the alphas so that I can work on them in Gimp.

    Don't want to get on my moral soap box here but don't hold in with pirating software, IMHO it's just wrong..it's just a matter of principles I guess, I'm not trying to tell anyone else not to do it. Usually for every commercial program there's a good free alternative (Gimp for graphics, Audacity for sound, Blender for modelling and animations etc, there are a lot of good free/open source programs out there), Gimp is getting to the point now where professionals are starting to give it some respect, if they could just tidy up the interface a bit it would be a seriously good program.

    I only started using Max after I got hold of a student license, and then because I needed it for some work I was doing - £200 to realize that for what I did, Blender worked better for me..again, just a personal opinion.
     
  8. Stereo

    Stereo
    Premium Member

    To move the alpha channel out of the way
    Layer>Masks>Add Layer Mask...

    Choose "Transfer layer's alpha channel".

    The GIMP prefers working with transparency as a layer mask.

    Once you have that, the same menu gives you Edit Layer Mask, Show Layer Mask, and Disable Layer Mask options, or you can access them by right clicking the layer.


    I'll admit it's hard to find things in the GIMP :p but it seems to have pretty much everything I use. I stick to free software because it tends to have better support than pirated stuff, updates and stuff also work better (want a new version of Max? Photoshop CS4? Gotta pay for that)
     
  9. Oh FFS, I looked everywhere and couldn't find an answer to that. Thanks, works great :)

    Just read my last post again, guess I should have worded it differently. What I was trying to say was that there's usually a good alternative to downloading stuff illegally if you look around, some of the free open source stuff is really good.

    Yeah, Gimp is great, I just can't get used to having floating windows all over the place. Guess I'll get used to it eventually :)
     
  10. I've already downloaded GIMP, it looks good, but of course I don't know how to work with it...

    In the tutorials of GIMP's official website (http://www.gimp.org/tutorials/) I can't see nothing refering to alpha channels.

    Can anyone help me? :)
     
  11. GOT IT!! eheh

    Tiberius, you were 100% right in your 1st post! I just need to delete the polys that I don't need to make the light glow, and then put that code in the car.shd. I just didn't read it carefully and I had in my mind the idea that I had to mess arround with the tga and such!

    Thanks to you all! :D

    300.JPG
     
  12. Congrats. Looks nice. Good work :)