Garry's Mod

Garry's Mod

Advanced Light Entities
563 Comments
Diokat 2 Oct @ 1:55pm 
bug to report, with the original ( non-new ) entities, if you duplicate them, you can only edit the first one, the settings never apply to the dupe
An_Unknown_Player[FIN] 14 Sep @ 3:54pm 
Could you extend the limit for certain parameters? Like "brightness" and "far z".
MrDarthVR 12 Sep @ 3:02pm 
THE RENDER TAB ISNT THERE IN ENTITIES, WHAT DO I DO
MrDarthVR 12 Sep @ 2:59pm 
i cant find the light entities
George_the_Crab 3 Sep @ 3:14am 
This legit remains the best addon throughout the years. Turns gmod into lightweight blender. It's cool that it got an update, but I agree, spot light and projected light lack that red pointy arrow that shows where the light is aiming at originally.
Diokat 2 Sep @ 10:39pm 
ah i gotcha.. im guessin the only way to probably soft-reset my console settings or so would be reinstalling or.. maybe deleting my autoexec? sorry if im soundin dumb, super late rn lol
tau  [author] 2 Sep @ 10:34pm 
@Diokat
It definitely seems like there's something wrong with your system. I recommend doing some careful uninstalling and reinstalling to try to fix things. To clarify about the issue, the first legacy projected light (the one simply named "projected_light") uses the built-in Source Engine "env_projectedtexture" entity, which is also what the gmod lamp tool uses. The second legacy projected light and the updated new one both use "ProjectedTexture" objects, which are client-side objects and essentially just simple handles for controlling the projected light effect itself. It seems like there's a discrepancy between them on your system that's not there for others.
Diokat 2 Sep @ 10:23pm 
im.. not quite sure to be honest with you, not sure which is which of the entity/object youre mentioning, but truth be told ive also been coming across quite a few other issues lately that i have no idea where they came from now ( SOME TF2 skyboxes missing, maps tearing, etc )
tau  [author] 2 Sep @ 10:13pm 
@Diokat
I just played around with "r_flashlightdepthres" for both the old versions and the new one, and everything worked exactly the same. I even tried spawning an old projected light and converting it to a new one using the "advlights_update" concommand with a delay while looking at the shadows, and I did not see any difference. I think the issue you're having is on your side, and is a difference between the built-in "env_projectedtexture" entity and the gmod "ProjectedTexture" object. Is there anything unusual about your gmod installation or the system you're running it on?
Diokat 2 Sep @ 9:21pm 
just got into using gmod after like 2 weeks and now no matter how high my r_flashlightdepthres code is put at, the new lights give off very grainy shadows, but the old/legacy ones are working perfectly (Projected Light btw, havent tried any of the others) hope theres a fix soon!
creepernator152 23 Aug @ 12:16am 
is there a way to have the helper for the projected light show which way the light is facing by showing a longer arrow? not sure why that was removed tbh

also is there a way to make the menu appear in the middle of the screen by default like it used to?
tau  [author] 22 Aug @ 11:00pm 
NEW -- I just pushed an update that may make the expensive light have slightly better shadows and use less memory. PLEASE LET ME KNOW IF ANYTHING LOOKS WRONG! I also added the ability to spawn original legacy entities by right-clicking on an icon for a light entity, going to "Spawn other version", and selecting a class name. Please see the most recent change note for details on the update. I have also updated the description again, so please see the top section.
Master-Queed 21 Aug @ 6:44pm 
@tau can u update it so that the regular light and the spot light have shadow?
Sir-Isembard-64 21 Aug @ 10:26am 
@tau
Well, I guess It is not deleting lamps from previous savefiles.

But It happened the opposite way, I started using updated Lamps, but when I realized I can't use SMH with updated version, I used "advlights_legacy 1" in console. After I reloaded Gmod, all New lamps disappeared, so I had to place Legacy lamps from scratch. It took just a few minutes to place them back as Legacy version, but It scared me, like it could possibly happen with my old savefiles. Thanks anyway.
tau  [author] 21 Aug @ 8:28am 
NEW -- I updated the description and made it more clear about how things work in the new update and included instructions for spawning legacy entities. Please take a look at the top section.
tau  [author] 21 Aug @ 8:26am 
@ุ
No problem. I need to finish thinking through the new system that I've implemented for organizing code, then I'll contact the SMH devs and try to help them interface with the new content.
ุThe 20 Aug @ 6:30pm 
@tau - Nice! Alright, thanks for the heads-up and effort. GJ!
tau  [author] 20 Aug @ 3:09pm 
IMPORTANT -- I did some digging and figured out the reason for the compatibility issue with Stop Motion Helper! Having never used it before, I had assumed that SMH allowed you to specify any networked variable to control on any type of entity, but it actually hard-codes in support for specific entities itself, with only specific parameters on entities of specific classed being supported. It currently implements support for the six original entities from this mod, but not the new ones. I plan on messaging the devs for SMH and telling them about the update, but for now you can spawn old entities to use with SMH by setting "advlights_legacy" to 1 and restarting, or manually via the console.
tau  [author] 20 Aug @ 2:58pm 
@Sir-Isembard-64
This update should NOT delete anything from previous saves or otherwise break any existing content for the old version, as everything from the old version still exists in this version, including all six original entities! The "advlights_legacy" convar only removes the spawn menu options when it's set to 0. Are you SURE that old content is being broken? If it is, I need details, as you are the first person to suggest that content for the old version (saves, etc.) is breaking after the new update.
Sir-Isembard-64 20 Aug @ 12:13pm 
@Tau
I really really wish ability to turn addon to Legacy version will stay forever, because I used it SO MUCH in my unfinished project, and it will be the loss of everything if I won't be able to restore the light.
Right now I turned it to Legacy because I couldn't animate new version with SMH.
It's will be much better if you'll somehow upload maybe on Google Drive or on Workshop the real Legacy version, so I'll be able to restore everything.

