Portal rendering / culling module for Godot
Go to file
2019-11-19 11:28:02 +00:00
images Delete lportal_boxrooms.jpg 2019-10-23 11:22:54 +01:00
config.py Add files via upload 2019-09-11 08:09:36 +01:00
INSTRUCTIONS.md Update INSTRUCTIONS.md 2019-11-19 11:28:02 +00:00
larea.cpp More realtime support 2019-11-19 10:29:53 +00:00
larea.h More realtime support 2019-11-19 10:29:53 +00:00
lbitfield_dynamic.cpp Dynamic objects now working 2019-09-13 19:15:25 +01:00
lbitfield_dynamic.h Dynamic objects now working 2019-09-13 19:15:25 +01:00
lbound.cpp More debugging support 2019-09-18 11:04:02 +01:00
lbound.h More debugging support 2019-09-18 11:04:02 +01:00
ldebug.cpp More realtime support 2019-11-19 10:29:53 +00:00
ldebug.h More realtime support 2019-11-19 10:29:53 +00:00
ldob.cpp More realtime support 2019-11-19 10:29:53 +00:00
ldob.h More realtime support 2019-11-19 10:29:53 +00:00
lhelper.cpp Working with box rooms demo 2019-10-22 20:44:17 +01:00
lhelper.h Working with box rooms demo 2019-10-22 20:44:17 +01:00
LICENSE Initial commit 2019-09-11 08:04:27 +01:00
lmain_camera.cpp More realtime support 2019-11-19 10:29:53 +00:00
lmain_camera.h More realtime support 2019-11-19 10:29:53 +00:00
lplanes_pool.cpp Improved pool 2019-09-25 07:48:35 +01:00
lplanes_pool.h Improved pool 2019-09-25 07:48:35 +01:00
lportal_all.cpp More realtime support 2019-11-19 10:29:53 +00:00
lportal.cpp More realtime support 2019-11-19 10:29:53 +00:00
lportal.h Preliminary lighting support 2019-10-09 11:33:19 +01:00
lroom_converter.cpp More realtime support 2019-11-19 10:29:53 +00:00
lroom_converter.h More realtime support 2019-11-19 10:29:53 +00:00
lroom_manager.cpp More realtime support 2019-11-19 10:29:53 +00:00
lroom_manager.h More realtime support 2019-11-19 10:29:53 +00:00
lroom.cpp More realtime support 2019-11-19 10:29:53 +00:00
lroom.h More realtime support 2019-11-19 10:29:53 +00:00
lscene_saver.cpp Working with box rooms demo 2019-10-22 20:44:17 +01:00
lscene_saver.h Working with box rooms demo 2019-10-22 20:44:17 +01:00
ltrace.cpp More realtime support 2019-11-19 10:29:53 +00:00
ltrace.h More realtime support 2019-11-19 10:29:53 +00:00
lvector.h More realtime support 2019-11-19 10:29:53 +00:00
README.md Update README.md 2019-11-18 09:24:17 +00:00
register_types.cpp Refactor LRooms and LPortals to no longer be part of scene graph 2019-09-15 15:39:01 +01:00
register_types.h Add files via upload 2019-09-11 08:09:36 +01:00
SCsub Optional convex hull bound for rooms 2019-09-17 14:30:31 +01:00

godot-lportal

Portal rendering / Occlusion culling module for Godot 3.2
Note that this is a Work in progress. It is recommended to wait for a first release.

plane_lines

Video of initial testing:
https://www.youtube.com/watch?v=uVwLltiouBs
https://www.youtube.com/watch?v=xF_3Fe2HRdk
https://www.youtube.com/watch?v=NmlWkkhGoJA

Demos / Tutorials

https://github.com/lawnjelly/lportal-demos

Feel free to leave suggestions / feature requests on the issue tracker, especially regarding ease of use.

Current status

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.

I'm now working again on dynamic lights and realtime lighting:
https://www.youtube.com/watch?v=1WT5AXZlsDc
I've got dynamic lights and culling shadow casters to camera frustum working which should speed things up quite a bit. This is not in the master branch yet, still work in progress.

Am currently working on global directional lights (think the sun). Global lights don't emanate from a room, therefore they must be handled differently in order to avoid having every object as a shadow caster. I'm doing this by allowing the user to specify 'areas', which are groups of rooms, and the global light when registered will affect an area (e.g. 'area_outside').

Roadmap

  • Auto conversion of named room spatials and portal mesh instances to LRoom and LPortal DONE

  • Auto creation of mirror portals DONE

  • Recursive determine visibility DONE

  • Prevent memory allocations (use pools for plane vectors) DONE

  • Add support for objects moving between rooms - cameras, players, physics etc - DONE

  • Refactor code, moving LRooms and LPortals outside scene graph DONE

  • Cleanup code, Optimize DONE

  • Handle special cases (multiple portals views into room etc) DONE

  • Optimize non-moving statics DONE

  • Optional convex hull bound for rooms DONE

  • Add debug graphical view of portal planes DONE

  • Add debug graphical view of room bounds DONE

  • Dealing with shadows from objects outside of view PARTIALLY DONE

  • Universal visibility query for camera and dynamic lights DONE

  • Support for global directional lights (like the sun) ONGOING

  • Building baked lightmap workflow ONGOING

  • Bug fixing / testing ONGOING

  • Shadow caster optimization

  • Closable portals

  • PVS (primary and secondary)

Instructions

See INSTRUCTIONS.md and TUTORIAL

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.