Hello,
First of all, I did search and I couldn't find anything on this topic. If there is something, I apologise. From what I now know in my little project, I can't render more than 3600 cubes without massive FPS drops. So I did some homework and I think that Minecraft renders huge amounts of cubes by only rendering the visible faces, and removing the rest. There is a great explanation of it here, and from reading that I think what I need to do is use an A* to find only the visible faces of the cubes, and cull the rest. From there, I only need to recalculate when I add/remove a cube and only for the 6 faces effected.
Trouble is:
a) I've never heard of an A* algorithm until now
b) I don't know how to delete faces of cubes
Does anyone have any insight into how I may achieve this? How can I delete a face from a cube made with addCubeSceneNode and how would I go about creating this A* search to find visible cubes? I'm guessing a beam might come into this.
Thanks for any help.
Deleting unseen cube faces
Re: Deleting unseen cube faces
You can make it simple. I tried to make a little minecraft demo in OpenGL. I solved this by removing adiacent faces when adding new cubes. (adding a cube will possibly modify other 6 cubes). no search algorithm needed for that. Anyway you will find lot of material on the web for the A* algorithm (also said "A star" wich is a pretty slow algorithm). probablu you misunderstood the paper about minecraft. A* is probably used for pathfindin not for faces deletion.
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: Deleting unseen cube faces
Thanks. How do I remove adjacent faces? How do I know if a face is adjacent to another cube?
Re: Deleting unseen cube faces
just looks at coordinates ^^ If a cube is in (0,0,1) and another one is in (0,0,2) you know that they are adiacent. How do you know that in Excell 2 cells are adiacent? exactly in the same way.. but here you have 3 dimensions!
Even better: if you have the cube (0,0,0) you know that you have also to check if there is a cube in (0,0,1) (0,1,0) and (1,0,0). ( in this case you have 3 cubes instead of 6 because you are on the edge of the world.)
Instead of removing faces why don't you simply add visible faces? Divide the world in small (small enough) chunks, then you just creates a list of triangles for each chunks (adding only visible triangles.. the list must be re-created for each chunk when it change this way.)
Instead of removing faces why don't you simply add visible faces? Divide the world in small (small enough) chunks, then you just creates a list of triangles for each chunks (adding only visible triangles.. the list must be re-created for each chunk when it change this way.)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Re: Deleting unseen cube faces
Good advice, thank you. I'll try to figure out how to do it