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 does this work? #3

Open
halotroop2288 opened this issue Dec 31, 2023 · 3 comments
Open

How does this work? #3

halotroop2288 opened this issue Dec 31, 2023 · 3 comments

Comments

@halotroop2288
Copy link

I like this plugin approach to voxel rendering, as opposed to the much bigger Godot Voxel Tools module, because it can be loaded on custom builds of the engine without rebuilding the engine.

I am quite confused where the voxel data comes from though. In the examples it seems the TexturedVoxelMesh only takes images as inputs, and if the voxel data is coming from those, I don't understand how I would manipulate it at runtime... Or ever, really. Seeing as the spec doesn't seem to be described anywhere in this repo.

I would really like to try using this plugin if you could clear that up for me. Thanks!

@viktor-ferenczi
Copy link
Owner

viktor-ferenczi commented Aug 15, 2024

The voxel data is loaded as multiple Texture2DArray instances. There is a method to overwrite an entire layer (one item of the array) at a time, which allows for partial updates of the 3D texture. I did not use it on actual voxel textures yet, but had a benchmark to measure the copying speed, which was unsatisfactory. That's why I gave up that time with trying to modify the voxel volumes at runtime.

I plan to fix this plugin for Godot 4.3 later this year and maybe getting more of the features working again.

@viktor-ferenczi
Copy link
Owner

viktor-ferenczi commented Aug 15, 2024

Regarding documentation: Please take a look into the shader files in the plugin. They have the in-memory image format documented. It even has some PBR code for (rough) MagicaVoxel compatibility, just the vox loader is currently missing from the repo (it stopped working with Godot).

@viktor-ferenczi
Copy link
Owner

Godot 4.3 compatibility has just been merged to main. No vox loader yet, but it will eventually come as time allows.

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

No branches or pull requests

2 participants