Code Monkey home page Code Monkey logo

vx_bevy's Introduction

vx_bevy

Voxel engine prototype using rust and bevy. (Also check out my raytraced voxel engine)

Note This respository won't receive further updates to newer bevy versions. Thus current code may require modifications to port to newer bevy versions.

A minecraft-esque voxel engine rendering prototype made using the Bevy game engine.

Chunk are rendered using a triangle mesh per chunk. Chunks are greedily meshed.

Meshing and generation tasks are using bevy's AsyncComputeTaskPool to dispatch tasks across frame to prevent frame stuttering.

Performance is okayish (~100fps on a 1060 + 8th gen intel on release mode) with default render distance (16 chunks) altough mesh stitching could allow this to go even higher up.

Also don't go under the world.

Screenshots

assets/screenshots/vx_bevy_0.jpg assets/screenshots/vx_bevy_1.jpg assets/screenshots/vx_bevy_2.jpg

Acknowledgments

This was ported to bevy 0.10.0 thanks to the efforts of @naomijub with help from @hans-pistor.

Ported to bevy 0.11.3 thanks to @juliohq.

Ported to bevy 0.12.0 thanks to @rparrett.

This uses the awesome block-mesh crate which handles greedy meshing.

vx_bevy's People

Contributors

game4all avatar hans-pistor avatar juliohq avatar meyerzinn avatar naomijub avatar rparrett avatar vilunov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vx_bevy's Issues

Port to bevy 0.9

  • Port voxel terrain pipeline to bevy's material system.
  • Add emissive materials (using bloom post processing effect)
  • Add support for directionnal shadows.
  • Add FXAA

Question about goal of this project.

Iโ€™m also somewhat working on a Voxel engine at the moment based on block-mesh as well and perhaps wanted to make some pull request but before I were to do that Iโ€™m curious what exactly you see this repo being used for. Do you see it as like a general purpose voxel engine for people using rust maybe something like the Godot-Voxel plugin for Godot. Or do you see it more as of something like Minetest? Just curious as to what the goal of the project is exactly.

Simdnoise doesn't support non-x86

For anyone trying to get the world generation to work on a non-x86-target, you need to patch the 3.1.6 version of simdnoise with this commit verpeteren/rust-simd-noise@23c6905 .

I made a fork of simdnoise which does the trick for me:

simdnoise = { git = "https://github.com/merlinfuchs/rust-simd-noise", branch = "3.1.6-patch" }

Feel free to close this, just leaving this here if anyone runs into the same problem.

Update to Bevy 0.10

https://bevyengine.org/learn/migration-guides/0.9-0.10/

Cargo outdated -R shows:

Name             Project  Compat  Latest  Kind    Platform
----             -------  ------  ------  ----    --------
bevy             0.9.1    ---     0.10.0  Normal  ---
bevy_atmosphere  0.5.0    ---     0.6.0   Normal  ---
bevy_egui        0.17.1   ---     0.20.2  Normal  ---
bitflags         1.3.2    ---     2.0.2   Normal  ---
once_cell        1.16.0   1.17.1  1.17.1  Normal  ---
thread_local     1.1.4    1.1.7   1.1.7   Normal  ---

The following crates can be updated without any problems:

thread_local = "1.1.7"
once_cell = "1.17.1"
simdnoise = "3.1.6"
bitflags = "2.0.2"

Look into raymarching for chunk rendering

Raymarching chunk bounding boxes with raymarching and instanced rendering should hopefully yield better results than mesh based rendering of voxels at the cost of more GPU memory usage but that's a fair tradeoff I guess.

Q: Convert into Bevy Plugin?

Do you plan to turn this project into a bevy plugin, or do you intend to keep it more or less separate like a derivative engine?

Port to bevy 0.8

I should clean my stupids hacks and use bevy's storage buffer abstraction

Custom meshes

There is no possibility yet to make a custom meshes, only default voxels?

Plugin-ize and package for release

There's a few roadblocks preventing this from being released as a plugin in its current state:

  • Expose a better resource API for managing loaded chunks.
  • Add events / a way to plug in custom world generation.
  • Rework the material system to be extendable by the user.

And more that I may have missed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.