Or maybe restore the update here, and add newer version as the "NEW Updated Advanced Light" one. Just notify people, that you can use one or another, but not both versions.

This is a way too big change that deletes all the light from previous Savefiles and etc.
tau  [author] 20 Aug @ 8:02am 
@Saow
The "advlights_legacy" convar should let you permanently change to the old one, as the convar is archived and replicated and restores everything from the old version (except for spawn icons). But please tell me what problems you're having with the new version!
Saow 20 Aug @ 3:56am 
I say this because the new ALE has caused all sorts of problems on my end and inputting advlights_legacy 1 fixed that.
Saow 20 Aug @ 3:52am 
Is there a way to permanently change to the old ALE?
ุThe 19 Aug @ 8:37pm 
@tau - One more thing in case it helps: For some reason, SMH works with the old versions of this mod, but not the new ones. It also doesn't work with Gmod's default lamps but for some godsforsaken reason works with Soft Lamps. So I honestly have no clue.

As for how it works, I'm fairly certain what SMH does is that it simply makes the brightness slider (for example) go up and down depending on the distance of the keyframes from each other. Because if I drag the timeline slider from one keyframe to another, I can see the entities brightness slider gradually go up and down. (From 10.00 to 5.0 to 0.0)
tau  [author] 19 Aug @ 8:04pm 
@ุ
That's very strange. The new entities work the same as the old ones, with networked variables that control the light properties. I'm not familiar with Stop Motion Helper, but I would assume that it just sets the networked variables. The only thing that's different about the new ones is how they interface with the new editor system. This is probably an issue with SMH, and I'll try to investigate.
ุThe 19 Aug @ 7:55pm 
@tau - the new light entities after the update. Not the old ones.
tau  [author] 19 Aug @ 7:53pm 
@ุ
Are you talking about new light entities that you have added to a project after the update, or are you talking about legacy entities in an existing project? Or, are you talking about legacy entities in an existing project that you have converted to new entities with the "advlights_update" concommand? I assume it's the first of the three, but I want to be certain.
ุThe 19 Aug @ 6:59pm 
@tau - Alright, I'll try that first. If that doesn't work, I'll explain in this comment.

Basically, before this new update, I could tag the light entities and add them to my timeline in SMH. If I changed the brightness slider, etc... the different keyframes would make the light go brighter or dimmer for example.

Now, it is completely unaffected by SMH. If I put the light at 10.00 brightness and make it a keyframe then add another keyframe where the light is at 00.00 brightness, it doesn't change. That's the simplest way I can put it. (Just in case your command doesn't change it)
tau  [author] 19 Aug @ 9:04am 
...However, be aware that setting "advlights_legacy" to 1 disables the new content, so new entities won't work. If you're having issues with the new entities, please tell me exactly what's wrong.
tau  [author] 19 Aug @ 8:44am 
@ุ
The new entities work the same way as the old entities, so I don't understand why that would break. What exactly is going wrong when you try to use the new entities? Also, remember that you can restore the old entities to the spawn menu by setting "advlights_legacy" to 1 and restarting.
tau  [author] 19 Aug @ 8:42am 
@Buckethead
Remember that you can restore the old entities to the spawn menu by setting "advlights_legacy" to 1 and restarting. Is there a reason you want to use the old ones? The new ones should have all the features and capabilities of the old ones.
Pero 19 Aug @ 8:29am 
@tau
no more problems, thanks for the prompt fix. I have always used, am using, and will continue to use such wonderful lighting:praisesun::praisesun::praisesun:
ุThe 19 Aug @ 5:30am 
tau, I used to be able to animate the lights with stop motion helper. After this new update, I can't anymore so I've lost my only way of animating light sources. Can you fix this?
Buckethead 19 Aug @ 12:08am 
Can you make a separate pack with the alternate versions? I really enjoy using those variants when scenebuilding, so if you could it'd be awesome :D (Note, if not, I'll just dupe the old ones over from my other scenebuilds)
tau  [author] 19 Aug @ 12:03am 
I pushed an update that should fix:
-- The issue where files not opening on the client caused the mod to not load
-- The performance issues with the expensive lights
-- The issue with the UI not working with the Dark UI mod

