Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.72k stars 251 forks source link

Need Custom Materials for Any Build #679

Closed NeonfireStudio closed 3 months ago

NeonfireStudio commented 3 months ago

I am creating a survival game where you can destroy and place blocks, but with smooth voxels.

Here is a video that shows smooth voxel terrain with destruction features. However, I want to be able to place blocks of different materials, like grass or stone (smooth voxels). It can be done with the do_sphere function, but it's not possible to make it of different materials. Its not possible to create that is shown in the video.

Zylann commented 3 months ago

The way it works in this module is not like this video. It is based on having 4 indices and 4 blending factors per voxel which can blend progressively.

It can be done with the do_sphere function, but it's not possible to make it of different materials

So it can be done or not? There is a demo showing that you can have different materials. Just don't expect to use actual material resources, because that's simply not the way it works with terrains in general. It uses texture arrays instead. Rendering this uses custom shaders and you can actually change that shader to render whatever texture you like. So you can actually get such result. Just through different means, which might need more effort to behave like this.

I guess what the video shows is cool, but "just adding" that without destroying what's in place is work that I currently have no time for at the moment.

NeonfireStudio commented 3 months ago

Thanks for telling me, I will try the demo

NeonfireStudio commented 3 months ago

Its works thanks and sorry for pulling this.