Page MenuHomeFeedback Tracker

Add support for scripted spotlights
Closed, ResolvedPublic

Description

While scripting does allow us to place lights, we can only place pointlights (#lightpoint), spotlights are currently not available via scripting.

The engine does support elaborate spotlights with all sorts of settings. These spotlights are used on vehicles and defined in the config. It is also possible to create modded lights via addons but nothing that compares to the flexibility that "#lightpoint" offers.

Details

Legacy ID
637811495
Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Feature Request
Additional Information

Suggestion:

Either add a new object "#lightspot" or allow "#lightpoint" to be configured as spotlight.

Scripting commands to adjust "innerangle", "outerangle" and "conefadecoef" would also be required.

Event Timeline

Tajin edited Steps To Reproduce. (Show Details)Jun 17 2014, 11:01 AM
Tajin edited Additional Information. (Show Details)
Tajin set Category to Feature Request.
Tajin set Reproducibility to Always.
Tajin set Severity to None.
Tajin set Resolution to Open.
Tajin set Legacy ID to 637811495.May 7 2016, 6:46 PM

The game really lacks flexible lighting options, we don't even have the old search light any more.

It really needs some editions or scripting options so we can make our own.

Would be nice to be able to create spotlight type lights through scripting.
Creating believable lighting can't be achieved in many circumstances with just point lights.

Many are relying on solutions like creating and hiding objects which contain these lights to achieve believable effects.

Tilion confirmed the functionality exists in the engine in July 2013:
https://forums.bistudio.com/topic/146430-reflector-lights/#entry2372239

Those #lightreflector objects are kind of useless as they don't cast any light as far as I can tell. Unless I'm missing a step in the scripting process. So far all I can get out of them is a "fog" particle effect that you typically see under lamps in a dingy room. I'm pretty sure everyone subscribed to this thread is looking for a directional light source, like the kind from the portable lights.

NikkoJT added a subscriber: NikkoJT.EditedApr 9 2022, 6:33 PM

Spot lights are perfectly functional lights (source: used one yesterday). As with any scripted light source, they need to be set up with the proper commands.

https://community.bistudio.com/wiki/setLightConePars
https://community.bistudio.com/wiki/setLightColor
https://community.bistudio.com/wiki/setLightIntensity
https://community.bistudio.com/wiki/setLightAttenuation
https://community.bistudio.com/wiki/setLightAmbient (tip: set this to [0,0,0] for good directional lighting)

These are the basic commands you'll need to get an ordinary light shining properly - if you're missing some of these the light may not work. There are some others you can use as well for extra effects such as daylight visibility, volumetric cones, IR-only lights, etc.
https://community.bistudio.com/wiki/Category:Command_Group:_Lights

NikkoJT removed a subscriber: NikkoJT.Apr 9 2022, 6:34 PM
dedmen closed this task as Resolved.Apr 9 2022, 6:53 PM
dedmen updated the task description. (Show Details)
dedmen edited Steps To Reproduce. (Show Details)
dedmen edited Additional Information. (Show Details)
dedmen set Operating System to Windows 7.