godot engine module to help with creating/optimizing in-game props.
Go to file
Relintai aca6a61c3d Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
clutter
doc_classes
editor
jobs Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
props Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
singleton Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
.gitignore
LICENSE
README.md
SCsub Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
config.py
prop_ess_entity.cpp
prop_ess_entity.h
prop_instance.cpp Material support for the Propinstance. 2021-04-27 17:32:33 +02:00
prop_instance.h Material support for the Propinstance. 2021-04-27 17:32:33 +02:00
prop_instance_job.cpp
prop_instance_job.h
prop_instance_merger.cpp Made prop_preprocess overrideable. 2021-04-27 16:52:36 +02:00
prop_instance_merger.h Made prop_preprocess overrideable. 2021-04-27 16:52:36 +02:00
prop_instance_prop_job.cpp Added PropinstancePropJob (copy paste of terraman's prop job), and started reworking PropInstance. 2021-04-26 16:29:53 +02:00
prop_instance_prop_job.h Added PropinstancePropJob (copy paste of terraman's prop job), and started reworking PropInstance. 2021-04-26 16:29:53 +02:00
prop_mesher.cpp Added generate_ao and generate_random_ao to PropMesher (From Terraman's prop job.). They are commented out for now. 2021-04-24 22:03:45 +02:00
prop_mesher.h Added generate_ao and generate_random_ao to PropMesher (From Terraman's prop job.). They are commented out for now. 2021-04-24 22:03:45 +02:00
prop_mesher_job_step.cpp Added TYPE_BAKE_VERTEX_COLOR_AO and TYPE_BAKE_VERTEX_COLOR_RAO enum values to PropMesherJobStep. 2021-04-24 22:01:58 +02:00
prop_mesher_job_step.h Added TYPE_BAKE_VERTEX_COLOR_AO and TYPE_BAKE_VERTEX_COLOR_RAO enum values to PropMesherJobStep. 2021-04-24 22:01:58 +02:00
prop_scene_instance.cpp
prop_scene_instance.h
register_types.cpp Added a PropTextureCache singleton, and a PropTextureJob class. 2021-05-17 22:27:10 +02:00
register_types.h

README.md

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