• Stars
    star
    334
  • Rank 126,264 (Top 3 %)
  • Language
    C++
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Summary

Baikal initiative has been started as a sample application demonstrating the usage of AMD® RadeonRays intersection engine, but evolved into a fully functional rendering engine aimed at graphics researchers, educational institutions and open-source enthusiasts in general.

Baikal is fast and efficient GPU-based global illumination renderer implemented using OpenCL and relying on AMD® RadeonRays intersection engine. It is cross-platform and vendor independent. The only requirement it imposes on the hardware is OpenCL 1.2 support. Baikal maintains high level of performance across all vendors, but it is specifically optimized for AMD® GPUs and APUs.

Image

Build

System requirements

The renderer is cross-platform and the following compilers are supported:

  • Visual Studio 2015 and later

  • Xcode 4 and later

  • GCC 4.8 and later

  • CMake 3.8 and later

The following packages are required to build the renderer:

  • Python 2.7
  • OpenImageIO (for MacOS/Linux builds)
  • glew (for MacOS/Linux builds)
  • GLFW3 (for MacOS/Linux builds)
  • AMD APP SDK or CUDA SDK

Build instructions

Baikal is using git submodules, use the following command line to recursively clone the repo including submodules:

git clone --recursive https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal.git

Windows

  • Create Visual Studio 2015 Solution

cmake -G "Visual Studio 14 2015 Win64"

OSX

  • Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  • Install OpenImageIO

brew install homebrew/science/openimageio

  • Install GLFW3

brew install glfw3

  • Make build folder and generate make files

mkdir build

cd build

cmake -DCMAKE_BUILD_TYPE=<Release or Debug> ..

make

Linux(Ubuntu)

  • Install complementary libraries

sudo apt-get install g++

  • Install build dependencies

sudo apt-get install libopenimageio-dev libglew-dev libglfw3-dev

  • Create the Makefile and build

mkdir build

cd build

cmake -DCMAKE_BUILD_TYPE=<Release ro Debug> ..

make

Options

Available premake options:

  • BAIKAL_ENABLE_DENOISER enables EAW denoiser in interactive output:

  • BAIKAL_ENABLE_RPR generates RadeonProRender API implemenatiton C-library and couple of RPR tutorials.

Run

Run Baikal standalone app

  • export LD_LIBRARY_PATH=<RadeonProRender-Baikal path>/build/bin/:${LD_LIBRARY_PATH}
  • cd BaikalStandalone
  • ../build/bin/BaikalStandalone

Possible command line args:

  • -platform index select specific OpenCL platform
  • -device index select specific OpenCL device
  • -p path path to mesh/material files
  • -f file mesh file to render
  • -w set window width
  • -h set window height
  • -ns num limit the number of samples per pixel
  • -cs speed set camera movement speed
  • -cpx x -cpy y -cpz z set camera position
  • -tpx x -tpy y -tpz z set camera target
  • -interop [0|1] disable | enable OpenGL interop (enabled by default, might be broken on some Linux systems)
  • -config [gpu|cpu|mgpu|mcpu|all] set device configuration to run on: single gpu (default) | single cpu | all available gpus | all available cpus | all devices

The list of supported texture formats:

  • png
  • bmp
  • jpg
  • gif
  • exr
  • hdr
  • tx
  • dds (limited support)
  • tga

You can download additional test scenes from RadeonProRender-Tests. Once extracted, you can load e.g. the Classroom example like this:

../build/bin/BaikalStandalone -p /path/to/extracted/folder/Classroom/ -f classroom.obj

The path can be absolute or relative to BaikalStandalone.

Run BaikalDataGenerator

  • export LD_LIBRARY_PATH=<RadeonProRender-Baikal path>/build/bin/:${LD_LIBRARY_PATH}
  • cd BaikalStandalone
  • ../build/bin/BaikalStandalone

Mandatory command line args:

  • -light_file full path to config file with light description
  • -camera_file full path to config file with camera states description
  • -spp_file full path to config file with necessary sampling per pixel enumeration
  • -scene_file full path to scene
  • -output_dir directory to store generated dataset
  • -width generated ouput width
  • -height generated ouput height

Possible command line args:

  • -gamma enables gamma corection for 3 chanel color output. '-gamma 1' means that gamma correction is enabled, otherwise disabled

Run unit tests

  • export LD_LIBRARY_PATH=<RadeonProRender-Baikal path>/build/bin/:${LD_LIBRARY_PATH}
  • cd BaikalTest
  • ../build/bin/BaikalTest

