mesh_data_resource/README.md

68 lines
2.0 KiB
Markdown
Raw Normal View History

2020-07-28 15:51:08 +02:00
# Mesh data resource Module
2020-07-28 15:53:03 +02:00
A c++ Godot engine module, that adds a resource, which contains raw mesh data for merging and collider information.
2020-07-28 15:51:08 +02:00
The module also comes with importers (gltf, and collada for now), you can import 3d models as MeshDataResources with these.
2020-07-28 15:53:03 +02:00
## Optional Dependencies
2020-07-28 15:51:08 +02:00
2020-07-28 15:53:03 +02:00
`https://github.com/Relintai/props`: If present, you also get a prop importer for MeshDataInstances.
2020-07-28 15:51:08 +02:00
2020-07-28 15:53:03 +02:00
## Pre-built binaries
2020-07-28 15:51:08 +02:00
You can grab a pre-built editor binary from the [Broken Seals](https://github.com/Relintai/broken_seals/releases)
repo, should you want to. It contains all my modules.
2020-07-28 15:53:03 +02:00
## MeshDataResource
2020-07-28 15:51:08 +02:00
The resource that holds mesh and collider data.
2020-07-28 15:53:03 +02:00
## MeshDataResourceCollection
2020-07-28 15:51:08 +02:00
Holds a list of MeshDataResources.
2020-07-28 15:53:03 +02:00
## MeshDataInstance
2020-07-28 15:51:08 +02:00
You can easily put MeshDataResources into the scene with these. They are equivalent to MeshInstances, except they work
with MeshDataResources.
2020-07-28 15:53:03 +02:00
## Importers
2020-07-28 15:51:08 +02:00
In order to import a 3d model as a MeshDataResource, select the model, go to the import tab, and switch the import type to `<type> MDR`. Like:
2020-07-28 15:53:03 +02:00
![Import Tab](screenshots/import.png)
2020-07-28 15:51:08 +02:00
If you set the import type to single, the importers will convert the first model that they encounter into a MeshDataResource, then save that,
if you set it to multiple, you get a MeshDataResourceCollection as the main resource, and also all encountered models as files separately.
Since MeshDataResource can hold collider information, these importers can create this for you. There are quite a few options for it:
2020-07-28 15:53:03 +02:00
![Colliders](screenshots/import2.png)
2020-07-28 15:51:08 +02:00
2020-07-28 15:53:03 +02:00
## Building
2020-07-28 15:51:08 +02:00
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```
2. Go into Godot's modules directory.
```
cd ./godot/modules/
```
3. Clone this repository
```
git clone https://github.com/Relintai/mesh_data_resource mesh_data_resource
```
4. Build Godot. [Tutorial](https://docs.godotengine.org/en/latest/development/compiling/index.html)