Lights in Racer

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
 
  • Tiberius

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.
 
  • Tiberius

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.
 
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.

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)
 
  • Tiberius

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 :)
 
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
 

Latest News

Online or Offline racing?

  • 100% online racing

    Votes: 76 7.1%
  • 75% online 25% offline

    Votes: 114 10.6%
  • 50% online 50% offline

    Votes: 155 14.5%
  • 25% online 75% offline

    Votes: 298 27.8%
  • 100% offline racing

    Votes: 424 39.6%
  • Something else, explain in comment

    Votes: 4 0.4%
Back
Top