Hi, I’ve been working lots on a custom voxel engine (GridMap didn’t suffice) and have gotten rather far. I have gotten to a… roadblock, Transparent blocks! (and performance… i guess)
Is there a way to go about hiding faces on meshes? It’d be pretty easy to get which face needs to go but i haven’t found anything on actually modifying/hiding the mesh.
are you open to doing some kind of tedious mesh programming? you can use a MeshDataTool to modify your mesh at runtime, and there are a bunch of different things you could do to figure out a ‘hide face’ hack. could delete that face entirely (although you’d need to have some way to put it back i imagine), you could move it to a new invisible surface, you could assign a special vertex color that your shader knows to make 0% alpha, etc
Well, frankly it was originally a question on setting a material per-vert but since that was difficult I figured I’d try to go the more advanced (and better) route
ah okay. i’m pretty sure that the material is a per-triangle thing, and i think that the ‘surface’ of the mesh is which material it is. if you wanted to just set it that way
there is precedent for doing multiple ‘materials’ (actually just one) with a single surface, it’s called ID mapping. basically you set the vertex color (the ‘id’) of a face and then have your shader discriminate them visually
Yeah I was looking into that but that wouldn’t actually help performance at all and I’ve settled on a culling system.
It’s actually going really well, I have a script that will generate a cube with uv maps that can have sides removed without breaking anything. pretty sweet. I actually used opengl tutorial because they are of the same nature