BLaZeKiLL / UE5VoxelTutorial

A collection of voxel mesh generation algorithms
MIT License
107 stars 28 forks source link

[Suggestion] Chunk Materials #14

Open Ayliroe opened 2 years ago

Ayliroe commented 2 years ago

Here's an implementation I found working you can add to your tutorial:

Basically the same code as before, but generates one unique section for each different block material. Straightforward to scale-up (just add materials to the array) and supports both naive/greedy meshing. Maybe you had something in mind too of the like.

BLaZeKiLL commented 2 years ago

I was pondering on the same issue for a while, I was thinking of having 2 Materials (One base martials with texture arrays) and one for fluids like water with some other effects, for a while I as thinking on creating 2 separate meshed that means 2 runs of meshing algorithms which won't be performant, Didn't think of mesh sections. this is a nice scalable solution. I'll be sure to include this and credit you.

Thanks

jorgeEsat commented 2 months ago

What is GetID on the third image?