Disco Lights?

Blitz3D Forums/Blitz3D Programming/Disco Lights?

Guy Fawkes(Posted 2008) [#1]
Can someone show me a small example using spot lights, how to create a disco effect, moving the lights around the screen?

~DarkShadowWing~


Ross C(Posted 2008) [#2]
You'd need a good number of vertices on your mesh, if you want a decent spotlight effect. If you tried to shine a dx light (the ones blitz uses via createlight) onto a room made up of 2 triangles for each wall, the effect would fail miserably.

I would combine the Dx lights with some sprites, or even cone meshes, to show the light travelling through the air. Remember there is a limit to the number of lights you can have, 16 maximum, less depending on your card. Also remember that shining lights costs time per loop, as each vertex is calculated with what lights are shining etc.


Guy Fawkes(Posted 2008) [#3]
could u show me a small example? its the only way i know how to learn.

~DarkShadowWing~


Kryzon(Posted 2008) [#4]
Try this:

http://blitzbasic.com/codearcs/codearcs.php?code=1000

You won't be able to use a lightmap on the room you use this, though (because the only way to use this on a fully brushed scene is to place the light texture on texture coords 1, whilst the diffuse will be on 0).
And of course, instead of using that single batman like spotlight, you'd use a tiled circlything kinda like disco lights.


Guy Fawkes(Posted 2008) [#5]
thanks kryzon. can you show me how to make multiple lights w/ different colors move randomly across the screen?

~DarkShadowWing~


puki(Posted 2008) [#6]
You can start of by creating lights and attaching them to a master pivot - you then just angle the lights to point in what angles/directions you want - change the LightColor for the lights - then spin the pivot however you want.


Guy Fawkes(Posted 2008) [#7]
thats easy to understand, but i need to see an example of moving, colored lights to be able to fully understand it =)

~DarkShadowWing~


Ross C(Posted 2008) [#8]
You could try and code it then ask for help on whatever you get stuck on.