bevy-voxel-engine icon indicating copy to clipboard operation
bevy-voxel-engine copied to clipboard

Wow impressive engine

Open trsh opened this issue 2 years ago • 9 comments
trafficstars

What are the goals? Any roadmap? Contributions welcome?

trsh avatar Feb 04 '23 09:02 trsh

To goal is to make an easy to use voxel engine for small worlds. Anything beyond 512^3 is probably out of scope.

For the road map, it's mostly done in terms of features. The only things left to do are to make the user facing API much better to allow modular cellular automata and rewrite the whole engine internals to split it into chunks for performance.

Contributions are definitely welcome as long as they are in scope 👍

ria8651 avatar Feb 05 '23 23:02 ria8651

Very neat. Is the concern for anything beyond 512^3 due to memory constraints?

itstheceo avatar May 23 '23 03:05 itstheceo

It's actually due to the compute shaders being unable to handle that volume. The solution would be to split everything into chunks and only update them when needed. But you'd also start getting memory issues quite quickly and need something like this or this to stream in and out the voxels. While it would be quite cool to combine these techniques it would be a huge amount of effort and you'd just end up with Jhon Lins engine.

ria8651 avatar May 23 '23 03:05 ria8651

Haha I have been following Jhon Lin, though he's very elusive.I am trying to find a good frame of reference for an implementation, which strikes a balance between performance and simplicity. Especially when one considers the need for physics and collision. It's really stunned me with where to start, but this project caught my eye. What do you think?

itstheceo avatar May 23 '23 09:05 itstheceo

It's actually due to the compute shaders being unable to handle that volume. The solution would be to split everything into chunks and only update them when needed. But you'd also start getting memory issues quite quickly and need something like this or this to stream in and out the voxels. While it would be quite cool to combine these techniques it would be a huge amount of effort and you'd just end up with Jhon Lins engine.

"You'd just end up with John Lins engine"... not too bad an outcome, if I remember the videos!

In any case, I see you already did the hard work of implementing https://github.com/ria8651/octree-tracer. It's not in bevy, but porting should be possible, or is any feature in bevy missing?

Would that be enough for "infinite bevy-voxel-engine worlds"?

mogambro avatar Oct 10 '23 21:10 mogambro

I've actually already started working on a large-scale voxel renderer in bevy here. It's much better than my original octree-tracer but I haven't made into a nice library or anything yet.

Screenshot 2023-06-24 at 9 54 39 PM

My end goal would be to have the features of both but I've been pretty busy with uni so I haven't worked on it recently.

ria8651 avatar Oct 10 '23 22:10 ria8651

I've actually already started working on a large-scale voxel renderer in bevy here. It's much better than my original octree-tracer but I haven't made into a nice library or anything yet.

Screenshot 2023-06-24 at 9 54 39 PM My end goal would be to have the features of both but I've been pretty busy with uni so I haven't worked on it recently.

That looks insane. Can we try?

trsh avatar Oct 11 '23 08:10 trsh

New project is panicking

2023-10-11T08:42:37.306988Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'main' panicked at C:\Users\janis\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.16.2\src\backend\direct.rs:3019:5:
wgpu error: Validation Error

Caused by:
    In Device::create_buffer
    `MAP` usage can only be combined with the opposite `COPY`, requested BufferUsages(MAP_READ | COPY_DST | STORAGE)


note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

trsh avatar Oct 11 '23 08:10 trsh

I'll have to try this out on a friend's computer, my computer has integrated graphics so it doesn't care about that kind of thing. It should just be a case of having two copies of the buffer with one on the CPU but I'll have to look into the proper way to handle dedicated GPUs.

ria8651 avatar Oct 11 '23 09:10 ria8651