Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/V-Sekai/godot-subdiv
Godot Engine Module for Fast Subdivision in Godot with opensubdiv
https://github.com/V-Sekai/godot-subdiv
Last synced: 2 months ago
JSON representation
Godot Engine Module for Fast Subdivision in Godot with opensubdiv
- Host: GitHub
- URL: https://github.com/V-Sekai/godot-subdiv
- Owner: V-Sekai
- License: mit
- Fork: true (tefusion/godot-subdiv)
- Created: 2023-01-11T14:42:54.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-11T05:20:24.000Z (8 months ago)
- Last Synced: 2024-07-31T09:11:03.279Z (5 months ago)
- Language: C++
- Homepage:
- Size: 9.15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v-sekai - Fast Subdivision with opensubdiv
README
# Godot Subdiv
This is a modified version of tefusion/godot-subdiv to be a Godot Engine C++ module.
| ![UV Subdivision](UVSubdivision.gif) | ![Skinning subdivision](SkinningSubdivision.gif) |
| ------------------------------------ | ------------------------------------------------ |## Getting Started
### Importing
After installing the addon and enabling it in the settings, you can select the custom **Godot Subdiv Importer** in the import settings for any glb or gltf file. You can also use the **subdivision settings in any scene importer** to be able to make use of all the features of the 3d import pipeline from Godot.
There you will see one option.
SubdivMeshInstance3D
Doesn't bake. Skinning and blend shape changes get processed by CPU and then directly thrown at the RenderingServer. This is useful if you have a changing mesh or changing subdivision level.
Adjust the subdivision level, click reimport and you should see your mesh subdivided.
### Modeling Tips
OpenSubdiv has a great section on [modeling for subdivision](https://graphics.pixar.com/opensubdiv/docs/mod_notes.html). Not all of them apply for Godot Subdiv though: You can currently only import either quad only meshes to use the Catmull-Clark scheme or any other mesh which will default to the Loop subdivision scheme.
### Building the project yourself
To build this project you need to have SCons installed, otherwise everything is included in the project.
For just building and trying out the project, do:
```bash
scons target=template_debug
```in the cloned folder.
For running the tests, do:
```bash
scons -Q tests=1 target=template_debug
```which will run simple doctest tests when starting godot on the terminal:
```bash
path/to/godot --editor --path ${workspaceFolder}/project
```See more in the [SConstruct](SConstruct) file.
## FAQ
### How to create a mesh only containing Quads?
In Blender, you can go in Edit Mode and go Select->Select All by Trait->Faces by Sides and set it to Not Equal To 4. After removing the then selected faces and replacing them with quads, Quad import will work.
## Acknowledgments
- [OpenSubdiv](https://github.com/PixarAnimationStudios/OpenSubdiv) files in [thirdparty/opensubdiv](thirdparty/opensubdiv) licensed under [Modified Apache 2.0](thirdparty/opensubdiv/LICENSE.txt)
- [Godot3 module for opensubdiv](https://github.com/godot-extended-libraries/godot-fire/tree/feature/3.2/opensubdiv-next) by fire that was referenced for subdivision implementation
- [Template used](https://github.com/nathanfranke/gdextension), includes the used GitHub workflow and was easy to set up## License
[MIT](LICENSE)
Third-party notices are in [THIRDPARTY.md](THIRDPARTY.md).