godot engine module to help with creating/optimizing in-game props.
Go to file
2021-08-27 19:26:16 +02:00
clutter Update the copyright texts for 2021. 2021-04-19 10:12:27 +02:00
doc_classes Typo fix in config.py. Sync classref to the current source. 2020-04-18 02:37:34 +02:00
editor A stab at generating room points. This might need to be thrown out. Committing for fututre reference. Also fixed the other tools menu options. 2021-08-13 22:58:12 +02:00
jobs Moved PropMesherJobStep to the jobs folder. 2021-08-09 11:23:40 +02:00
lights Renamed the world position property to just position in PropLight. 2021-08-11 18:18:03 +02:00
material_cache Only call initial_setup_default on the main thread, and document that shader duplication can crash if done from a different thread. Removed the material mutex from the prop cache as it's not needed anymore. 2021-08-25 17:24:25 +02:00
props Also copy _is_room and _room_bounds in PropData::copy_from. 2021-08-26 20:51:16 +02:00
singleton Only call initial_setup_default on the main thread, and document that shader duplication can crash if done from a different thread. Removed the material mutex from the prop cache as it's not needed anymore. 2021-08-25 17:24:25 +02:00
tiled_wall Cleanups to the collision shape code in TiledWall. Still unfinished though. 2021-08-25 22:54:00 +02:00
.gitignore Moved everything that is prop related from Voxelman to here. Note that Voxelman is required for this to compile for now. This will be fixed soon. 2020-04-03 09:23:01 +02:00
config.py Now TiledWalls can be serialized into props. 2021-08-18 18:06:09 +02:00
LICENSE Update the copyright texts for 2021. 2021-04-19 10:12:27 +02:00
prop_ess_entity.cpp Added a few skeleton classes. 2020-04-03 13:45:55 +02:00
prop_ess_entity.h Fix build for 4.0. 2020-04-09 12:36:33 +02:00
prop_instance_job.cpp Fix re-baking meshes after prop data assing. 2021-08-10 17:10:05 +02:00
prop_instance_job.h Fixed quite a few issues with the prop instance merger's logic. 2021-08-10 12:23:53 +02:00
prop_instance_merger.cpp Check whether the cache has materials instead of whether it's initialized or not in PropInstanceMerger::_build. 2021-08-25 23:42:23 +02:00
prop_instance_merger.h Added collision layer and mask support to PropInstance. 2021-08-25 22:21:34 +02:00
prop_instance_prop_job.cpp Make sure PropInstancePropJob generates mesh when the prop only has tiled walls. 2021-08-27 19:26:16 +02:00
prop_instance_prop_job.h Fixed collision shape positions in PropInstanceMerger. Also improved it's collision shape / physics body handling. 2021-08-25 20:37:37 +02:00
prop_instance.cpp Reverse the order of the getter and setter to match the style I use. 2021-08-25 22:29:00 +02:00
prop_instance.h Reverse the order of the getter and setter to match the style I use. 2021-08-25 22:29:00 +02:00
prop_mesher.cpp Only transform the normal with the basis. 2021-08-18 18:45:40 +02:00
prop_mesher.h Implemented texture rects for the tiled wall mesher. 2021-08-18 16:16:09 +02:00
prop_scene_instance.cpp Fix compile for 4.0. 2021-02-06 11:54:57 +01:00
prop_scene_instance.h Added PropSceneInstance, and added a processor for it. 2020-07-06 22:02:22 +02:00
README.md Fix compile for 4.0. 2021-02-06 11:54:57 +01:00
register_types.cpp Now TiledWalls can be serialized into props. 2021-08-18 18:06:09 +02:00
register_types.h Update the copyright texts for 2021. 2021-04-19 10:12:27 +02:00
SCsub Now TiledWalls can be serialized into props. 2021-08-18 18:06:09 +02:00

Props Module

This is a c++ engine module for the Godot Engine.

It gives you props, and editor utilities to convert scenes to props.

It supports both godot 3.2 and 4.0 (master last tested commit). Note that since 4.0 is still in very early stages I only check whether it works from time to time.

Pre-built binaries

You can grab a pre-built editor binary from the Broken Seals repo, should you want to. It contains all my modules.

Optional Dependencies

Mesh Data Resource: Support for merged meshes, even in gles2.
Texture Packer: Prop Instance will use this to merge textures.
Thread Pool: Prop Instance will use this for multithreaded generation.

PropData

Props are basicly 3D scenes in a simple format, so other things can easily process them without instancing.

For example if you create a building from MeshDataInstances, and then convert that scene to a prop, Voxelman can spawn it, merge it's meshes, and create lods without any scene instancing.

PropData is the main class you'll use, it's main purpose it to store a list of PropDataEntries.

PropDataEntries

These are the classes that actually store data.

They contain 4 methods for scene->prop conversion, namely:

//Whether or not this PropDataEntry can process the given Node.
virtual bool _processor_handles(Node *node);

//Save the given Node into the given prop_data any way you like, at tranform.
virtual void _processor_process(Ref<PropData> prop_data, Node *node, const Transform &transform);

//Turn PropDataEntry back into a Node
virtual Node *_processor_get_node_for(const Transform &transform);

//Whether the system should skip evaluating the children of a processes Node or not. See PropDataScene, or PropDataProp.
virtual bool _processor_evaluate_children();

PropInstances

PropInstances are not yet finished.

They will be able to merge meshes, texture etc from a Prop, and also generate lods for it.

Essentially they will be a more advanced MeshInstance.

Voxelman implements all of this, just haven't finished porting it yet.

PropUtils Singleton

The PropUtils singleton helps with scene->prop conversion.

You can register new PropDataEntries as processors, should you need to.

Scene conversion

You can either click the new "To Prop" button on the menubar of the 3D scene for a quick conversion, or look into Project->Tools.

Building

  1. Get the source code for the engine.

If you want Godot 3.2: git clone -b 3.2 https://github.com/godotengine/godot.git godot

If you want Godot 4.0: git clone https://github.com/godotengine/godot.git godot

  1. Go into Godot's modules directory.
cd ./godot/modules/
  1. Clone this repository
git clone https://github.com/Relintai/props props
  1. Build Godot. Tutorial