Devsh-Graphics-Programming / Nabla

Licence: Apache-2.0 license
OpenGL/OpenGL ES/Vulkan/CUDA/OptiX Modular Rendering Framework for PC/Linux/Android

Programming Languages

C++
36643 projects - #6 most used programming language
GLSL
2045 projects
CMake
9771 projects

Projects that are alternatives of or similar to Nabla

Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+811.49%)
Mutual labels:  graphics-engine, rendering, vulkan, raytracing, opengl-es, pbr, graphics-library
makma
Makma is a deferred Vulkan renderer written in C++.
Stars: ✭ 77 (-67.23%)
Mutual labels:  graphics-engine, rendering, vulkan, glsl, spir-v
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (+103.4%)
Mutual labels:  graphics-engine, vulkan, glsl, spir-v, opengl-es
Lift
Vulkan Path Tracer with Optix Denoiser integration
Stars: ✭ 30 (-87.23%)
Mutual labels:  graphics-engine, vulkan, raytracing, rtx, optix
Glove
GLOVE (GL Over Vulkan) is a cross-platform software library that acts as an intermediate layer between an OpenGL application and Vulkan
Stars: ✭ 394 (+67.66%)
Mutual labels:  vulkan, computer-graphics, opengles, opengl-es
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (-45.11%)
Mutual labels:  rendering, vulkan, glsl, pbr
CLUSEK-RT
Vulkan based C++ ray-tracing game engine.
Stars: ✭ 24 (-89.79%)
Mutual labels:  rendering, vulkan, computer-graphics, raytracing
Shaderconductor
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
Stars: ✭ 1,146 (+387.66%)
Mutual labels:  vulkan, glsl, spir-v, opengl-es
ElkEngine
Simple graphics engine used as submodule in many of my projects
Stars: ✭ 54 (-77.02%)
Mutual labels:  graphics-engine, rendering, glsl, graphics-library
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (+11.91%)
Mutual labels:  graphics-engine, vulkan, raytracing, opengl-es
Flycube
Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.
Stars: ✭ 78 (-66.81%)
Mutual labels:  graphics-engine, rendering, vulkan, raytracing
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-41.28%)
Mutual labels:  graphics-engine, rendering, vulkan, opengl-es
sdf-2d
A graphics library to enable the real-time rendering of 2D signed distance fields on the web.
Stars: ✭ 70 (-70.21%)
Mutual labels:  glsl, raytracing, graphics-library
Messier87
A realtime raytracing blackhole renderer
Stars: ✭ 53 (-77.45%)
Mutual labels:  rendering, glsl, raytracing
awesome-rtx
Curated collection of projects leveraging NVIDIA RTX technology (OptiX, DXR, VKR)
Stars: ✭ 73 (-68.94%)
Mutual labels:  vulkan, raytracing, rtx
Vanilla-Raytraced
Official repository of Vanilla Raytraced resources pack.
Stars: ✭ 25 (-89.36%)
Mutual labels:  raytracing, pbr, rtx
fluctus
An interactive OpenCL wavefront path tracer
Stars: ✭ 55 (-76.6%)
Mutual labels:  rendering, raytracing, path-tracing
DuEngine
An efficient interactive C++ renderer for ShaderToy-alike demos with 2D/3D/CubeMap/Video/Camera/LightField/Volume textures. (Partially used in my I3D 2018 papers)
Stars: ✭ 62 (-73.62%)
Mutual labels:  rendering, glsl, raytracing
nerv pathtracer
a pathtracer with physically based rendering in mind
Stars: ✭ 27 (-88.51%)
Mutual labels:  glsl, raytracing, path-tracing
AndroidGLKit
AndroidGLKit provides OpenGL ES 2.0 boilerplate codes for Android.
Stars: ✭ 22 (-90.64%)
Mutual labels:  glsl, opengles, opengl-es

Nabla

License

Nabla (previously called IrrlichtBaW ) is a new renovated version of older Irrlicht engine. The name change to Nabla allows for using Nabla side by side with the legacy Irrlicht and IrrlichtBaW engines. The project currently aims for a thread-able and Vulkan-centered API, the Vulkan backend is almost complete, and OpenGL and ES backends are currently in maintenance mode.

