2D version of my props module.
Go to file
2022-02-25 09:14:57 +01:00
clutter Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
doc_classes Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
editor Added a Transform2D property to PropDataEntry, and also changed the processor api to use Transform2Ds. I did not yet remove the 3D transforms, as it would break too much code right now. 2022-02-22 19:05:10 +01:00
jobs Removed job steps, as 2d will not need lods. 2022-02-22 14:27:39 +01:00
lights Initial working prototype for TiledWall2D. 2022-02-22 23:38:45 +01:00
material_cache Make 2d tiled walls pixel perfect, just like the engine expects. 2022-02-23 08:59:52 +01:00
props Updated the virtual method bindings in PropDataEntry. 2022-02-25 09:14:57 +01:00
singleton Added default_pixels_per_unit property to the Prop2DCache singleton. 2022-02-23 09:36:45 +01:00
tiled_wall Turn off lights for the TiledWall. 2022-02-23 15:36:34 +01:00
.gitignore Initial commit. 2021-11-23 16:53:47 +01:00
config.py Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
LICENSE Started over. Added everythong from the props module again. 2022-02-21 17:09:00 +01:00
prop_2d_ess_entity.cpp Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_ess_entity.h Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_instance_job.cpp Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_instance_job.h Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_instance_merger.cpp Removed multiple material support from the MaterialCache. Multiple material support was built for lods, and it's not needed here. 2022-02-23 02:34:15 +01:00
prop_2d_instance_merger.h Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_instance_prop_job.cpp Removed multiple material support from the MaterialCache. Multiple material support was built for lods, and it's not needed here. 2022-02-23 02:34:15 +01:00
prop_2d_instance_prop_job.h Removed job steps, as 2d will not need lods. 2022-02-22 14:27:39 +01:00
prop_2d_instance.cpp Started reworking TiledWall. 2022-02-22 21:41:09 +01:00
prop_2d_instance.h Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_mesher.cpp Now tiled wall is editable in the editor with the rect selection thing. 2022-02-23 10:04:52 +01:00
prop_2d_mesher.h Now tiled wall is editable in the editor with the rect selection thing. 2022-02-23 10:04:52 +01:00
prop_2d_scene_instance.cpp Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
prop_2d_scene_instance.h Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
README.md Add 2D postfix to the classes. 2022-02-21 22:12:25 +01:00
register_types.cpp Removed job steps, as 2d will not need lods. 2022-02-22 14:27:39 +01:00
register_types.h Update the include guards. 2022-02-21 22:07:03 +01:00
SCsub Look for terraman 2d instead of just terraman. 2022-02-23 00:15:25 +01:00

Prop2Ds 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: Prop2D Instance will use this to merge textures.
Thread Pool: Prop2D Instance will use this for multithreaded generation.

Prop2DData

Prop2Ds 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.

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

Prop2DDataEntries

These are the classes that actually store data.

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

//Whether or not this Prop2DDataEntry 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<Prop2DData> prop_data, Node *node, const Transform &transform);

//Turn Prop2DDataEntry 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 Prop2DDataScene, or Prop2DDataProp2D.
virtual bool _processor_evaluate_children();

Prop2DInstances

Prop2DInstances are not yet finished.

They will be able to merge meshes, texture etc from a Prop2D, 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.

Prop2DUtils Singleton

The Prop2DUtils singleton helps with scene->prop conversion.

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

Scene conversion

You can either click the new "To Prop2D" 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