Photon
Lighting System
Introduction
Photon is an in-development lighting engine for vehicles, with a primary emphasis on unprecedented realism for emergency vehicle operation in Garry's Mod.
Usage
Spawning Vehicles
As this addon is currently in beta, vehicle support is limited. In most cases, downloading a "Photon vehicle" entails only downloading a specification file that adds Photon functionality to an existing car. Be vigilent that you are downloading all the necessary addons.
HUD Guide
Keys/Controls
- Toggle Emergency Lighting
- Key: F
- Turning off lights also deactivates the siren
- Toggle Siren
- Key: R
- If the lights are not active, the siren will default to the hightest priority light mode and enable emergency lights.
- Change Light Pattern
- Illumination On/Off
- Key: X
- Short press
- New feature, capable vehicles will show "ILLUM" on HUD
- Illumination Toggle
- Change Siren Tone
- Manual Bullhorn
- Manual Siren
- Key: T
- Will sound the manual tone if it exists, otherwise it will use the wail tone.
- Blackout
- Key: H
- Disables head and marker lights for stealth work.
- Signal Left
- Signal Right
- Hazards
Help
About
The Name
The name "Photon" derives from the photon, a fundamental particle of light.
Development
Photon started as a proprietary addon for the Noobonic Plague server to add exclusive emergency lighting functionality to certain vehicles.
I've had a profound interest in the physics of light and its effect on the brain. I've extensively studied using colors for vehicle and personnel safety on roads. The effects displayed in Photon are a result of countless hours of research and experimentation into replicating how light appears through a camera lense.
The Developer
Photon is solely developed by me, Schmal. I am a 2014 high school graduate, Garry's Mod coder and full-time user-interface designer/front-end developer at a web studio in the city of Bellingham, Washington.
Photon is a hobby that embodies my love for flashing lights and the freedom of Garry's Mod.
I own the server Noobonic Plague, and contribute with four other developers.
See my personal website at schmal.me
Developer
Interested in making your own cars?
I currently have a Facepunch thread that is largely dedicated to resources for people who want to make their own Photon-compatible vehicles
Copy this URL for the thread: http://facepunch.com/showthread.php?t=1436368
Developer Tools Reference
-
Toggle debug mode:
photon_debug ELS/REG
- Use 'ELS' for modifying emergency light positions
- Use 'REG' for modifying regular light positions
- This will 'target' the vehicle you are currently driving
-
Change light index:
+/- keys on number pad
- + will move index up
- - will move index down
-
Copy vector/angle numbers:
* on number pad
- Will copy a valid Lua chunk for the Vector() and Angle() parameters of the light
-
Toggle vector/angle mode
/ on number pad
- Alternates adjusting the vector or angle
-
Increase Increments
Shift key
- Increases adjustment intervals while held down
-
Decrease Increments
Alt key
- Decreases adjustment intervals while held down
-
Adjust Vector X/Angle Pitch
Left/Right Arrow Keys
- Remember this is always relative to the car, not how you're looking at it
-
Adjust Vector Y/Angle Yaw
Up/Down Arrow Keys
- Remember this is always relative to the car, not how you're looking at it
-
Adjust Vector Z/Angle Roll
CTRL + Up/Down Arrow Keys
- Remember this is always relative to the car, not how you're looking at it
Updates
Update 17 - January 17, 2015
- Vast majority of all errors should no longer appear
- Added debug/build tool
Update 13 - January 6, 2015
- Added support illumination support (emits actual light)
- Added French siren tones (index 13 for devs)
- Changed sounds and keypress behavior
- Changed some light colors
- Fixed PVS sound issue
- Fixed !photon text from appearing
- Removed console commands, keys should now always work
Update 12 - December 29, 2014
- Added green LED color
- Vehicle props rendered clientside
Update 11 - December 18, 2014
- Fixed a bug with !photon menu appearing on all clients
- Added a y-axis override for the HUD
Update 10 - November 23, 2014
- Added six Federal Signal siren drivers:
- Federal Signal 80K
- Federal Signal 650
- Federal Signal MS4000
- Federal Signal Omega 90
- Federal Signal EQ2B
- Federal Signal PA 300
- Updated siren drivers:
- Federal Signal TouchMaster
- Federal Signal SmartSiren
- Added support for turn signals and hazard lights:
- Signal left: left-click + A
- Signal right: left-click + D
- Hazards: left-click + S
- Cancel: left-click
- All will stop after driving forward a bit.
- Only the Impalas are supported at this time.
- Added ability to create vehicles that have no sirens or other emergency-vehicle features:
- Set
Siren = 0
in vehicle specifications
- Added this menu, access through
!photon
- Substantially boosted siren audible range.
Upcoming
Planned Vehicles
- Metropolitan Police (UK) Volvo XC70
- Dodge Charger SRT (undecided agency)
Planned Features
- Support for projecting headlights
- Dynamic HUD placement for VCMod users
- Settings menu for easier binds
- Working on ideas for a few spin-off projects targeted for emergency-service RP
Bugs
Known Issues
- Sirens will not sound for players outside a vehicle's PVS, even when the vehicle later approaches. Workaround is to simply cycle-sirens as you move or turn it off/on.
- Vehicle props will disconnect from car if player reinitializes outside the car's PVS.
Unconfirmed Reports
- SCARs may cause the lights to not render while driver is in third-person.
Credits
This mod would not be possible if not for the dedication, work and inspiration of dozens of others. If you believe this mod features your work and you are not credited, please email me at contact@schmal.me
Sirens
All sirens were personally ported and modified by me, however they have a variety of origins.
Disclaimer
All third-party assets in this mod as used on a non-commercial basis. Cited assets not authored by me are copyrighted to their respective owners.
Website copyright Alex Smith. Code is licensed under Creative Commons Non-Commercial Attribution. Siren tones are edited for Photon and copyright of their respective owners.