Original Post
Hey guys,
Question 1.
I'm pretty far into the development of a Minecraft clone (it's my first 3D project), and I've decided it's time I rewrite the rendering part of the engine.
At the moment I've got chunkBuilder class that takes in cube data, such as position, texture, brightness, and drawing options (for the removal of redundant faces), and then sends them to the GPU as an interleaved VBO. I get a very good frame rate using this system (as it only has to occur once for each chunk - the world consists of many 16x16x16 chunks), a good 500-800FPS is the norm.
However, I get HUGE FPS drops when it comes to terrain modification. Only for a short second, but it's noticeable. I've been looking into threading the chunkBuilder, but I've done a few tests with threads and I've noticed that its not very feasible (keep in mind that at the launch of the game, it's got to create 16x16x16 threads to buffer the initial chunks). Obviously threading is the way to go, and I've still not lost hope, but I would be extremely grateful if someone who has experience with large-scale voxel rendering could give me some advice as to how I should be setting this threading up, for example, should I create 1 thread per 'column' of chunks, and if possible any tips on speeding up the rendering process in general?
Question 2.
Jumping is a rather annoying feature I'm having trouble implementing, it seems to work fine on the average computer with a good frame rate, but it begins to 'mess up' on computers with lower rendering speeds. I know the cause of the problem - the fact that I'm multiplying the velocity by timeElapsed to smoothen the movement on different computers, but this is causing height differences when jumping. Is there any other way to fix this problem? Or would I be better off just not apply timeElapsed to the y position of the player?
Thats all my questions!!
Thanks for the help,
Matt.
Oh, wait, one last thing! Is it possible to create an indexed, interleaved vbo that doesn't share texture/colour data? I've read that it's a bad idea and I should just stick with your average VBO, but and index buffer would allow me to quickly remove blocks by just setting the indices to 0.
Question 1.
I'm pretty far into the development of a Minecraft clone (it's my first 3D project), and I've decided it's time I rewrite the rendering part of the engine.
At the moment I've got chunkBuilder class that takes in cube data, such as position, texture, brightness, and drawing options (for the removal of redundant faces), and then sends them to the GPU as an interleaved VBO. I get a very good frame rate using this system (as it only has to occur once for each chunk - the world consists of many 16x16x16 chunks), a good 500-800FPS is the norm.
However, I get HUGE FPS drops when it comes to terrain modification. Only for a short second, but it's noticeable. I've been looking into threading the chunkBuilder, but I've done a few tests with threads and I've noticed that its not very feasible (keep in mind that at the launch of the game, it's got to create 16x16x16 threads to buffer the initial chunks). Obviously threading is the way to go, and I've still not lost hope, but I would be extremely grateful if someone who has experience with large-scale voxel rendering could give me some advice as to how I should be setting this threading up, for example, should I create 1 thread per 'column' of chunks, and if possible any tips on speeding up the rendering process in general?
Question 2.
Jumping is a rather annoying feature I'm having trouble implementing, it seems to work fine on the average computer with a good frame rate, but it begins to 'mess up' on computers with lower rendering speeds. I know the cause of the problem - the fact that I'm multiplying the velocity by timeElapsed to smoothen the movement on different computers, but this is causing height differences when jumping. Is there any other way to fix this problem? Or would I be better off just not apply timeElapsed to the y position of the player?
Thats all my questions!!
Thanks for the help,
Matt.
Oh, wait, one last thing! Is it possible to create an indexed, interleaved vbo that doesn't share texture/colour data? I've read that it's a bad idea and I should just stick with your average VBO, but and index buffer would allow me to quickly remove blocks by just setting the indices to 0.