This framework has been kindly begun by the founder @devshgraphicsprogramming of Devsh Graphics Programming Sp. z O.O. and was almost entirely sponsored by Build A World Aps. in it's early days, and now has been picked up by the Ditt company.

(Get Hired) Jobs and Internships

If you are a programmer with a passion for High Performance Computing, Mathematics and Computer Graphics

If you can be in charge of your own time managment and work 4-day work weeks 100% remotely

Then make something impressive using Nabla, open a PR and contact us (jobs devsh.eu) with your CV.

We would also be happy to sponsor your master or bachelor thesis as long as:

  • You are an above average student with an interest in Graphics
  • It will be written in English
  • It will produce contributions to Nabla which we can license under Apache 2.0

For internships contact us with:

  • CV in english
  • A neat description of any paperwork you'll need (schools/universities) Most importantly contact us at least 3 weeks in advance of your internship organisation deadline!

(Hire Us) Contracting

The members of Devsh Graphics Programming Sp. z O.O. (Company Registration (KRS) #: 0000764661) are available (individually or collectively) for contracts on projects of various scopes and timescales, especially on foreign frameworks, codebases and third-party 3D frameworks.

We provide expertise in:

  • OpenGL
  • OpenGL ES
  • WebGL
  • WebGPU
  • Vulkan
  • OpenCL
  • CUDA
  • D3D12 and D3D11
  • computer vision
  • Audio programming
  • DSP
  • video encoding and decoding
  • High Performance Computing

Our language of choice is C++17 with C++11 and C11 coming in close second, however we're also amenable to C#, Java, Python and related languages.

Contact [email protected] with inquires into contracting.

Showcase

Screenshots

Path-tracing without MIS

Path-tracing without MIS

Path-tracing without MIS

Path-tracing without MIS

Bathroom scene

1 Megapixel, 1 Million Samples

Raytracing sample

Stairs raytracing

Thindielectric

BRDF Explorer

Different Shape Area Light emitters

Videos

Raytracing With Optix AI Denoising [Albedo and Normals]

Bathroom Scene Raytracing

Raytracing flythrough

Tonemapping with AutoExposure and Temporal Adaptation

Stairs Scene Raytracing

Multiple Importance Sampling and Depth of Field

Main Features

  • Frontend API with Vulkan as First Class Citizen
  • Thread safe and context pollution safe OpenGL
  • Asset management pipeline
  • Automatic pipeline layout creation
  • Shader introspection
  • Using SPIR-V shaders in OpenGL and ES
  • Libraries of GLSL shader functions
  • Compute shaders
  • Virtual Texturing
  • Virtual Geometry (programmable and non programmble fetching) with triangle batching
  • CUDA and Vulkan interop
  • CPU asset manipulation (image filtering, image format transcoding, mesh optimization and manipulation)
  • GPU driven Scene Graph
  • Material Compiler for Path Tracing UberShaders

Main Delivered Extensions

  • Auto Exposure
  • Tonemapper
  • Mitsuba scene loader (auto-generated shaders)
  • Fastest blur on the planet
  • OptiX interop
  • Bullet physics beginner integration
  • GPU Radix Sort

Platforms

  • Windows

  • Linux

  • Android 7.0 +

  • Mac OS

  • iOS

Build summary

Release RWDI Debug
Windows MSVC x64
Android Clang x86_64
Linux GCC x64

Required Build Tools and SDK's

Vanilla Build - most extensions disabled

Vanilla + CUDA Build

Nabla only supports CUDA interop using the Driver API not the Runtime API. We use NVRTC to produce runtime compiled PTX.

Because CUDA needs its own version the GeForce (Quadro or Tesla) Driver, its often a few minor versions behind your automatically updated Windows driver, the install will fail even if it prompts you to agree to installing an older driver.

So basically first remove your driver, then install CUDA SDK.

CMake warnings in reference CUDA and notes

On Windows CMake has trouble finding new packages installed after CMake, so its the perfect time to visit it's website and check for a new version installer after installing CUDA SDK.

You can also thank NVidia for making the CUDA SDK a whole whopping 2.5 GB on Windows.

Vanilla + CUDA + Optix Build

After dealing with CUDA installing just install Optix SKD.

Android Build

Required:

The first step is to install Android Studio and JDK 8. When done, open Android Studio and navigate to Tools -> SDK Manager -> System Settings -> Android SDK. Select SDK Platforms and install proper individual SDK components - install Android version with Android API level you will be targeting. Then switch to SDK Tools and make sure to install Android SDK Build-Tools 32 and NDK (Side by side) - it's a requirement! Also you must make sure that your JAVA_HOME enviroment variable is set to proper JDK installation path.

Now you can begin CMake'ing. We use Ninja generator tools as a generator for building Nabla for Android on both Windows and Linux Host-OSes. Note that Nabla Android build has been performed and tested so far on Windows as cross compile OS with Ninja generator and on Linux as cross compile OS with Makefile and Ninja generators, but we recommend using Ninja for both OSes.

Before configuring CMake you must add 2 cache variables:

  • ANDROID_PLATFORM
  • ANDROID_ABI

ANDROID_PLATFORM is a target API platform that you pass as android-x where x is your android API level (you can pass 28 for instance). ANDROID_ABI is Application Binary Interface and note, that we support only x86_64 currently. Those 2 cache variables must be specified before CMake configuration. Having done it you can specify toolchain file for cross-compiling by passing path to android.toolchain.cmake. You can find it in Android Studio's SDK directory in ndk/<version>/build/cmake/android.toolchain.cmake. Basically the entire path should look like this one C:/Users/<your_user>/AppData/Local/AndroidSdk/ndk/<version>/build/cmake/android.toolchain.cmake. With all of this feel free to generate.

Having Nabla generated you need to enter build directory, launch the terminal and type cmake --build . --target Nabla -j4 -v or if you want build android sample example you would type cmake --build . --target android_sample_apk -j4 -v. The android sample example produces .apk file you can use for debugging and profiling.

Note: each example provided by the engine builds as an executable with non-cross builds and with target of a name called a_target, in following example above it would be android_sample. When building cross-compile for android **to produce the APK file you need to add _apk postfix to the a_target, because a_target gets built then as a library.

DEPRECATED: Chrome Book SDK version

In order for the chromebook to work with the apk you build you need to install the right SDK version. Go to Tools -> SDK Manager -> System Settings -> Android SDK then select the SDK Platforms tab and tick the "Show Packake Details" checkbox in the bottom-right corner. After that select Android 9.0 (Pie) -> Android SDK Platform 28 and hit "OK".

DEPRECATED: Chrome Book upload

To upload generated .apk into your ChromeBook you need first to make sure your device is in developer mode state. If it is, you can open Android Studio and choose Debug or Profile choosing .apk file. Then you will need to connect to your device using adb connector. To make use of adb, you need to find path to the executable that is placed in C:/Users/<your_user>/AppData/Local/AndroidSdk/platform-tools directory. When found, you can type in Android Studio command line C:/Users/<your_user>/AppData/Local/AndroidSdk/platform-tools/adb connect <IP of ChromeBook network>. You can find ChromeBook's IP by entering network settings and choosing current network ChromeBook is connected to. This way the ChromeBook should be listed in available devices and you should be able to upload .apk to the machine through debugging app shortcut. Take into account that you won't probably be able to debug in that scenario, but you will be able to upload .apk to the device.

DEPRECATED: Chrome Book debug

To debug the .apk on your chromebook you need to open the source file you want to debug in Android Studio (Either via File->Open or Drag&Drop, but be aware that d&d can deadlock your Android Studio 25% of the time so youll need to restart it), then place your breakpoints and hit "Debug" (The bug icon) in the top right corner.

External Dependencies

  • gl.h header for OpenGL (possible to obtain even on headless servers from mesa-libgl-devel)

Future Boost Library Dependencies

Nabla uses or will use the following Boost libraries:

The maybe's depend on how xplatform and easy to operate the boost::context is, esp w.r.t. Linux, Windows and Android. We will not use boost::fibers as we need our own complex scheduler.

Building the Nabla library

Cloning the project

NOTICE: Due to GitHub SSH policy, our CI needed all submodules to be added with SSH URLs. THIS MEANS YOU NEED TO CHECKOUT THE SUPERPROJECT VIA SSH!

Begin with cloning Nabla with:

git clone --recurse-submodules -j8 [email protected]:Devsh-Graphics-Programming/Nabla.git

If you haven't cloned recursively, you have to also perform:

git submodule init
git submodule update

CMake config script will try to initialize submodules for you however as well, but it doesn't mean the initialization attempt will be successful (it often is not when performed on a shaky internet connection, and you end up with dirty, locked or unversioned submodules).

Submodules

If you haven't initialized the submodules yourself before the CMake configure step, and out CMake submodule update script destroyed them (badly/half initialized), you can run the following set of commands, but beware - it will completely wipe any changes to submodules.

git submodule foreach --recursive git clean -xfd
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive

TODO: DOCUMENT THE NBL_UPDATE_SUBMODULE flag

By default Nabla's cmake...

But if you're working on making changes to one of our customized dependencies, you want to disable that, to not have the submodule reset on every CMake reconfigure (which may happen during a build).

Weird CMake behaviour, notes

Sometimes it may appear that there won't be any files in submodules directories. If so, you have to bring them back by using:

git reset --hard

on each submodule's directory required!

CMake notes

Consider CMake and Visual Studio version, important!

  • The paragraph concerns Visual Studio only

Make sure you have installed the latest version of Visual Studio and CMake. Within older versions sometimes there may occur that Visual Studio outputs an error associated with compiler heap space. If you don't get any error, just skip the point. It's because having x64 project opened the solution still uses 32 bit compiler exe and cannot allocate more than 4G of memory, therefore Nabla is unbuildable. Furthermore Visual Studio doesn't provide any option to change that. Because of that you have to manually modify .vcxproj xml and add x64 to PropertyGroup nodes. Pay attention that CMake generates a standard PropertyGroup node, but it isn't enough, because you need to put it into the target where building type is directly specified. It should look for instance as following:

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <PreferredToolArchitecture>x64</PreferredToolArchitecture>
    <ConfigurationType>StaticLibrary</ConfigurationType>
    <CharacterSet>MultiByte</CharacterSet>
    <PlatformToolset>v142</PlatformToolset>
</PropertyGroup>

Current example above shows Release mode, but you should consider Debug as well. Having it done, 64bit cl.exe binary usage will be assured. When u get this problem, don't bother with editing all the .vcxprojs. It will probably only matter while building the engine, so the only thing you have to do is edit that .vcxproj you actually use - Nabla.vcxproj for instance and that's it.

If you know a way to make CMake generating .vcxprojs already having those changes that will solve the issue, it will be great if you let us know about it :)

