jameshiew / ave

🌍 Voxel and world generation demo in Rust
MIT License
13 stars 1 forks source link

Expected render speed? Voxel selection? #26

Open davideps opened 4 years ago

davideps commented 4 years ago

This project looks really interesting. Thank you for sharing it! I have two questions:

My computer includes a NVIDIA GeoForce GTX 1070, but I'm seeing one frame per second performance. Are there any settings that might improve performance?

Is there any way to select a voxel or the containing object (pile of voxels / mountain) ?

jameshiew commented 4 years ago

Hey, thanks for taking an interest in this project!

My computer includes a NVIDIA GeoForce GTX 1070, but I'm seeing one frame per second performance. Are there any settings that might improve performance?

Unfortunately there probably isn't much you can do without making significant changes to the code. You can try lowering the render distance in default.rs (though it is already at 2 chunks...), you could also switch to a type of world generation that doesn't generate as many blocks (see https://github.com/jameshiew/ave/blob/master/src/world.rs#L181 and worldgen.rs). I haven't profiled but I'm fairly certain that a main reason for the slow rendering is that there is a draw call to the GPU per every visible block, rather than per visible chunk. The offending for-loop is about https://github.com/jameshiew/ave/blob/9964d21330ca5e282fa666f78b5ce83048dde865/src/world_renderer.rs#L44-L63

Is there any way to select a voxel or the containing object (pile of voxels / mountain) ?

There is no way currently and I probably won't work on this project any more (though may accept PRs), as I've started work on another (currently closed source) voxel engine in Rust.

I'd recommend looking at https://github.com/Technici4n/voxel-rs if you are interested in voxel game programming with Rust - it is much more featureful and performs well because it is economical with how it interacts with the GPU, amongst other things.

davideps commented 4 years ago

Thanks for replying James. I'll look at voxel-rs. Have a great week.

On Mon, Jun 15, 2020 at 8:59 PM James Hiew notifications@github.com wrote:

Hey, thanks for taking an interest in this project!

My computer includes a NVIDIA GeoForce GTX 1070, but I'm seeing one frame per second performance. Are there any settings that might improve performance?

Unfortunately there probably isn't much you can do without making significant changes to the code. You can try lowering the render distance in default.rs (though it is already at 2 chunks...), you could also switch to a type of world generation that doesn't generate as many blocks (see https://github.com/jameshiew/ave/blob/master/src/world.rs#L181 and worldgen.rs). I haven't profiled but I'm fairly certain that a main reason for the slow rendering is that there is a draw call to the GPU per every visible block, rather than per visible chunk. The offending for-loop is about https://github.com/jameshiew/ave/blob/9964d21330ca5e282fa666f78b5ce83048dde865/src/world_renderer.rs#L44 .

Is there any way to select a voxel or the containing object (pile of voxels / mountain) ? There is no way currently and I probably won't work on this project any more (though may accept PRs), as I've started work on another (currently closed source) voxel engine in Rust.

I'd recommend looking at https://github.com/Technici4n/voxel-rs if you are interested in voxel game programming with Rust - it is much more featureful and performs well because it is economical with how it interacts with the GPU, amongst other things.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jameshiew/ave/issues/26#issuecomment-644282405, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANTN7KS6XSFCRVQZXVRNJDRWZOOFANCNFSM4NSZMCNQ .