Giter Club home page Giter Club logo

peridyno's Introduction

Overview

PeriDyno is a CUDA-based, highly parallal physics engine targeted at providing real-time simulation of physical environments for intelligent agents.

Installation

Platforms

Windows 10: fully tested

Linux: should work as well, yet not guranteed.

Prerequisites:

IDE:

  • Visual studio 2017+

CUDA:

  • Latest tests were done based on CUDA Toolkit 11.4, should be compatible will other old versions.

Graphics:

Optional:

Installation:

Aside from those optional, other libraries are integrated inside the project to simplify the installation. Use the following git command to download the project as well as other dependences.

git clone --recursive https://github.com/peridyno/peridyno.git

Build the project:

Check whether CMake has been installed on your system, if not, visit https://cmake.org/download/ to download the lastest version.

Preferred: Run cmake-gui.exe, set the top two entries with the source code and binary directories. Configure the libararies you want to build, then click the Generate button to build the project.

A more convient way to build the project with a default setting is as follows

cd peridyo/build 
cmake ..

Applications

With a scene moded by PeriDyno, it can either be run as a GFLW application, Qt application or even a web application, you don't need to change any code when switching between those applications.

  • GLFW application

  • Qt application
Peridyno_Video.mp4

License

Peridyno's default license is the Apache 2.0 (See LICENSE).

External libraries are distributed under their own terms.

peridyno's People

Contributors

apassbydreg avatar bigshark151 avatar changy1506 avatar clouddon avatar dreliveam avatar hanxingyixue avatar hanxingyixue-arch avatar hypengw avatar liangrk5 avatar lunrs avatar nurshat317 avatar oncle-ha avatar regnore avatar shi-jian avatar toki3ki avatar unibeam98 avatar xiaoxinxin12 avatar xin-star-t avatar zixuanvickylu 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

peridyno's Issues

Build error on ubuntu 20.04

Hi, Peridyno developers,

Thanks for releasing the useful package. When I built PeriDyno in my ubuntu 20.04, I got the following error. It seems the file MouseInputModule.h is not found. Where could I find the file MouseInputModule.h? Or could it be ignored?

Thanks~

[ 87%] Building CXX object src/Rendering/GUI/GlfwGUI/CMakeFiles/GlfwGUI.dir/imgui_impl_glfw.cpp.o
[ 87%] Linking CUDA device code CMakeFiles/GlfwGUI.dir/cmake_device_link.o
[ 88%] Linking CXX shared library ../../../../lib/libdynoGlfwGUI-0.6.0.so
[ 88%] Built target GlfwGUI
Scanning dependencies of target GL_GlfwGUI
[ 88%] Building CXX object examples/GL_GlfwGUI/CMakeFiles/GL_GlfwGUI.dir/main.cpp.o
[ 88%] Linking CUDA device code CMakeFiles/GL_GlfwGUI.dir/cmake_device_link.o
[ 88%] Linking CXX executable ../../bin/GL_GlfwGUI
[ 88%] Built target GL_GlfwGUI
Scanning dependencies of target GL_InstanceVisualizer
[ 89%] Building CXX object examples/GL_InstanceVisualizer/CMakeFiles/GL_InstanceVisualizer.dir/main.cpp.o
In file included from /data/code13/peridyno/src/Framework/Module.h:25,
                 from /data/code13/peridyno/src/Framework/Module/TopologyModule.h:18,
                 from /data/code13/peridyno/src/Framework/Node.h:23,
                 from /data/code13/peridyno/examples/GL_InstanceVisualizer/main.cpp:6:
/data/code13/peridyno/src/Framework/DeclareEnum.h:61:61: warning: backslash-newline at end of file
   61 | #define DEF_ENUM(enum_type, enum_name, enum_value, desc)    \
      |                                                              
In file included from /data/code13/peridyno/src/Framework/Node.h:21,
                 from /data/code13/peridyno/examples/GL_InstanceVisualizer/main.cpp:6:
/data/code13/peridyno/src/Framework/NodePort.h: In destructor ‘dyno::SingleNodePort<T>::~SingleNodePort()’:
/data/code13/peridyno/src/Framework/NodePort.h:91:15: warning: invalid use of incomplete type ‘class dyno::Node’
   91 |     m_nodes[0]->disconnect(this);
      |               ^~
/data/code13/peridyno/src/Framework/NodePort.h:23:8: note: forward declaration of ‘class dyno::Node’
   23 |  class Node;
      |        ^~~~
/data/code13/peridyno/src/Framework/NodePort.h: In destructor ‘dyno::MultipleNodePort<T>::~MultipleNodePort()’:
/data/code13/peridyno/src/Framework/NodePort.h:180:9: warning: invalid use of incomplete type ‘class dyno::Node’
  180 |     node->disconnect(this);
      |         ^~
/data/code13/peridyno/src/Framework/NodePort.h:23:8: note: forward declaration of ‘class dyno::Node’
   23 |  class Node;
      |        ^~~~
[ 89%] Linking CUDA device code CMakeFiles/GL_InstanceVisualizer.dir/cmake_device_link.o
[ 89%] Linking CXX executable ../../bin/GL_InstanceVisualizer
[ 89%] Built target GL_InstanceVisualizer
Scanning dependencies of target GL_MouseInteractionInGraphicsPipeline
[ 90%] Building CXX object examples/GL_MouseInteraction/CMakeFiles/GL_MouseInteractionInGraphicsPipeline.dir/main.cpp.o
In file included from /data/code13/peridyno/src/Framework/Module.h:25,
                 from /data/code13/peridyno/src/Framework/Module/TopologyModule.h:18,
                 from /data/code13/peridyno/src/Framework/Node.h:23,
                 from /data/code13/peridyno/examples/GL_MouseInteraction/main.cpp:6:
/data/code13/peridyno/src/Framework/DeclareEnum.h:61:61: warning: backslash-newline at end of file
   61 | #define DEF_ENUM(enum_type, enum_name, enum_value, desc)    \
      |                                                              
In file included from /data/code13/peridyno/examples/GL_MouseInteraction/main.cpp:12:
/data/code13/peridyno/examples/GL_MouseInteraction/CustomMouseInteraction.h:2:10: fatal error: Module/MouseInputModule.h: No such file or directory
    2 | #include "Module/MouseInputModule.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [examples/GL_MouseInteraction/CMakeFiles/GL_MouseInteractionInGraphicsPipeline.dir/build.make:63: examples/GL_MouseInteraction/CMakeFiles/GL_MouseInteractionInGraphicsPipeline.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1694: examples/GL_MouseInteraction/CMakeFiles/GL_MouseInteractionInGraphicsPipeline.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
milton@milton-ws3:/data/code13/peridyno/build$

Build error on Ubuntu 20.04 without GPU

I ran this code:

mkdir build
cd build
cmake -DPERIDYNO_GPU_BACKEND=NO_BACKEND ..
make

I ran into this error:

.../peridyno/src/Framework/NodePort.h:241:36: error: cannot define member function ‘dyno::NodePort::hasNode’ within ‘dyno::MultipleNodePort<T>

I tried changing NodePort::hasNode into hasNode and it builds (with more errors, detailed in another issue).

Failed to make on ubuntu 20.04

When making the Peridynamics, GlfwGUI/GlfwApp.cpp couldn't find glew.h. But if I add <GL/glew.h>, the glad would complain the redefinition problems.
The error logs are as below:

[ 81%] Built target ParticleSystem
Consolidate compiler generated dependencies of target Peridynamics
[ 85%] Built target Peridynamics
In file included from /home/py/code/peridyno/src/Framework/Module.h:25,
                 from /home/py/code/peridyno/src/Framework/Module/TopologyModule.h:18,
                 from /home/py/code/peridyno/src/Framework/Node.h:23,
                 from /home/py/code/peridyno/src/Framework/SceneGraph.h:18,
                 from /home/py/code/peridyno/src/Rendering/GUI/GlfwGUI/GlfwApp.cpp:9:
