Giter Club home page Giter Club logo

boids-swarm-dll's Introduction

Boids-Swarm-DLL

A DLL which runs a Boids Swarm simulation on GPU using Libtorch, designed to work with Unreal Engine.

About

This is one of two repositories which are required to build this project:

Extra Info

  • The actual Boids Algorithm is implemented in Pytorch
  • It's implemented in 3d, with both goal targeting and avoidance
  • The model has been JIT traced and can be run by LibTorch on GPU

Requirements:

  • CMake
  • Visual Studio
  • LibTorch 1.7
  • PyTorch 1.7 (Required Only to Re-Export Model)

Project Setup

  • Clone this repo: git clone https://github.com/NeuralVFX/boids-swarm-dll.git
  • Open the code directory
  • Open boids.cpp and replace the "boids.ptc" path to match the path on your system (resides in the libtorch dir of this project)
  • Open build/CMakeLists.txt and replace the path for Torch_DIR
  • Run these commands to build the project(replace DCMAKE_PREFIX_PATH with your libtorch install directory):
cmake ./build -DCMAKE_PREFIX_PATH=C:\libtorch -DCMAKE_GENERATOR_PLATFORM=x64  ..
cmake --build . --config Release
  • This should generate a Visual Studio Project and a file called Release/boids.dll
  • Copy this file wherever you need!

PyTorch/Jit Trace

  • If you are interested to modify or re-export the Boids model, Run this Jupyter Notebook.

boids-swarm-dll's People

Contributors

charlievfx avatar neuralvfx avatar

Stargazers

 avatar

Watchers

 avatar  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.