CMake on 64bit Windows

  • Best to use cmake-gui

Run cmake-gui and, as usually, give CMake root Nabla directory and where you want CMake to put project files and click "Configure" field. When CMake asks you to choose compiler/IDE, make sure to check whether there's a distinct option for 64bit mode and, if this is the case, choose this one.

For single-config IDEs (Code::Blocks) you'll have to manually set CMAKE_BUILD_TYPE to Debug or Release. Release is default.

You also have options BUILD_EXAMPLES and BUILD_TOOLS which do exactly what they say. By "tools" you should currently understand just convert2baw.

For Windows MSVC required, MinGW build system maintenance will be delegated to the community.

CMake on 64bit Linux

Same as Windows, except that currently we have no way of setting the correct working directory for executing the examples from within the IDE (for debugging). If you care about this please submit an issue/PR/MR to CMake's gitlab.

We recommend the Codelite IDE as that has a CMake-gui generator and has been tested and works relatively nice.

Visual Studio Code suffers from a number of issues such as configuring the CMake every time you want to build a target and slow build times. Here are the issues:

  1. microsoft/vscode-cmake-tools#771
  2. microsoft/vscode-cmake-tools#772
  3. microsoft/vscode-cmake-tools#773

Clang toolset is unmaintained and untested on Linux.

