Giter Club home page Giter Club logo

voxcraft-sim's Introduction

voxcraft-sim

A GPU accelerated voxel-based physics engine.

Documentation: https://voxcraft.readthedocs.io/en/latest/

More information: https://voxcraft.github.io/design

Installation

Docker (recommended)

Requirements

When building voxcraft-sim the makefile checks if a GPU is available. Thus it is necessary for docker build to be able to see your GPU. To that end install and configure the nvidia-container-runtime.

Installing nvidia runtime

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
   && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
   && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
   
sudo apt-get update && sudo apt-get install -y nvidia-docker2
sudo systemctl restart docker

Build

cd voxcraft-sim
docker build -t voxcraft-sim .

Run

docker run -it --gpus all voxcraft-sim

Google Colab

Google Colab provides a free online GPU environment.

Create a new notebook and go to Menu->Runtime->Change runtime type, select GPU.

Then, run the script:

!git clone https://github.com/voxcraft/voxcraft-sim.git; cd voxcraft-sim/;

print("Source code downloaded.")

!cd voxcraft-sim; rm build -rf; mkdir build; cd build; cmake ..; make -j 10;

print("Executables built.")

!cd voxcraft-sim/build; ./voxcraft-sim -i ../demos/basic/ -o output.xml -f > ../../a.history

print("Simulation done.")

!ls

from google.colab import files
files.download('a.history')

Here is a readonly example notebook

Local install

The most difficult part of compiling this project from scratch is installing the CUDA environment. First, make sure you have NVidia Graphic Cards, then download CUDA 10.1 and install it.

Once you have the CUDA 10.1 environment, the rest is easy:

sudo apt-get update
sudo apt-get install -y git cmake libboost-all-dev

git clone https://github.com/voxcraft/voxcraft-sim.git
cd voxcraft-sim
mkdir build
cd build
cmake ..
make -j 10

Notes

  • Building been tested on a CMAKE versions 3.12 and newer.
  • Versions of boost known to work: 1.65.1 and 1.67.0

Now you will have two executables: voxcraft-sim and vx3_node_worker. Copy them to your environment and the simulation is ready to use.

Try one of the demos:

./voxcraft-sim -i ../demos/basic/ > demo_basic.history

It will produce a demo_basic.history file that is for voxcraft-viz to visualize.

Citation

If you need to cite our work, here is the format:

@MISC{liu_voxcraft_2020,
	title = {Voxcraft-sim, a GPU-accelerated voxel-based physics engine},
	url = {https://github.com/voxcraft/voxcraft-sim},
	howpublished = {\url{https://github.com/voxcraft/voxcraft-sim}},
	author = {Sida Liu and David Matthews and Sam Kriegman and Josh Bongard},
	year = {2020}
	doi = {10.5281/zenodo.3835152},
}

DOI

voxcraft-sim's People

Contributors

pigozzif avatar davidmatthews1uvm avatar mertan-a avatar cfusting avatar liusida avatar

Watchers

James Cloos avatar

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.