- Home /
Question by
oblivion1818 · Jan 19, 2014 at 09:06 PM ·
procedural-generationgeneral programming
Texturing Marching Cubes terrain when digging
Hi,
So I have built a voxel game world using a marching cubes algorithm. I generate a 10x10 grid of game objects for the surface each using marching cubes and generating a scripted mesh. The surface also has hills generated with a fractal generator. It is textured with grass tiles at the moment which looks fine, however when I dig I want it to change to soil both under the ground and directly around the hole.
I have looked into this http://wiki.unity3d.com/index.php?title=LayerShader however I am not sure how to change the alpha layer in real time and when I put on test alpha layers it tiles over all of the game objects where I only want it to effect the one I am on.
Thank you for any help.
Comment
Your answer