Closed Somshekardsi closed 3 years ago
The idea to achieve the second image is split the textures UV in 16x16 (total number voxel of area) using only the texturation code.
For this implementation you need change two functions("Execute" and "CalculateVertex" ) inside the script "BuildChunkJob". I write this modification of the code:
However the texturization of the voxels presents problems with interpolation (voxels with don't fill his full area) and problems of orientation (incorrect uv direction in the voxels), because the texturization code need improvements. You can see other problems related here: https://github.com/Javier-Garzo/Marching-cubes-on-Unity-3D/issues/5.
Some result that i archieve with the code modification:
if you increase the variable "uvOffset ", you can get that low resolution style:
const float uvOffset = 0.01f;
Thank you, @Javier-Garzo for your helpful response. I'll try.
Hi,
How to apply texture to the whole chunk same as the right part of the picture?
The left part of the picture is current texturing.