javascript - Threejs create optimized mesh from 2d array -
what want achieve creating voxel environment, 2d array holds positions blocks.
currently i'm doing using basic cube geometry, it's slow, , has unnecessary faces on sides of of cubes, , bottoms.
how can generate optimized mesh? i'm assuming detect neighbors , decide faces generate there.
my data irregular shape, looks this:
the white areas there should mesh, , black areas there shouldn't anything. (i have converted 2d array of points)
i'm bit lost on how go doing this. looked @ http://threejs.org/examples/#webgl_geometry_minecraft thats generating square world, not 1 holes , stuff in it.
so how go doing this? there code guys possibly post me out?
any appreciated :)
Comments
Post a Comment