Help with Car Lights Textures

Blitz3D Forums/Blitz3D Programming/Help with Car Lights Textures

KuRiX(Posted 2005) [#1]
Hello friends!. i am having a big trouble with my cars. I want the cars to switch on the lights when breaking. I have done this by changing the texture to other with the lights on, and then, when no breaking, i change again to the original texture.

the problem is that i have 16 cars and i want to switch the break lights, the front lights, etc... I have thought of making it with objects over the lights with texture blending. All with worse results than before, hehe.

Please... any idea?


Stevie G(Posted 2005) [#2]
Why not make the lights a different surface on the model and paintsurface a much smaller texture to change the light colours , use could also change the light colour using vertex colours but you'd obviously need to know which vertexes represented the lights.


KuRiX(Posted 2005) [#3]
Mmm, i was trying the first idea right now, but the second idea looks very good.

Thanks Stevie!


Rob Farley(Posted 2005) [#4]
Stick a couple of sprites over the lights... ie, Position parented sprites to the car body in the locations of the lights, texture them with a flare type texture, colour them correctly then set the alpha of the sprites to 0 and fullbright on (entityfx 1). When the brakes are applied set the alpha to 1 and I've found that when the brakes are released fading them back to 0 looks much better than just flicking it back to 0.


KuRiX(Posted 2005) [#5]
Rob, the problem with the sprites is that if you see the car from non-back i can see the plane of the sprite (very poor effect)...

Well, the sprite should be always facing the camera, but then the effect is a little strange...

I keep trying!


Naughty Alien(Posted 2005) [#6]
KuriX I do agree with Rob..but instead of 1 sprite over light try to use few of them per light (back, left, right) and then fade in/out them according to camera angle..It will make very nice effect , you will not be able to see plane sprite and good looking..


RGR(Posted 2005) [#7]
Have you tried to change the Vertex Colors of the lights?
Should be the same thing as this: I use BitmapFonts (bright grey masked Texture/Brush) in a single surface system and color them by changing the Vertex Colors and adding Brush effects (fullbright shininess).
You would need one Texture only and could change the colors (red yellow white) as you need them from very bright to dark.


D4NM4N(Posted 2005) [#8]
what about a sprite 'star' with 3 copies of the sprite parented to the same pivot each rotated to its own axis the edges would be hardly noticable if done correctly. even better, set order to -1 & use pickmode to fade them when not visable to camera or yaw angle is out of line.

alternitavely sprites if used in free mode can be aligned to the light object as close as possible