Cozy Lights - Buildable voxel light maps

User avatar
LMD
Member
Posts: 1500
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Cozy Lights - Voxel light maps

by LMD » Post

SingleDigitIq wrote:
Fri Nov 29, 2024 16:24
If only LuaJIT wouldn't lack bit operations. Bit operations probably should be fast even in a JIT, and if they wont be fast, then they would at least eliminate the need for some unique types, which could potentially result in massive improvement anyway. Another one scored for NodeJS. All day, every day.
This statement is blatantly false:
  • LuaJIT has bit operations.
  • They are fast. (There may be minor drawbacks to them just being functions, but that shouldn't matter much to LuaJIT.)
  • They treat floats as 32-bit integers. Just like JS.
  • Luanti bundles LuaBitOp so you can use bitops on PUC too.
TL;DR: Bitops are completely fine to use in Luanti.
My stuff: Projects - Mods - Website

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Voxel light maps

by SingleDigitIq » Post

Strange, guess I wasn't paying enough attention

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Voxel light maps

by SingleDigitIq » Post

Back with update 0.2.9:
  • no leaks through diagonal walls anymore, so cozylights are more immersive :>
  • always_fix_edges setting is on by default, it's kind of expensive for too potato. if you see its too much for your machine, disable in settings
  • a leak was fixed related to structures with light sources, so its smoother now in heavy games/heavy mapgens
  • farming works as it should, trees grow as they should, at least in major games

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Voxel light maps

by SingleDigitIq » Post

0.2.10 alpha
- added cozylights manual so that people who dont read mod page can have some info
- when you dig/place a node, lightmaps get updated dynamically again
- fixed race condition in /rebuildlights, should now work fine
- if you destroy a light_source, it gets reliably dark. no ghost nodes left
- node lights use same gradient as light brush does, because that one is easier to reason about
- adjusted some defaults so potatoes will fair better. not great, not terrible
Last edited by SingleDigitIq on Thu Jun 11, 2026 16:43, edited 1 time in total.

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Voxel light maps

by SingleDigitIq » Post

Added cozylights schematic support mod that provides the absolute minimal support(it's just node definitions) for schematics that include cozylights voxel light maps, which allows for although limited, but zero overhead, production-ready use on multiplayer and singleplayer servers: https://github.com/SingleDigitIQ/cozyli ... hem_loader
For example you can make your spawn more beautiful, and protect the schematic so that users cant modify it

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Voxel light maps

by SingleDigitIq » Post

0.3.0 alpha
- fixed forest fires in voxelibre and such
- fixed /uncozymode
- fixed wield_light step triggering even without a light_source in hand
- fixed debug lights being ignored by lightcasts of all sorts
- fixed too much cache invalidation, which led to too many light map updates. in other words greatly improved performance, especially when it concerns mapgens that generate light sources, most especially when its a lot of light sources, like for example voxelibre, mineclonia, age of mending, etc

i'd catiously argue it's playable in singleplayer survival now, but probably still has bugs

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Buildable voxel light maps

by SingleDigitIq » Post

0.3.1
some more potential crash fixes
- now handling malformed data that some mobs mods might send correctly, so less crashes with more obscure mods
- better potato stability during large areas with many light_sources generation
- better compatibility

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Buildable voxel light maps

by SingleDigitIq » Post

if next update performance will feel unbelievable, that is i suppose totally normal reaction

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Buildable voxel light maps

by SingleDigitIq » Post

actually no, i have reverted the hax i used. they are very implementable in particular cases though. but hey now light brush has undo :>

0.3.3 alpha:
- fixed light clearance when global_radius adjusted to be smaller than previous
- fixed most failures to update light maps when new obstruction is placed in voxelibre/mineclonia
- fixed most issues with overlapping wield_light and node_light light maps incorrectly resolving destruction, it can still leave artifacts though
- greatly sped up partial light map updates
- brought the wield_light speed back, not great, not terrible
- now utilizing mod storage to keep lights data and sparsely traverse that data incredibly inefficiently, all for better accuracy in behavior overall and undo for light brush
- added history for light brush that persists over server reboots, remembers up to 200 last strokes
- now every light brush has its own item metadata that persists over server reboots
- added some basic hud for better ux during swaps of many brushes
- light brush settings were moved to /zbs chat command, right click for light brush is now undo last stroke
- now cozylights reference manual drops to player inventory only once
- sacrificed single light_source update speed for dense area update speed
- now light_source origin is the node itself for accuracy, before it was elevated or depressed as a basic optimization that avoids a branch in hot path
- added turbo slow algos now its kind of unusable
- overall made it worse. take potatoes to the infirmary

User avatar
SingleDigitIq
Member
Posts: 47
Joined: Wed Jul 17, 2024 22:48
GitHub: SingleDigitIQ
In-game: huh huuh huuuh huuuuh hm hmm

Re: Cozy Lights - Buildable voxel light maps

by SingleDigitIq » Post

0.3.4 alpha:
- fixed server crashes during teleport with wielded light
- fixed some chat command crashes
- better tooltip for brush

still didn't improve the speed further, but already have it all in my head, will be back in a month
please be aware that i have no control over shaders, engine lighting in general, so some things are impossible to fix or make look better

User avatar
luantistdork
New member
Posts: 4
Joined: Sun Apr 02, 2023 21:55
In-game: bombulator

Re: Cozy Lights - Buildable voxel light maps

by luantistdork » Post

Seems interesting, might use this for a project in a future...
The he/him behind Unlit and Bombulator

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests