MTM2.com

A forum for mtm2 discussion
FAQ :: Search :: Members :: Groups :: Register
Login
It is currently Fri Nov 22, 2024 2:37 am



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Adding lights to a truck
PostPosted: Sun Jun 26, 2005 8:24 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 26, 2005 9:04 pm 
Member
User avatar

Joined: Sat May 11, 2002 2:01 pm
Posts: 247
Location: surrey, bc, canada
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.

_________________
Leg's Auto Emporium most anything that you'll need to make a truck!


Top
 Profile  
 
 Post subject: that simple?
PostPosted: Sun Jun 26, 2005 9:22 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
so, i just edit the data and it will work?


Top
 Profile  
 
 Post subject: Sorry
PostPosted: Sun Jun 26, 2005 9:24 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
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?


Top
 Profile  
 
 Post subject: is there a tutorial?
PostPosted: Sun Jun 26, 2005 9:31 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
Sorry bout all the replies, but I am still lost is there a tutorial for this?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 26, 2005 11:12 pm 
easy company
User avatar

Joined: Tue Feb 29, 2000 2:01 pm
Posts: 2036
If you give binedit a try for truck editing you'll find light editing easier

Image

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


Top
 Profile  
 
 Post subject: thanks
PostPosted: Mon Jun 27, 2005 12:15 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
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


Top
 Profile  
 
 Post subject: how?
PostPosted: Mon Jun 27, 2005 12:27 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 12:40 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 1:48 pm 
Glow Ball
User avatar

Joined: Tue Feb 02, 1999 7:00 pm
Posts: 23
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.


Top
 Profile  
 
 Post subject: thanks
PostPosted: Mon Jun 27, 2005 2:04 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
phineus is the man! thanks a lot! [tu]

_________________
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 11:42 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
how about some traxxish keyboard commands for chaging light size?

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject: dont know
PostPosted: Tue Jun 28, 2005 12:43 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 28, 2005 11:10 pm 
Member
User avatar

Joined: Thu Apr 19, 2001 2:01 pm
Posts: 695
Location: USA and Proud of it.
i was suggesting that malibu write some keyboard commands for adjusting position and size and agel etc. of the lights so u wouldnt have to do it by hand. i dont know how easy that is to do in c++.

_________________
Keep on MTMing,
CH_2005
<a href="http://ch.mtm2.com/">Visit my site</a>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 29, 2005 3:21 pm 
Member
User avatar

Joined: Wed Jun 08, 2005 9:08 pm
Posts: 44
good idea, is should be pretty easy for someone who ahs taken a course in C++

_________________
"If you're not out of control, you're not racing!"
--- Parnelli Jones
"When angry, count to four...when very angry, swear."
--- Mark Twain


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


Who is online

Users browsing this forum: No registered users and 28 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group