Author Topic: Spotlights  (Read 2719 times)

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Spotlights
« on: July 16, 2008, 11:30:55 AM »
I have been trying to think of a way to make a spotlight, [you remember, likke the galaxy had in the TNG episode "the Pheonix] but may be I'm thinging wrong cause I'm at a loss. Not that bigg of a deal, just thought It might be handy.
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline Aeries

  • Posts: 1446
  • Cookies: 226
Re: Spotlights
« Reply #1 on: July 16, 2008, 02:06:09 PM »
Does BC even support directional lighting like that? The only thing I can think of that emit light are suns and the alpha maps used on ships. Otherwise I'm pretty sure what you're suggesting isn't possible with the BC engine... somebody please prove me wrong? xD

Offline laguardia528

  • Posts: 110
  • Cookies: 4
  • Inspiration comes to those who haven't got a clue
Re: Spotlights
« Reply #2 on: July 16, 2008, 04:28:13 PM »
just a shot in the dark here but couldn't it be made by using a trnsparent texture extending out from the ship then having that section lit up like a christmas tree?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Spotlights
« Reply #3 on: July 16, 2008, 06:12:03 PM »
Let's get out our trusty App.py

And the class LightPlacement has ConfigSpotLight

This thread has more on lights (though not neccesairly everything):
http://bc-central.net/forums/index.php/topic,3888.0.html
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Spotlights
« Reply #4 on: July 16, 2008, 09:20:46 PM »
Let's get out our trusty App.py

And the class LightPlacement has ConfigSpotLight

This thread has more on lights (though not neccesairly everything):
http://bc-central.net/forums/index.php/topic,3888.0.html
read that, but isnt that for a system?

I dont see how it can be placed on a moving ship, hmmm
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Spotlights
« Reply #5 on: July 17, 2008, 06:10:09 AM »
A LightPlacement is an object that is part of the system.

Systems are just code that run once when a Set (what BC calls Systems) is loaded.
The code in a System definition could be run at any time (assuming a set is loaded of course).

Since a LightPlacement, just as a Ship are objects that are part of a system, they both have the AttachObject function, so you create a LightPlacement after the game has started, such as when you click on a button, set it to the location 0,0,0 (or where it is supposed to be on the ship), you configure the light of course, and then do pShip.AttachObject(pSpotLight) (or something similar of course!). Now the spotlight will always move when the ship moves, and turns when the ship turns (as if it's a fixed part of the ship).
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Spotlights
« Reply #6 on: July 17, 2008, 09:31:13 AM »
A LightPlacement is an object that is part of the system.

Systems are just code that run once when a Set (what BC calls Systems) is loaded.
The code in a System definition could be run at any time (assuming a set is loaded of course).

Since a LightPlacement, just as a Ship are objects that are part of a system, they both have the AttachObject function, so you create a LightPlacement after the game has started, such as when you click on a button, set it to the location 0,0,0 (or where it is supposed to be on the ship), you configure the light of course, and then do pShip.AttachObject(pSpotLight) (or something similar of course!). Now the spotlight will always move when the ship moves, and turns when the ship turns (as if it's a fixed part of the ship).
HMMMM OK, not sure what I can do since I got the KM1 app.pyc [ and they added more to the app.py, that is in the SDK,the sizes don't match, I m going to try a different route, for now]
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Spotlights
« Reply #7 on: July 17, 2008, 09:34:33 AM »
Did you check the source folder that came with KM?

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Spotlights
« Reply #8 on: July 17, 2008, 11:15:51 AM »
Did you check the source folder that came with KM?
YEP, and it is not there [no biggy tho]

and my apologizes it was in the episode "Pegesus not pheonix, I had just read the word pheonix and it stuck

TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline limey BSc.

  • JL Studios - Co-Founder
  • Posts: 1152
  • Cookies: 421
  • JL Studios - Co-Founder
Re: Spotlights
« Reply #9 on: July 17, 2008, 11:50:01 AM »
I just looked at all the stuff included in KM (not the source folder, the actual scripts folder) and neither app.py or app.pyc was in there. I'm pretty sure neither were modified.
MUSE!!!


Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Spotlights
« Reply #10 on: July 17, 2008, 01:31:11 PM »
There isn't any reason why anyone would edit App.py, atleast no reason, at all, to edit it directly.


The LightPlacement class starts around 8992 (can't be entirely sure, since it doesn't, directly, show a line number).

You can create one through App.LightPlacement_Create
And it has 4 functions, ConfigAmbientLight, ConfigDirectionalLight, ConfigPointLight, ConfigSpotLight
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.