
How do games like Space Engineers/Scrap Mechanic make their voxel grids?
Space Engineers 2 voxel grid example
Scrap Mechanic voxel grid example
This isn't me asking for a tutorial. I'm rather interested how in the specific case of games like SE/SM voxel grids are handled. (I personally couldn't find any specific devlogs or technical discussions from them, so if any one of you can find anything do tell).
Some info about them, basically they both are sandbox games without a full voxel/cube world, but Space Engineers have full destructible planets and asteroids with smooth terrain, while they use voxel/block building for spaceships/structure. Similar story in Scrap Mechanic except they have basic heightmap terrain. So the voxel grids are individual per structure, irregular and dynamic in size.
I want to find specifically about their material shading system, the system for my game encodes material ID in the RGB channel of a vertex, so I dont have to pass extra data to the GPU. If SE/SM does this aswell, then their greedy meshing algorithms will be less effective due to not being able to combine multiple materials. But I guess if they do it that way its good enough.
If they dont do this however, and do pass additional material/shading data to the GPU per each grid, how do you reckon they do it? Texture uniforms? Buffer Objects?