Adding lights to a truck
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
Adding lights to a truck
I am currently working on a project involving Rep Fan's Bigfoot I, and was wondering how I would go about making the rollbar lights work. (they are now just images and not lights) I have the textures for the lights, but I need help writing the code. Any help would be appreciated. Thanks.
open the *.trk file, look for this: "Number of Lights"
Number of Lights
7 -------------------- amount of lights 14 max
Light 0 type -------------------- light #
0
Light 0 body axis pos x,y,z (ft), bitmap radius (ft)
-2.234375,1.535156,9.064063,1.250000 -------- X,Y,Z postioning of light
Light 0 heading (rad), pitch (rad), heading spin speed (rad/sec)
0.000000,-0.174533,0.000000 --------- spin/angle of light
Light 0 cone: length (ft), base radius (ft), rim radius (ft), texture name
75.000000,0.700000,11.000000,litefuzz.raw --------- glow texture name
Light 0 source: bitmap name
headlite.raw ----------- texture name
Light 0 ms on, ms off (0 if light doesn't blink)
0,0 ----------- flash rate.
if u look just below the first one u will see multiple more also with different numbers. light1 light2 light3 etc.
Number of Lights
7 -------------------- amount of lights 14 max
Light 0 type -------------------- light #
0
Light 0 body axis pos x,y,z (ft), bitmap radius (ft)
-2.234375,1.535156,9.064063,1.250000 -------- X,Y,Z postioning of light
Light 0 heading (rad), pitch (rad), heading spin speed (rad/sec)
0.000000,-0.174533,0.000000 --------- spin/angle of light
Light 0 cone: length (ft), base radius (ft), rim radius (ft), texture name
75.000000,0.700000,11.000000,litefuzz.raw --------- glow texture name
Light 0 source: bitmap name
headlite.raw ----------- texture name
Light 0 ms on, ms off (0 if light doesn't blink)
0,0 ----------- flash rate.
if u look just below the first one u will see multiple more also with different numbers. light1 light2 light3 etc.
Leg's Auto Emporium most anything that you'll need to make a truck!
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
that simple?
so, i just edit the data and it will work?
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
Sorry
I made I mistake, I meant to say Rep Fan's "Take This Job and Shove It" Bigfoot. (I realized the mistake when opening up the TRK file) Sorry.
I am still confused, the file will automatically know where to put the light?
I am still confused, the file will automatically know where to put the light?
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
is there a tutorial?
Sorry bout all the replies, but I am still lost is there a tutorial for this?
If you give binedit a try for truck editing you'll find light editing easier
The numbers circled change the lights X Y Z positions (up, down, left, right, forward, backward), and in the secondary window (not pictured) you can see it in real time.
Bitmap radius; is the lights diameter
Heading; rotates the lights direction
Pitch; tilts the lights up and down
Heading spin speed; self explanatory
Cone length; adjusts the overall lenght of the headlight beam
Cone base radius; adjusts the diameter of the light beam at the light texture
Cone rim radius; adjusts the light beam at the end
Cone texture; use to change the light beam texture
Light texture; use to change the light texture :)
Blink on interval; sets a light 'on' time in milliseconds
Blink off interval; sets a light 'off' time in milliseconds
The numbers circled change the lights X Y Z positions (up, down, left, right, forward, backward), and in the secondary window (not pictured) you can see it in real time.
Bitmap radius; is the lights diameter
Heading; rotates the lights direction
Pitch; tilts the lights up and down
Heading spin speed; self explanatory
Cone length; adjusts the overall lenght of the headlight beam
Cone base radius; adjusts the diameter of the light beam at the light texture
Cone rim radius; adjusts the light beam at the end
Cone texture; use to change the light beam texture
Light texture; use to change the light texture :)
Blink on interval; sets a light 'on' time in milliseconds
Blink off interval; sets a light 'off' time in milliseconds
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
thanks
thanks for all the info, hoepfully i can get it to work. if i can't i'll be back 
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
how?
how would i go about finding the x, y, z coordinates in binedit?
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
For the lights? You don't need to. Notice in the picture above, the light position line is like this:
Light Position -2.421875 1.862500 8.695312
The first number is x, the second is y, and the third is z.
If the light is too low, just increase the y value. Try 2.862500 or 3.862500. If it's too high, decrease the value. If the light is too far left or right (or front to back), then adjust the others the same way. When the light is where you want it, you're done. What the coordinates are doesn't matter as long as the light is where you want it.
Light Position -2.421875 1.862500 8.695312
The first number is x, the second is y, and the third is z.
If the light is too low, just increase the y value. Try 2.862500 or 3.862500. If it's too high, decrease the value. If the light is too far left or right (or front to back), then adjust the others the same way. When the light is where you want it, you're done. What the coordinates are doesn't matter as long as the light is where you want it.
Oh, I see.
Okay, when you add a light from scratch, there's a couple things to note.
- set the light rendering to "sphere" so it's easier to see.
- It will be entered at 0,0,0 so we need to position it.
- for lights on the rollbar, just set the Y value to 5 (for starters) and it should pop up above the cab so you can see it. Then just tweak the x,y,z values until it's in front of the spot you want.
- bitmap radius = 0.4
- cone length = 40
- cone base radius = 1
- cone rim radius = 5
- cone texture = litefuzz.raw
- Light texture = whatever you're using (eg TTJASI.raw or headlite.raw)
All values can be adjusted to suit your needs, but that will get you close enough you can fine tune it afterward.
You can look at the stock trucks to see what they do. It can sometimes help.
Then repeat for each light you add.
Hope that helps.
Okay, when you add a light from scratch, there's a couple things to note.
- set the light rendering to "sphere" so it's easier to see.
- It will be entered at 0,0,0 so we need to position it.
- for lights on the rollbar, just set the Y value to 5 (for starters) and it should pop up above the cab so you can see it. Then just tweak the x,y,z values until it's in front of the spot you want.
- bitmap radius = 0.4
- cone length = 40
- cone base radius = 1
- cone rim radius = 5
- cone texture = litefuzz.raw
- Light texture = whatever you're using (eg TTJASI.raw or headlite.raw)
All values can be adjusted to suit your needs, but that will get you close enough you can fine tune it afterward.
You can look at the stock trucks to see what they do. It can sometimes help.
Then repeat for each light you add.
Hope that helps.
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
thanks
phineus is the man! thanks a lot! ![Thumbs Up [tu]](./images/smilies/smilie_tup.gif)
![Thumbs Up [tu]](./images/smilies/smilie_tup.gif)
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm
dont know
i dont use traxx so i wouldnt know sry
maybe phineus knows
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain
- blueovalboy88
- Member
- Posts: 44
- Joined: Wed Jun 08, 2005 9:08 pm