#How do i cull the unseen faces of a cube?
1 messages · Page 1 of 1 (latest)
"back face culling" is the term of art
yeah that
i know what i need to do
just not how to do it in bevy
one id need to have some sort of chunk structure
with cubes inside
Are you using the stock Bevy rendering or some sort of custom approach?
stock bevy
@hard quest might have some advice 🙂
thats why im here
i honestly want to get the core gameplay of breaking and placing blocks before i go into chunks and random world gen
so i dont want to make this world generation thing too complicated
if theres an easy way to not render unseen faces then id prefer to go that way
I think the default cube is going to have all 6 faces regardless of what's next to it
You can't really get far in a voxel game without some form of chunking, it's just too many entities
hmm ok then
ill try and figure it out
i just got one glitch where if a cube is beside another the overlapping faces tear a bit
i really just wanna hide those faces
ive decided to hand make my own cube mesh but my program is panicking
so thats not good
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
heres the code i used to generate the mesh
from what i can see the error is in this file
using the backtracing
something is up with my positions it seems
nvm fixed it i formatted my stuff wrong
now i just need it to look like a cube
Ideally you don't add the vertex data to the mesh at all if the face isn't visible
yeah as of right now it works (i just ignore the indices for said face) but it could be something to look into
its a little complicated and probably horribly inneficient
There's blackface culling, but that doesn't help if meshes would occlude each other. For something Minecraft like, you'd want an entire custom rendering setup with chunked rendering and probably some custom culling.