Unit tests are producing test images into BaikalTest/OutputImages and compare them to reference images expected to be at BaikalTest/ReferenceImages.

Possible command line args:

  • -genref 1 generate reference images

Hardware support

The renderer has been tested on the following hardware and OSes:

Linux

  • Ubuntu Linux 14.04
  • AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100
  • AMD Radeon driver 15.302: R9 Nano, R9 Fury X, R9 290
  • NVIDIA driver 352.79: GeForce GTX970, Titan X

Windows

  • Windows 7/8.1/10
  • AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100
  • AMD Radeon driver 16.4: R9 Nano, R9 Fury X, R9 290, Pro Duo
  • NVIDIA driver 364.72: GeForce GTX970, Titan X

OSX

  • OSX High Sierra
  • Mac Pro (Late 2013) AMD FirePro D500 x2
  • Macbook Pro Retina 13" (Early 2013) Intel HD 4300
  • Macbook Pro Retina 13" (2017) Intel Iris
  • Macbook 12" (Early 2015) Intel HD 5300

Known Issues

Windows

  • BaikalStandalone hangs sometimes on Windows on Nvidia cards. The issue is caused by ImGUI incompatibility with GL/CL interop. Removing ImGUI render call fixes the issue.

Linux

  • If <CL/cl.h> is missing try to specify OpenCL SDK location.
  • If your are experiencing problems creating your CL context with a default config chances are CL-GL interop is broken on your system, try running the sample app with -interop 0 command line option (expect performance drop).

AMD: export $AMDAPPSDKROOT=<SDK_PATH> NVIDIA: export $CUDA_PATH=<SDK_PATH>


Features

Being more of an experimental renderer, than a production rendering solution, Baikal still maintains a good set of features.

Light transport

Baikal is essentially a biased path-tracer, however it is highly configurable and might be configured to run ray-tracing (sampling multiple light sources at once) instead of pure path tracing. Implementation of bidirectional path tracing solver is currently work in progress.

Geometry

To maintain high efficiency Baikal only supports triangle meshes and instances. However quads can be used while working with Baikal via RadeonPro Render API, since API layer is capable of pre-tessellating quads and passing triangle meshes down to Baikal. The size of triangle meshes is only limited by available GPU memory. Instancing can be used to greatly reduce memory footprint by reusing geometric data and acceleration structures.

Internally meshes and instances are represented using Shape interface. If used through RPR API meshes and instances are represented by rpr_shape opaque pointer type.

Materials

Baikal supports compound materials assembled from the following building blocks:

  • Matte BRDF (Lambertian)
  • Microfacet BRDF (GGX or Beckmann distributions)
  • Ideal reflection BRDF
  • Ideal refraction BTDF
  • Microfacet refraction BTDF (GGX or Beckmann distributions)
  • Transparent BTDF
  • Translucent BTDF
  • Emission

Each of these building blocks can have:

  • Built-in Fresnel factor
  • Normal map
  • Bump map

Building blocks are combined together using one of the following blend modes:

  • Mix – linear interpolation of components using fixed weight
  • Fresnel blend – linear interpolation of components with weight depending on angle of incidence

Materials can use RGBA uint8, float16 or float32 uncompressed textures for albedos, weights and normal/bump maps.

Internally materials are represented as a subclasses of Material class: SingleBxdf for individual components and MultiBxdf for compound materials. At RPR API level they are represented by rpr_material_node opaque pointer. Note, that not all RPR materials are currently supported by Baikal (see section below on that).

Lights

Baikal supports the following types of lights:

  • Point light
  • Directional light
  • Spot light
  • Area light (emissive geometry)
  • Image-based environment light

All the lights are internally represented by different subclasses of Light interface. If being used via RPR API, lights are represented by rpr_light opaque pointer.

Sampling

Baikal can use one of the following samplers for random points/directions generation:

  • Random sampler (less efficient, mainly for debugging)
  • Sobol quasi- Monte-Carlo sampler
  • Correlated multi-jittered sampler

In addition Baikal is using multiple importance sampling to reduce variance for both direct and indirect illumination. It also applies Russian roulette to terminate low-probability paths.

GPU execution model