First examples launching, significant notes

Remember you have to set up starting target project in Visual Studio before you begin to launch your example. To do that click on Solution Explorer, find the example name, hover on it and click on Set as StartUp Project. You can disable building examples by NBL_BUILD_EXAMPLES option in CMake.

Use Nabla in your project!

To get Nabla to be used by an external application without adding it as a subdirectory,but still using a submodule, you should perform following:

set(NBL_SOURCE_DIR "<YOUR_NABLA_SOURCE_DIRECTORY>") # PAY ATTENTION: you have to fill this one with Nabla source directory
set(NBL_BINARY_DIR "${NBL_SOURCE_DIR}/build")
set(NBL_INSTALL_DIR "${NBL_BINARY_DIR}/install")

list(APPEND NBL_CMAKE_ARGS "-DNBL_BUILD_DOCS:BOOL=OFF") # enable only if you have doxygen installed and detectable by cmake
list(APPEND NBL_CMAKE_ARGS "-DNBL_BUILD_EXAMPLES:BOOL=OFF")
list(APPEND NBL_CMAKE_ARGS "-DNBL_BUILD_TOOLS:BOOL=OFF") # the tools don't work yet (Apr 2020 status, might have changed since then)
list(APPEND NBL_CMAKE_ARGS "-DNBL_BUILD_MITSUBA_LOADER:BOOL=OFF") # you probably don't want this extension
list(APPEND NBL_CMAKE_ARGS "-D_NBL_COMPILE_WITH_BAW_LOADER_:BOOL=OFF") # you probably don't want this extension
list(APPEND NBL_CMAKE_ARGS "-D_NBL_COMPILE_WITH_BAW_WRITER_:BOOL=OFF") # you probably don't want this extension
list(APPEND NBL_CMAKE_ARGS "-DCMAKE_INSTALL_PREFIX:PATH=${NBL_INSTALL_DIR}") # because of https://gitlab.kitware.com/cmake/cmake/-/issues/18790

