Comments (11)
I'm adding voxel lighting to this engine like Minecraft. Since my interest is the blocky world, I'm using a Flood Fill algorithm, like this one.
I plan to make a PR to add it to godot_voxel, but probably I'll have to wait for separation between blocky and smoothy terrains #41 . Anyway, you can checkout my fork, but it is still under development.
from godot_voxel.
I don't know anything about minecraft.
This scene has 500 omnilights in it (one in each sphere which is there just to show the location) and runs at over 150fps @1080p on a GTX1060.
This has 170 lights spread out more so they illuminate the terrain. The large spheres are bullets, physics objects, not lights. Though they are colored themselves, you can see the colors of the lights reflect off them. This runs at over 200fps @1080p.
288 lights at 180fps on blocky.
Here I have 50 lights attached to my player and maintained over 100fps while running around. My shader does wierd things and each chunk takes on a different hue, but that's a different problem. At 100 lights attached to my player I could get 40fps while moving. Once I stopped moving fps went back up.
from godot_voxel.
Makes sense. I'm not familiar with the green thread term, but BlockThreadManager
is just a utility to run an actual thread, or more than one. There isn't any thread pool magic, so there is a chance of thread starvation if too many of them are running.
Also, I'm doing a change to BlockThreadManager
currently, to make processors accept an array of inputs and outputs so they have a chance to batch some operations.
from godot_voxel.
I believe this is a wrong place to ask those questions. FYI, work is underway to change Godot engine to Vulkan, which should not have those limitations any longer.
from godot_voxel.
I believe this is a wrong place to ask those questions. FYI, work is underway to change Godot engine to Vulkan, which should not have those limitations any longer.
Vulkan can`t support wasm(web/js), so Godot may have those limitations for very long time.
Anyway, is it possible to use godot_voxel in games with dynamic terrain that must have some lights (like Minecraft) or we must change game engine?
from godot_voxel.
About the issue overall, this module is definitely not dealing in any way with dynamic lighting. That's Godot's job to support that. The only kind of lighting that could be provided here would be derivatives of baked lighting, like the one Minecraft does. I never thought about an architecture for this as I'm focusing on other areas at the moment.
@afonsolage In theory you could already test lighting with a custom generator, which would produce lit blocks when invoked. I haven't read this article yet though, I'm curious how you would handle removal of point lights. I see you use an additional processing thread, do you think it could be part of the updater one on edition? Or it has different requirements?
from godot_voxel.
What you mean by custom generator? Streams?
The reason why I created a new processing thread is because it's a different and isolated work, which can be done in parallel, but before the updater. I'm changing the blocky flow to become: LOAD -> SPREAD LIGHT -> UPDATE MESH.
But it can be part of the updater, as longer it runs before the mesh processing, since it produces the color data of vertices.
I tough it would be a good idea to have a processor for each specialized parallel work, because I'm assuming each processor is a green thread.
from godot_voxel.
Another approach
According to https://dev.gamedev.net/forums/topic/702924-what-gi-is-usable-right-now/
You can handle doors/windows in other ways. Have two versions of lightprobes near doors/windows with one for open and one for closed, or raytrace only probes that are near doors/windows with only geo primitives, and only when those doors/windows open/close, or etc.
May require ddgi support, that can be built from VCT. (For now Godot uses VCT) godotengine/godot#31405
from godot_voxel.
Thanks for responses. Issue resolved.
It is possible to use Godot and godot_voxel in games with dynamic terrain that must have some lights.
from godot_voxel.
Ok. Go ahead and close the issue. Thanks.
from godot_voxel.
Closing as the issue asks for dynamic lights wich is not the job of this module. Baked lights might be, so if needed please open another issue (although @afonsolage is already working on a baked light system).
from godot_voxel.
Related Issues (20)
- GDExtension API dump wrong type for enum VoxelInstancer::UpMode HOT 3
- So... quick question how would I make the noise larger? HOT 1
- VoxelMeshSDF partition_subdiv description missing info about BAKE_MODE_APPROX_FLOODFILL HOT 1
- VoxelMeshSDF get_aabb() mentions non existant margin property HOT 1
- Dummy page "2" not needed anymore HOT 1
- Assertion printed when previewing last VoxelMeshSDF layer in editor HOT 1
- VoxelModifier preview mesh has gaps with smoothness HOT 3
- Toggling visibility of VoxelModifier does nothing HOT 1
- VoxelModifierMesh changing isolevel does not update preview HOT 1
- Is the VoxelGraphGenerator usable as a base for the generation in a VoxelGenerationScript? HOT 10
- VoxelMeshSDF incorrect BAKE_MODE_ACCURATE_NAIVE description about sign calculation HOT 2
- VoxelMeshSDF BAKE_MODE_ACCURATE_PARTITIONED does not accurately bake PrismMesh HOT 3
- VoxelModifierMesh does not show up under VoxelTerrain HOT 2
- Performing edit on VoxelTerrain that hasn't loaded yet silently fails HOT 6
- Voxel Cubes not texturing. and meshes laggy and unpreforment. HOT 4
- Godot crashes when trying to add any element to the VoxelBlockyTypeLibrary HOT 2
- Error reported using '_GenerateBlock' of 'C #' HOT 3
- VoxelTool.do_* functions do not ignore VoxelModifier on terrain HOT 4
- VoxelModifier get cutout around edited regions HOT 2
- Double custom_build [15073afe3] crash when installing SQLite GDExtension HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot_voxel.