Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a new voxel geometry/model #78

Closed
jensModvig opened this issue Oct 8, 2019 · 5 comments
Closed

How to create a new voxel geometry/model #78

jensModvig opened this issue Oct 8, 2019 · 5 comments

Comments

@jensModvig
Copy link

I am using the blocky terrain of this module and everything is working nicely, I am able to create new blocks easily but they have the in-build geometries of "none" or "cube". Now I am wondering how do I add a new model for one of the voxels. It would be the equivalent of creating something like a fence in a game like minecraft.
Do I need to create a new mesher or is there a simple way that I am not seeing? Like creating a new voxel object of some sort?

@Zylann
Copy link
Owner

Zylann commented Oct 9, 2019

This is more or less supported internally but it's not properly exposed yet. Voxel can contain arbitrary vertices which can already be used by the blocky mesher (split in groups for vertices that lie on the sides of the voxel), there is just no API to modify them.

@jensModvig
Copy link
Author

What is the priority of exposing the geometry shapes and are there any plans on loading the models from a file in the near future?
Otherwise i would probably try make it work, for my little project, I am just worried that I take it in a completely different direction and that it wont be compatible with newer versions of Godot Voxel.

Thank you btw, I was able to modify the code and hardcode a new geometry type by changing the vertices, very simple indeed, very well-made :)
image

@Zylann
Copy link
Owner

Zylann commented Oct 9, 2019

There hasn't been a priority for this recently, but it could be added anytime really, because it has to be done. It's something I want to support :)
Loading from an actual model may also be supported, under a few minor restrictions.

@Zylann
Copy link
Owner

Zylann commented Feb 3, 2020

The custom_blocky_mesh branch has initial support for custom meshes, and also custom AABBs for use with VoxelBlockMover. They don't really interact with the face culling system at the moment but from the few tests I've done they should work.

@Zylann
Copy link
Owner

Zylann commented Mar 8, 2020

Initial support for this has been merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants