Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
Xingyu-Lin committed Nov 14, 2020
0 parents commit aa7d241
Show file tree
Hide file tree
Showing 1,185 changed files with 469,959 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
softgym/cached_initial_states/*
softgym/envs/corl_cached_state_backup
data
__pycache__/
.idea
PyFlex/demo/compiler/makelinux64/.deps
PyFlex/demo/compiler/makelinux64/build
PyFlex/examples/build
PyFlex/examples/cmake-build-debug
PyFlex/bindings/cmake-build-debug
PyFlex/bindings/build
*.swp
*.swo
*.swn

PyFlex/bindings/examples/tmp
PyFlex/bindings/examples/*.avi
PyFlex/bindings/examples/*/
PyFlex/bindings/examples/*.gif

build/
6 changes: 6 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Copyright 2020 Carnegie Mellon University
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8 changes: 8 additions & 0 deletions PyFlex/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# we do not store binary outputs in Flex

# windows
*.exp
*.ilk

# android
*.apk
69 changes: 69 additions & 0 deletions PyFlex/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Nvidia Source Code License (1-Way Commercial)

1. Definitions

“Licensor” means any person or entity that distributes its Work. “Software”
means the original work of authorship made available under this License. “Work”
means the Software and any additions to or derivative works of the Software that
are made available under this License. The terms “reproduce,” “reproduction,”
“derivative works,” and “distribution” have the meaning as provided under U.S.
copyright law; provided, however, that for the purposes of this License,
derivative works shall not include works that remain separable from, or merely
link (or bind by name) to the interfaces of, the Work. Works, including the
Software, are “made available” under this License by including in or with the
Work either (a) a copyright notice referencing the applicability of this License
to the Work, or (b) a copy of this License.

2. License Grants

2.1 Copyright Grant. Subject to the terms and conditions of this License, each
Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free,
copyright license to reproduce, prepare derivative works of, publicly display,
publicly perform, sublicense and distribute its Work and any resulting
derivative works in any form.

3. Limitations

3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do
so under this License, (b) you include a complete copy of this License with your
distribution, and (c) you retain without modification any copyright, patent,
trademark, or attribution notices that are present in the Work.

3.2 Derivative Works. You may specify that additional or different terms apply
to the use, reproduction, and distribution of your derivative works of the Work
(“Your Terms”) only if you identify the specific derivative works that are
subject to Your Terms. Notwithstanding Your Terms, this License (including the
redistribution requirements in Section 3.1) will continue to apply to the Work
itself.

3.3 Patent Claims. If you bring or threaten to bring a patent claim against any
Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to
enforce any patents that you allege are infringed by any Work, then your rights
under this License from such Licensor (including the grants in Sections 2.1 and
2.2) will terminate immediately.

3.4 Trademarks. This License does not grant any rights to use any Licensor’s or
its affiliates’ names, logos, or trademarks, except as necessary to reproduce
the notices described in this License.

3.5 Termination. If you violate any term of this License, then your rights under
this License (including the grants in Sections 2.1 and 2.2) will terminate
immediately.

4. Disclaimer of Warranty.

THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT.
YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.

5. Limitation of Liability.

EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY,
WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY
LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE,
THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF
GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR
MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
105 changes: 105 additions & 0 deletions PyFlex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
NVIDIA Flex - 1.2.0
===================

Flex is a particle-based simulation library designed for real-time applications.
Please see the programmer's manual included in this release package for more information on
the solver API and usage.

Supported Platforms
-------------------

* Windows 32/64 bit (CUDA, DX11, DX12)
* Linux 64 bit (CUDA, tested with Ubuntu 16.04 LTS and Mint 17.2 Rafaela)

Requirements
------------

A D3D11 capable graphics card with the following driver versions:

* NVIDIA GeForce Game Ready Driver 396.45 or above
* AMD Radeon Software Version 16.9.1 or above
* Intel® Graphics Version 15.33.43.4425 or above

To build the demo at least one of the following is required:

* Microsoft Visual Studio 2013
* Microsoft Visual Studio 2015
* g++ 4.6.3 or higher

And either:

* CUDA 9.2.148 toolkit
* DirectX 11/12 SDK

Demo
====

Use the `run_cuda.bat` or `run_d3d.bat` files to launch the demo.

Notes
-----

* Some scenes also have fluid emitters that can be started using 'space'
* For running the Linux binaries you will need to export the path to where the CUDA run time libraries are
For example, you may add to your .bashrc file the following:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64


Command Line Options
--------------------

The following commands may be passed to the demo application to modify behavior:

-fullscreen=wxh Start fullscreen e.g.: -fullscreen=1280x720
-msaa=0 Disable multisampling (default is on)
-device=n Choose GPU to run on
-d3d12 Enable D3D12 compute
-benchmark Enable bencmark mode, will write a benchmark.txt to the root folder
-vsync=0 Disable vsync

Controls
--------

w,s,a,d - Fly Camera
right mouse - Mouse look
shift + left mouse - Particle select and drag

p - Pause/Unpause
o - Step
h - Hide/Show onscreen help

left/right arrow keys - Move to prev/next scene
up/down arrow keys - Select next scene
enter - Launch selected scene
r - Reset current scene

e - Draw fluid surface
v - Draw points
f - Draw springs
i - Draw diffuse
m - Draw meshes

space - Toggle fluid emitter
y - Toggle wave pool
c - Toggle video capture
u - Toggle fullscreen
j - Wind gust
- - Remove a plane
esc - Quit

Known Issues
============

* Crash with inflatable scenes on Intel HD Graphics 530
* MSAA is broken on D3D12 and currently disabled

Acknowledgements
================

* SDL is licensed under the zlib license
* GLEW is licensed under the Modified BSD license
* Regal is licensed under the BSD license
* stb_truetype by Sean Barrett is public domain
* imgui by Mikko Mononen is licensed under the ZLib license

46 changes: 46 additions & 0 deletions PyFlex/bindings/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.5)
project(PyFleX)

# set(CMAKE_VERBOSE_MAKEFILE ON)

find_package(CUDA 9.0 REQUIRED)
find_package(pybind11 REQUIRED)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG} -MMD -m64 -Wall -std=c++0x")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES -fPIC -fpermissive -fno-strict-aliasing -O3")

set(ROOT $ENV{PYFLEXROOT})
set(EXAMPLE_BIN pyflex)

set(SOURCES ${SOURCES} ${ROOT}/bindings/pyflex.cpp)
set(SOURCES ${SOURCES} ${ROOT}/bindings/imgui.cpp)
set(SOURCES ${SOURCES} ${ROOT}/bindings/shadersDemoContext.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/aabbtree.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/core.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/extrude.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/maths.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/mesh.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/perlin.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/pfm.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/platform.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/png.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/sdf.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/tga.cpp)
set(SOURCES ${SOURCES} ${ROOT}/core/voxelize.cpp)
set(SOURCES ${SOURCES} ${ROOT}/bindings/opengl/imguiRenderGL.cpp)
set(SOURCES ${SOURCES} ${ROOT}/bindings/opengl/shader.cpp)
set(SOURCES ${SOURCES} ${ROOT}/bindings/opengl/shadersGL.cpp)

set(FLEXHEADERS ${ROOT})
set(FLEXLIB ${ROOT} ${ROOT}/lib/linux64 ${ROOT}/bindings ${ROOT}/external/SDL2-2.0.4/lib/x64)

pybind11_add_module(${EXAMPLE_BIN} ${SOURCES})
target_include_directories(${EXAMPLE_BIN} PRIVATE ${FLEXHEADERS})
target_include_directories(${EXAMPLE_BIN} PRIVATE ${FLEXLIB})
target_link_libraries(${EXAMPLE_BIN} PRIVATE EGL)
target_link_libraries(${EXAMPLE_BIN} PRIVATE ${ROOT}/lib/linux64/NvFlexExtReleaseCUDA_x64.a)
target_link_libraries(${EXAMPLE_BIN} PRIVATE ${ROOT}/lib/linux64/NvFlexReleaseCUDA_x64.a)
target_link_libraries(${EXAMPLE_BIN} PRIVATE ${ROOT}/external/SDL2-2.0.4/lib/x64/libSDL2-2.0.so.0.4.0)
target_link_libraries(${EXAMPLE_BIN} PRIVATE ${ROOT}/external/SDL2-2.0.4/lib/x64/libSDL2.a)
target_link_libraries(${EXAMPLE_BIN} PRIVATE ${CUDA_LIBRARIES})

Loading

0 comments on commit aa7d241

Please sign in to comment.