/home/py/code/peridyno/src/Framework/DeclareEnum.h:61:61: warning: backslash-newline at end of file
   61 | #define DEF_ENUM(enum_type, enum_name, enum_value, desc)    \
      |                                                              
In file included from /home/py/code/peridyno/src/Framework/Node.h:21,
                 from /home/py/code/peridyno/src/Framework/SceneGraph.h:18,
                 from /home/py/code/peridyno/src/Rendering/GUI/GlfwGUI/GlfwApp.cpp:9:
/home/py/code/peridyno/src/Framework/NodePort.h: In destructor ‘dyno::SingleNodePort<T>::~SingleNodePort()’:
/home/py/code/peridyno/src/Framework/NodePort.h:91:15: warning: invalid use of incomplete type ‘class dyno::Node’
   91 |     m_nodes[0]->disconnect(this);
      |               ^~
/home/py/code/peridyno/src/Framework/NodePort.h:23:8: note: forward declaration of ‘class dyno::Node’
   23 |  class Node;
      |        ^~~~
/home/py/code/peridyno/src/Framework/NodePort.h: In destructor ‘dyno::MultipleNodePort<T>::~MultipleNodePort()’:
/home/py/code/peridyno/src/Framework/NodePort.h:180:9: warning: invalid use of incomplete type ‘class dyno::Node’
  180 |     node->disconnect(this);
      |         ^~
/home/py/code/peridyno/src/Framework/NodePort.h:23:8: note: forward declaration of ‘class dyno::Node’
   23 |  class Node;
      |        ^~~~
/home/py/code/peridyno/src/Rendering/GUI/GlfwGUI/GlfwApp.cpp: In member function ‘virtual void dyno::GlfwApp::createWindow(int, int)’:
/home/py/code/peridyno/src/Rendering/GUI/GlfwGUI/GlfwApp.cpp:115:14: error: ‘glewInit’ was not declared in this scope; did you mean ‘glfwInit’?
  115 |   bool err = glewInit() != GLEW_OK;
      |              ^~~~~~~~
      |              glfwInit
/home/py/code/peridyno/src/Rendering/GUI/GlfwGUI/GlfwApp.cpp:115:28: error: ‘GLEW_OK’ was not declared in this scope
  115 |   bool err = glewInit() != GLEW_OK;
      |                            ^~~~~~~
make[2]: *** [src/Rendering/GUI/GlfwGUI/CMakeFiles/GlfwGUI.dir/build.make:76: src/Rendering/GUI/GlfwGUI/CMakeFiles/GlfwGUI.dir/GlfwApp.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2311: src/Rendering/GUI/GlfwGUI/CMakeFiles/GlfwGUI.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

More build errorrs on Ubuntu 20.04 without GPU

Follows #30.

I have no CUDA nor Vulkan installed, build fails with more errors.

Tons of garbage output
/home/heather/code/peridyno/src/Core/Primitive/Primitive3D.h:121:20: error: expected nested-name-specifier
  121 |   typedef typename Vector Coord2D;
      |                    ^~~~~~~~~~~~~~~
/home/heather/code/peridyno/src/Core/Primitive/Primitive3D.h:121:36: error: invalid declarator before ‘Coord2D’
  121 |   typedef typename Vector Coord2D;
      |                                    ^~~~~~~
/home/heather/code/peridyno/src/Core/Primitive/Primitive3D.h:122:20: error: expected nested-name-specifier
  122 |   typedef typename Vector Coord3D;
      |                    ^~~~~~~~~~~~~~~
/home/heather/code/peridyno/src/Core/Primitive/Primitive3D.h:122:36: error: invalid declarator before ‘Coord3D’
  122 |   typedef typename Vector Coord3D;
      |                                    ^~~~~~~
/home/heather/code/peridyno/src/Core/Primitive/Primitive3D.h:129:40: error: ‘Coord3D’ does not name a type
  129 |   DYN_FUNC TPoint3D& operator = (const Coord3D& p);
      |                                        ^~~~~~~
...

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.