godot-lportal/README.md

72 lines
3.8 KiB
Markdown
Raw Normal View History

2019-09-11 09:04:27 +02:00
# godot-lportal
2019-11-28 13:29:46 +01:00
Portal rendering / Occlusion culling module for Godot 3.2
2019-11-20 13:20:07 +01:00
You can either use LPortal as a full occlusion culling system if you can create your level as rooms and portals, or use it in a simplified single room mode to speed up culling in any 3d level.
2019-11-26 21:47:21 +01:00
Note that this is a _Work in progress_. Feel free to try out the latest version (master) but recognise that the API may change as I move towards first release.
2019-09-18 14:33:19 +02:00
2019-10-23 12:22:22 +02:00
![plane_lines](images/lportal_boxrooms3.jpg)
2019-09-23 12:29:07 +02:00
2019-09-16 19:07:22 +02:00
Video of initial testing:\
2019-10-22 21:51:58 +02:00
https://www.youtube.com/watch?v=uVwLltiouBs \
2019-09-16 19:07:22 +02:00
https://www.youtube.com/watch?v=xF_3Fe2HRdk \
2019-09-16 19:06:34 +02:00
https://www.youtube.com/watch?v=NmlWkkhGoJA
2019-09-15 20:38:42 +02:00
2019-10-22 21:51:58 +02:00
### Demos / Tutorials
https://github.com/lawnjelly/lportal-demos
2019-10-09 12:33:19 +02:00
_Feel free to leave suggestions / feature requests on the issue tracker, especially regarding ease of use._
2019-09-15 20:36:47 +02:00
2019-09-14 13:10:48 +02:00
## Current status
2019-12-03 17:25:51 +01:00
As everything is now basically working, aside from bug fixing, my next stage is to build a demo game to show off the module and better test everything, probably a simple first person shooter.
The external lightmapping workflow is now basically working, as described in the instructions. This allows a higher quality result than is currently possible with the Godot lightmapper. LPortal can export your level as a collada (dae) file which you can uv map and bake a lightmap in blender. Note that I'm not yet exporting the materials, I may add this later as this will enable the material colours and properties to affect the baked lightmap (e.g. a green wall will reflect green colour).
2019-11-26 21:47:21 +01:00
2019-10-22 21:51:58 +02:00
The first demo tutorial (see above) is now working with the internal godot baked lightmap workflow. It shows registering dynamic objects (DOBs), loading and unloading levels.
2019-10-19 18:01:22 +02:00
2019-11-20 11:42:05 +01:00
Dynamic lights are now working, both global (directional lights) and local (omnis and spotlights):\
2019-11-28 13:29:46 +01:00
https://www.youtube.com/watch?v=1WT5AXZlsDc
2019-10-23 17:04:47 +02:00
2019-12-03 17:25:51 +01:00
I have added a single room mode, which allows LPortal to speed up culling in games that haven't even been designed as rooms and portals.
2019-11-20 11:42:05 +01:00
2019-11-20 13:16:28 +01:00
## Instructions
2019-11-26 21:48:33 +01:00
* [OVERVIEW](OCCLUSION_CULLING.md)
2019-11-26 13:29:06 +01:00
* [INSTRUCTIONS](INSTRUCTIONS.md)
* [INSTRUCTIONS for single room mode](INSTRUCTIONS_SINGLEROOM.md)
2019-11-20 13:16:28 +01:00
* [TUTORIAL](https://github.com/lawnjelly/lportal-demos/tree/master/Tutorial-Simple)
2019-09-14 13:10:48 +02:00
2019-09-11 21:23:17 +02:00
## Roadmap
* Auto conversion of named room spatials and portal mesh instances to LRoom and LPortal DONE
* Auto creation of mirror portals DONE
2019-09-12 17:29:01 +02:00
* Recursive determine visibility DONE
2019-09-12 21:14:52 +02:00
* Prevent memory allocations (use pools for plane vectors) DONE
2019-09-13 20:26:52 +02:00
* Add support for objects moving between rooms - cameras, players, physics etc - DONE
2019-09-15 17:25:43 +02:00
* Refactor code, moving LRooms and LPortals outside scene graph DONE
* Cleanup code, Optimize DONE
2019-09-15 20:33:15 +02:00
* Handle special cases (multiple portals views into room etc) DONE
2019-09-16 16:38:52 +02:00
* Optimize non-moving statics DONE
2019-09-17 15:31:37 +02:00
* Optional convex hull bound for rooms DONE
2019-09-23 12:22:47 +02:00
* Add debug graphical view of portal planes DONE
2019-09-23 13:32:09 +02:00
* Add debug graphical view of room bounds DONE
2019-10-14 16:43:12 +02:00
* Dealing with shadows from objects outside of view PARTIALLY DONE
2019-11-18 10:22:08 +01:00
* Universal visibility query for camera and dynamic lights DONE
* Support for global directional lights (like the sun) ONGOING
2019-10-14 16:43:12 +02:00
* Building baked lightmap workflow ONGOING
2019-09-17 15:31:37 +02:00
* Bug fixing / testing ONGOING
2019-11-18 10:22:08 +01:00
2019-10-14 16:43:12 +02:00
* Shadow caster optimization
2019-09-16 16:38:52 +02:00
* Closable portals
2019-09-15 17:25:43 +02:00
* PVS (primary and secondary)
2019-09-12 17:29:01 +02:00
2019-09-16 16:45:06 +02:00
## Installation
You will need to compile Godot from source (for now). See:
http://docs.godotengine.org/en/3.0/development/compiling/index.html
Once the engine is compiling okay on your system, to add the module:
* Create a folder inside godot/modules called 'lportal'
* Clone / download this repository as a zip file and place the files in the lportal folder
* Compile the engine as normal, it should automatically pick up the lportal module
* Note that to export to other platforms you will also have to compile export templates for those platforms
You will know the installation was successful when you see a new Node type 'LRoomManager' in the Godot IDE.