ExternalProject_Add(Nabla
    DOWNLOAD_COMMAND  ""
    SOURCE_DIR        "${NBL_SOURCE_DIR}"
    BINARY_DIR        "${NBL_BINARY_DIR}"
    CMAKE_ARGS        ${NBL_CMAKE_ARGS}
    TEST_COMMAND      ""
)

include(${NBL_SOURCE_DIR}/cmake/build/AddNablaModule.cmake)

# now if you create executable you can use addNablaModule
add_executable(executableTest main.cpp) # assuming main.cpp exsists

# add Nabla module to "executableTest"
addNablaModule(executableTest "${NBL_INSTALL_DIR}")

If you want to use git (without a submodule) then you can use ExternalProject_Add with the GIT_ properties instead.

I recommend you use ExternalProject_Add instead of add_subdirectory for Nabla as we haven't tested its use by 3rdparty applications that use CMake to build themselves yet.

Automated Builds (TODO)

License

Nabla is released under the Apache 2.0 license. See LICENSE.md for more details.

Documentation (WIP/TODO)

Official Support (Discord)

Permament members of Devsh Graphics Programming Sp. z O.O. use this to organise publicly visible work. Join to the server to get into more details.

Credits and Attribution

The authors of Nabla are:

Past Authors and Contributors:

  • Krzysztof Szenk @crisspl (Senior Programmer: Everything in Nabla has been touched by his golden hands!)
  • Danylo Sadivnychyi @sadiuk (Junior Programmer: Android system interfaces and buildsystem, FFT Ocean)
  • Cyprian Skrzypczak @Hazardu (embeded resources and optimalizations)
  • @khom-khun (Bullet Physics Extension + Example and the irrBaW-test repository of easy to understand demos)
  • Søren Gronbech
  • @florastamine Nguyễn Ngọc Huy (sRGB-Correct Image Loaders, CEGUI and BRDF Explorer GUI)
  • @manhnt9 Nguyễn Tiến Mạnh (CEGUI, Build System and Radeon Rays Proof-of-Concept Integration in Prime Engine X with IrrlichtBaW back-end)

Words of appreciation for developers whose software has been used in Nabla, currently and in the past:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].