Baikal is based on split-kernel architecture to avoid VGPR occupancy bottlenecks and broadly uses GPU-optimized parallel primitives to restructure the work to better fit massively parallel GPU architecture. First, the renderer is designed for progressive preview and has synchronous nature. Meaning it has Render function which is getting called by the user in the loop and every call to this function adds a single sample to each pixel refining the image. This model allows to keep the latency under control and manipulate the scene and the camera while doing rendering. Inside the Render function each OpenCL work item is assigned a single pixel, but as iterations(bounces) progress, less and less rays remain alive, so Render function compacts the work to minimize GPU thread divergence.

Image

Performance

In terms of latency the renderer is capable of maintaining high FPS while doing progressive rendering for moderately sized scenes. For example on the following “Science Fiction” scene (775K triangles) Baikal is producing 15 FPS in full HD resolution on R9 Nano card.

In terms of intersection throughput performance is determined by underlying RadeonRays engine. Several examples using “Science Fiction” scene on R9 Fury X:

Image “Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.

Primary rays: 773Mrays/s (2.68ms)

Secondary rays: 285Mrays/s (7.27ms)

Shadow rays: 1109Mrays/s (1.87ms)

Image “Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.

Primary rays: 470Mrays/s (4.42ms)

Secondary rays: 195Mrays/s (10.66ms)

Shadow rays: 800Mrays/s (2.59ms)

Image “Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.

Primary rays: 562Mrays/s (3.69ms)

Secondary rays: 270Mrays/s (7.67ms)

Shadow rays: 1219Mrays/s (1.7ms)

RadeonPro Render API support

We provide an implementation of RPR API with Baikal, which is still in an early state of development, so many features available in internal RPR core are not available in open-source back end. The list of unsupported features follow:

  • Full material system (currently only basic BRDFs and blends of them are supported, no procedurals and arithmetic nodes)
  • Volumetrics (currently work in progress in Baikal)
  • IES lights
  • Visibility flags
  • Displacement and subdivision
  • Tilt shift camera
  • Bokeh shape controls
  • Multiple UVs
  • Post-processing
  • Analytic sky system

More Repositories

1

VulkanMemoryAllocator

Easy to integrate Vulkan memory allocation library
C
2,214
star
2

RadeonRays_SDK

Radeon Rays is ray intersection acceleration library for hardware and software multiplatforms using CPU and GPU
C++
1,032
star
3

V-EZ

C
839
star
4

Cauldron

A simple framework for rapid prototyping on Vulkan or Direct3D 12
C++
821
star
5

D3D12MemoryAllocator

Easy to integrate memory allocation library for Direct3D 12
C++
740
star
6

FidelityFX-SDK

The main repository for the FidelityFX SDK.
C++
685
star
7

AMF

The Advanced Media Framework (AMF) SDK provides developers with optimal access to AMD devices for multimedia processing
C++
516
star
8

RadeonProRenderBlenderAddon

This hardware-agnostic rendering plug-in for Blender uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
Python
481
star
9

Capsaicin

AMD ARR team rendering framework
C
363
star
10

BlenderUSDHydraAddon

This add-on allows you to assemble and compose USD data with Blender data and render it all using various renderers via Hydra.
Python
350
star
11

RenderPipelineShaders

Render Pipeline Shaders SDK
C++
268
star
12

AGS_SDK

AMD GPU Services (AGS) library and samples
C++
232
star
13

RadeonProRenderSDK

AMD Radeon™ ProRender is a powerful physically-based path traced rendering engine that enables creative professionals to produce stunningly photorealistic images.
C
220
star
14

RadeonProRenderUSD

This plug-in allows GPU or CPU accelerated viewport rendering on all OpenCL 1.2 hardware for the open source USD and Hydra system. You can build this plug-in as a USDView plug-in or a Houdini plug-in.
C++
212
star
15

Orochi

C++
197
star
16

MxGPU-Virtualization

C
176
star
17

Radeon-ReLive-VR

157
star
18

OCL-SDK

140
star
19

HelloD3D12

Introductory DirectX 12 sample
C
138
star
20

TAN

AMD TrueAudio Next is a software development kit for GPU accelerated audio signal processing
C++
133
star
21

brotli_g_sdk

Brotli-G SDK provides an improved lossless compression ratio with GPU decompression support than the standard Brotli compression algorithm maintained by the IETF (also known as RFC7932)
C++
132
star
22

ForwardPlus11

AMD Forward+ sample based on DirectX 11
C++
131
star
23

display-library

AMD Display Library SDK
HTML
115
star
24

HelloVulkan

Introductory Vulkan sample
C
115
star
25

glTFSample

A simple demo to show off the capabilities of the Cauldron framework
C++
112
star
26

