OHM Spotlight Vessel

Did the elevation/azimuth change programmatically, elevation will be read from MFD scen blurb
Oh ho! You really could start doing "Orbiter Lightshows" now :lol:
Cool :thumbup:

.....a question came up:

how do I know if the spotlight is ON? I send a "B" keypress at spotlight installation, was wondering if you could allow reverse communication a la MBR_ITS addon pack. If not, I'm perfectly happy with the present situation :)

There is a function for getting the "light-emitter status"
Code:
spotlight->IsActive();
(where "spotlight" is the light-emitter handle)
Returns true if the spotlight is on, false if off.

Haven't used it, but looks like it will do what you need.
Otherwise I can add a dummy key function that will return 0 or 1 according to light-emitter status. No probs. Let me know if you need it.

Cheers,
Brian
 
A dummy key would be better, to avoid re-linking and cross-linking DLLs. You can actually set it to respond to something other than OAPI_KEY values (a la Hielor's KEYCOMM). To be safe, return values of 1 (for ON) and -1 (for OFF) would be preferred, methinks. And yes, lightshows are envisioned. I gotta get autotracking code right... and then - groups of lights, programmed motions etc.
 
A dummy key would be better, to avoid re-linking and cross-linking DLLs.
Why the need for relinking and cross linking? I haven't tried it but this snippet of code is surely a simpler way of doing things (no?...)

Assuming you have obtained the handle to the "Spotlight Vessel", which we will call hSpotVessel, then.....
Code:
SpotLight *hLightEmitter;
VESSEL *v = oapiGetVesselInterface (hSpotVessel);
hLightEmitter = v->(SpotLight*)GetLightEmitter (0);
if (hLightEmitter->IsActive() == true) ...then do stuff...;

But adding a dummy keypress to the spotlight code is no big deal, so just confirm that you do want to do it that way, and I'll add it in.

Cheers,
Brian
 
:facepalm: It is so simple! now I see that no keycomms are needed, cheers!

:tiphat:
 
Why the need for relinking and cross linking?

Yeah, I agree. Modules wouldn't be cross-linked at all. They both use only Orbiter API, and not APIs of each other, i.e. LightEmitter::IsActive() is from Orbiter API, and that is not spot_light::IsActive(), which besides doesn't exist and isn't exported by Spotlight vessel module.
 
This is an extremely useful add-on. Thanks to the new Orbiter's feature, we finally don't have to wait for a sunrise to continue on-orbit operations. However attaching it to a vessel and positioning it is a somewhat a laborious process. It could be improved with not much work, in my opinion.

I suggest to use a principles of Universal Cargo Deck in this add-on. The spotlight vessel would remember a ship to which it is attached and position/rotation parameters in a scenario. At simulation start it would create the attachment in the parent vesssel and attach itself to it. I think this is how UCD works. The keys could be used for rotation and movement of the attachment point. Also the HUD and MFDs better be disabled.

In other words, I'd like to see a fully featured Spotlight Vessel, since it is a kind of add-on that is supposed to be used very often. Universal Spotlight should take it place alongside UCD, UMMU, UCGO. Controlling it must be as convenient as possible.
 
I agree with vchamp. Would be a 'nice-to-have' if the spotlight vessel could have a simple way to manipulate its attachment to a vessel, and location of the attachment, similar in function to UCD.

I currently am actually using UCD to position any lights I have attached to a vessel, and although I am comfortable with this and continuing to use UCD is fine with me, I think it would remove a level of complexity and make it more convenient for others to use the Spotlight Vessel in this manner.

Don't get me wrong, I'm not whining by any means. Thank you both for these addons. They have truly added a new factor of coolness and realism to Orbiter. This is merely a suggestion.

Thanks again,
n122vu
 
Could it be easier to manipulate the attached spotlights through the MFD? Currently Lighting is for ground lights only, but could be extended (after March 23-27 due to press of work).
 
Could it be easier to manipulate the attached spotlights through the MFD?

I don't think so. The spotlight vessel is often positioned in an external view. Better to have a dialog and also, for those who don't like dialogs and for faster process, the ability to attach, detach, set position and rotation by key presses. I personally would also like to be able to attach to a vessel keeping the spotlight's relative position and orientation before attachment. Then it would be possible to move a lamp to its approximate location via URMS or UMMU and virtually fasten it.

Another nice function could be an automatic creation of one or more spotlights for separate vessel classes using presets. As I found good locations for two spotlights on Arrow, for example, I don't want to do the same procedure of creation, attachment, positioning in each scenario, if I want all Arrows to have these spotlights. It may be a request for a separate add-on, a global module that would control all spotlight vessels in a scenario.
 
Hi,
thanks for the suggestions, I'll have a think about making the positioning of the spotlight on another vessel a bit easier. Truth is I'm running a bit low on time and motivation at the moment. Anyone else want to pick this project up and run with it?

ATB,
Brian
 
I love this addon !!!
 

Attachments

  • spotlight.jpg
    spotlight.jpg
    27.4 KB · Views: 60
A question !

Could you put a mirror light, at the end of the length of the light, to be a 'reflected' light source, but with no mesh? To look more realistic, the light shining on the object, should be a light source also, just alittle less intense.
 
Hi Don,
glad to see you're having fun with the spotlight!
A question !

Could you put a mirror light, at the end of the length of the light, to be a 'reflected' light source, but with no mesh? To look more realistic, the light shining on the object, should be a light source also, just alittle less intense.
Reflected light? Can't see how it could be done effectively using a light source - I imagine you'd really need this kind of illumination feature to be coded into the rendering engine.

Incidentally, I'm just working on a "gimballed" spotlight version - won't be as flexible as this version (mesh is fixed for animations) but possibly more functional for attaching to vessels.

Cheers,
Brian
 
Hi,is it possible to have two different colored spotlights in the the same scenario?,and if so how,because I tried creating a second spotlight,saved the scenario,and reloaded it again,but I couldn't find a config file for the second spotlight,so I could change the color.Thanks,awsome addon BTW.:thumbup:
 
Hi,is it possible to have two different colored spotlights in the the same scenario?,and if so how
Hi,
yes, you can have different colour spotlights. Simply copy the spotlight.cfg and rename it something like spotlight_green.cfg (if you're making a green spot, for example) and change the SpotColour parameter as required.

Then you can create it "in-sim" by using the scenario editor and selecting the "spotlight_green" vessel from the list.

Cheers,
Brian

EDIT:-------- ooh look! I got a "addon dev" bar ;-)
 
Last edited:
with this invention you can create stars that lights
other planets without the sun?
 
with this invention you can create stars that lights other planets without the sun?
Not at the moment, this module is limited to 100km range. I can't remember why I put that limitation in - I might remove it! But in principle I think it should be possible to make a spotlight vessel that is landed on a "star" and will illuminate other planets - don't know - never tried. The Orbiter illumination function might not like it.

---------- Post added at 01:11 PM ---------- Previous post was at 01:08 PM ----------

I don't want to sound dumb but, what is the 9 flare options in the config file do?Thanks:facepalm:
You can have up to 9 "flare" effects (thats the lens flare effect around the spotlight) - useful for making floodlighting pylons with more than one bulb (still only uses 1 local light source for illumination though).

Cheers,
Brian
 
One question, what are the program that I can build a spaceship? textures, texturas2, meshes ....
 
Back
Top