[x] Main Menu

Car's Shadows

(501 total words in this text)
(11166 reads)   Printer Friendly Page

Car's Shadows for 1.3.x

This tutorial explains how to generate shadows for the cars with "The Gimp".

First you'll have to create an RGB (uncompressed) blank image (128x128) that you'll name "shadow.rgb" in the car directory:


Then edit the "car.xml" ("acura-nsx-sz.xml" in our example) file to add the following line to the "Graphic Objects" section:

<attstr name="shadow texture" val="shadow.rgb"/>

Now launch a race with a player using the car you're modifying, and hit the "P" key before the race starts.
Select the "F5" view and zoom (with "<" and ">" keys) to have a good view of the car and take a screen-shot with "F12".
The image is saved in the torcs runtime directory.

Select the white area and create a new image with the selection Right-Click and "Script-Fu->Selection->To Image".

Now use the "Fuzzy select" tool to select the white areas:

The result is:

Now cut the select area with Control-X:

Now select the car with Right-Click and "Layers->Alpha to Selection", then select the "Bucket Fill" tool:

Paint the car in black:

Invert the selection with "Control-I" and paint it too:

Then cut the newly painted area with "Control-X" (this is to have the transperent color made of black).

Now blur the shadow with Right-Click and "Filters->Blur->Gaussian Blur (RLE)..."

The result is:

Now scale the image to 128x128 with Right-Click and "Image->Scale Image..."

The result is:

Set the image transparency to 80%

The result is:

Now save the image in RGB uncompressed format:


The result is:

Last modified: Sun May 25 11:40:56 CEST 2003
User Info [x]

Welcome Anonymous


Latest: Skoynay
New Today: 0
New Yesterday: 0
Overall: 3576

People Online:
Members: 0
Visitors: 16
Bots: 0
Staff: 0
Staff Online:

No staff members are online!

Current Poll [x]
Would you like to develop a robot ?

I don't know what you are talking about
25 %25 %25 %
I know what you mean, but I just want to drive
35 %35 %35 %
Yes (check the other polls)
34 %34 %34 %
I already have developed a robot (let us know)
5 %5 %5 %
Results :: Polls

Votes: 6491
Comments: 29

Hits [x]
We have received
page views since
November 2001

Hosted by:
SourceForge.net Logo
All logos and trademarks on this site are property of their respective owner. The comments are property of their posters.
The site content and design is © 2001-2012 Bernhard Wymann, Eric EspiĆ©.
Interactive software released under GNU GPL, Code Credits, Privacy Policy