If any of these issues persist, please tell me!
Pero 18 Aug @ 10:05pm 
@tau
Using the ui, I have a problem in the form of white light on the scales. YaBoiTomScout showed a suitable example
🎃YaBoiTomScout🎃 18 Aug @ 9:56pm 
@tau Your welcome! happy to help, this update to the lights is awesome man keep up the good work :D
tau  [author] 18 Aug @ 9:50pm 
@YaBoiTomScout
Thank you! I think I know what's going on here. Expect a fix soon.
🎃YaBoiTomScout🎃 18 Aug @ 9:41pm 
@tau Hi, I use Dark UI as well and I'm not sure if the fault lies on the ui itself like you suggested or if the update is at fault, In any case I've taken two screenshots to show what the problem is, a before and after, in a hope that it helps solve the problem.

Before: https://steamproxy.com/sharedfiles/filedetails/?id=3551824734

After: https://steamproxy.com/sharedfiles/filedetails/?id=3551824684
A-Droid-4-U 18 Aug @ 7:54pm 
Yes, the performance issues didn't used to happen with the old version so I don't know what the cause could be. Although I'm not sure if this is a widespread issue, I've made sure it wasn't any conflicting addons.
tau  [author] 18 Aug @ 6:51pm 
@A-Droid-4-U
To clarify, both of the original/legacy expensive lights are giving you performance problems that were NOT there in the old version of the addon? And this persists even when "advlights_legacy" is set to 1? If so, I do not see how that is possible, as I quite literally copied and pasted the entire content of the old version into the new version (which works because the new version uses completely different file structures and naming conventions), and the only changes I made to the old code were a few checks for the legacy convar, as well as changing the texture file from a vtf to a png and loading it accordingly. The only thing I can think of that could do anything like this is the new texture. I can try to use the old texture again, but I would prefer not to if possible. You're not the only one having this issue, correct?
tau  [author] 18 Aug @ 6:51pm 
@-[FF]- Jupiter
I have seen a few people talking about issues with the UI. Does the text show up too light for you? If so, I think I can fix that, but the fact that this happens suggests that the dark UI mod is doing things it shouldn't.
tau  [author] 18 Aug @ 6:49pm 
@Pero
Are you talking about reverting to the old version? What issues are you having?
A-Droid-4-U 18 Aug @ 1:47pm 
I have tried the latest update testing the game with both advlights_legacy 1 and 0 and massive performance issue still persisted for both tests. With advlights_legacy 1; 'expensive light' was still causing the framerate to plummet, other lights worked fine as always. With advlights_legacy 0; both the original 'expensive light' and 'expensive light (new)' caused similar drop in framerate, other lights worked fine as expected. I made sure to restart the game between changing the convar, and the spawnmenu acted accordingly between restarts. I was hugely disappointed to see that expensive lights still don't currently seem to be at all workable anymore for seemingly random users. Assuming that I'm not the only one who really needs this addon for projects I hope desperately a fix for these current issues may be found. For now I just wanted to share my experience with this latest patch hoping it may be of some use.
-[FF]- Jupiter 18 Aug @ 1:27pm 
Can you fix compatibility with dark UI mod? it makes the text unreadable
Pero 18 Aug @ 11:12am 
back up pls...:steamsad:
tau  [author] 18 Aug @ 7:57am 
...It is also possible that something is messing with the "file.Open()" function, or intentionally breaking it on the client for security reasons.
tau  [author] 18 Aug @ 7:55am 
...Everything in this addon begins loading in a shared autorun file that is automatically sent to the client by gmod. On the server, that autorun file will load the server-side init file, which then "sends" the client-side init file to the client using "AddCSLuaFile()". On the client, the autorun file will try to load the client-side init file, but when my special loader system tries to open the file for preprocessing stuff, it simply fails to open. The specifics of how Lua files are actually "sent" to the client during loading (especially for dedicated servers) is something that I don't understand very well, so if you or anyone else has insight into this, please let me know.
tau  [author] 18 Aug @ 7:55am 
@pixel
Based on that error message, it's simply failing to open the Lua file on the client. My loader system is attempting to open the client-side init file (x0110000105206010/advlights/1/cl_init.lua) using the "file.Open()" function, but the function gives nil instead of a valid file handle. It reports that the file exists, but gives 0 for the size and refuses to open it. This could be a load-order issue as you described, where the file is somehow not sent to the client by the time that the loader system needs to open it.
Mokri Tal 18 Aug @ 5:34am 
NEW UPDATE - Это просто ужас. Как можно было додуматься сделать белый текст на белом фоне, ни черта же не видно.