GPUParticles11

AMD GPU particles sample based on DirectX 11
C++
105
star
27

LiquidVR

The LiquidVR™ SDK is a platform based on DirectX 11 designed to simplify and optimize VR development
C++
102
star
28

HIPRT

C++
91
star
29

RadeonML

C
81
star
30

TiledLighting11

AMD compute-based tiled lighting sample based on DirectX 11
C++
71
star
31

Tessellation

OpenGL sample that demonstrates terrain tessellation on the GPU
C++
61
star
32

GameEngineIntegrations

Information about example integrations of GPUOpen technology into game engines
55
star
33

cpu-core-counts

A sample demonstrating how to correctly detect physical core and logical processor counts on AMD processors.
C++
53
star
34

HIPRTSDK

C
53
star
35

RadeonImageFilter

C++
49
star
36

RadeonProRenderMayaPlugin

This hardware-agnostic rendering plug-in for Maya uses accurate ray-tracing technology to produce images and animations of your scenes, and provides real-time interactive rendering and continuous adjustment of effects.
C++
46
star
37

SSAA11

AMD supersample anti-aliasing (SSAA) sample based on DirectX 11
C++
41
star
38

RapidFire_SDK

RapidFire SDK - interface for cloud gaming and virtualization (VDI)
C++
36
star
39

MLAA11

AMD morphological anti-aliasing (MLAA) sample based on DirectX 11
C++
35
star
40

SilhouetteTessellation11

AMD tessellation sample based on DirectX 11
C++
34
star
41

SPARSEtextures

OpenGL sample demonstrating the GL_AMD_sparse_texture extension introduced by the AMD FirePro W and Radeon HD 7000 series
C++
30
star
42

ADLX

AMD Device Library eXtra
HTML
29
star
43

SeparableFilter11

AMD separable filter sample based on DirectX 11
C++
27
star
44

CrossfireAPI11

AMD Crossfire API sample for DirectX 11
C++
26
star
45

DepthBoundsTest11

AMD depth bounds test DirectX 11 driver extension sample
C++
23
star
46

RenderStudioKit

C++
23
star
47

RadeonProRenderUE

C++
21
star
48

Vulkan-Samples

based on Khronos Vulkan-Samples
C++
19
star
49

DOPPEngine

C++
18
star
50

Framelock

OpenGL sample that demonstrates how to enable Framelock in an application
C++
18
star
51

FreesyncPremiumProSample

A simple demo to show Freesync Premium Pro integration into DX12 and Vulkan API.
C++
18
star
52

DirectGMA_P2P

Samples showing FIrePro DirectGMA features in OpenGL and OpenCL
C++
17
star
53

VkMBCNT

Vulkan mbcnt sample that shows how to use the AMD_shader_ballot extension and mbcnt to perform a fast reduction within a wavefront
C++
16
star
54

Cauldron-Media

A selection of media files needed by Cauldron samples
16
star
55

RadeonProRenderANARI

C++
15
star
56

UnityIntegrations

Examples that demonstrate game integration with some of the libraries and SDKs available on GPUOpen.
C
15
star
57

OutOfOrderRasterization

Vulkan sample built on the Anvil framework
15
star
58

Barycentrics11

Barycentric coordinates GCN shader extension sample for DirectX 11
HLSL
14
star
59

DOPP

C++
14
star
60

Barycentrics12

Barycentric coordinates GCN shader extension sample for DirectX 12
C++
12
star
61

DirectStorageSample

Demonstrating the advantages of using DirectStorage over standard file I/O asset loading. Includes the API and changes required to make such a pipeline work.
C++
11
star
62

RadeonProRenderMaxPlugin

C++
10
star
63

VkD3DDeviceMapping

Simple example to show how to map devices between Vulkan and Direct3D
C++
8
star
64

WorkGraphComputeRasterizer

A compute/workgraph workload running inside the Cauldron framework
C++
8
star
65

RadeonProRender-Tests

7
star
66

WorkGraphsHelloWorkGraphs

C++
5
star
67

WorkGraphsDirectX-Graphics-Samples

A fork of https://github.com/microsoft/DirectX-Graphics-Samples modified to include a sample for Work Graphs
C++
5
star
68

RadeonProRenderMayaUSD

C++
2
star
69

RadeonProRenderSharedComponents

C++
2
star
70

RadeonProRenderSDKKernels

2
star
71

CapsaicinTestMedia

Capsaicin Framework test media assets
1
star