{"id":18782116,"url":"https://github.com/gpuopen-librariesandsdks/radeonprorender-baikal","last_synced_at":"2025-04-06T08:13:25.946Z","repository":{"id":49927436,"uuid":"66820320","full_name":"GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal","owner":"GPUOpen-LibrariesAndSDKs","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-18T12:21:45.000Z","size":50609,"stargazers_count":335,"open_issues_count":31,"forks_count":75,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-03-30T07:08:40.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-29T07:09:29.000Z","updated_at":"2025-03-18T04:39:22.000Z","dependencies_parsed_at":"2022-09-09T22:11:56.164Z","dependency_job_id":null,"html_url":"https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FRadeonProRender-Baikal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FRadeonProRender-Baikal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FRadeonProRender-Baikal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FRadeonProRender-Baikal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPUOpen-LibrariesAndSDKs","download_url":"https://codeload.github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451665,"owners_count":20940944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:34:57.674Z","updated_at":"2025-04-06T08:13:25.927Z","avatar_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Summary\n\nBaikal 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.\n\nBaikal 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.\n\n![Image](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/blob/master/Doc/Images/5.jpg)\n\n# Build\n## System requirements\nThe renderer is cross-platform and the following compilers are supported:\n\n- Visual Studio 2015 and later\n\n- Xcode 4 and later\n\n- GCC 4.8 and later\n\n- CMake 3.8 and later\n\nThe following packages are required to build the renderer:\n\n- Python 2.7\n- OpenImageIO (for MacOS/Linux builds)\n- glew (for MacOS/Linux builds)\n- GLFW3 (for MacOS/Linux builds)\n- AMD APP SDK or CUDA SDK\n\n## Build instructions\n\nBaikal is using git submodules, use the following command line to recursively clone the repo including submodules:\n\n```\ngit clone --recursive https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal.git\n```\n\n### Windows\n- Create Visual Studio 2015 Solution\n\n`cmake -G \"Visual Studio 14 2015 Win64\"`\n\n### OSX\n\n- Install Homebrew\n\n`/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"`\n\n- Install OpenImageIO\n\n`brew install homebrew/science/openimageio`\n\n- Install GLFW3\n\n`brew install glfw3`\n\n- Make build folder and generate make files\n\n`mkdir build`\n\n`cd build`\n\n`cmake -DCMAKE_BUILD_TYPE=\u003cRelease or Debug\u003e ..`\n\n`make`\n\n### Linux(Ubuntu)\n\n- Install complementary libraries\n\n`sudo apt-get install g++`\n\n- Install build dependencies\n\n`sudo apt-get install libopenimageio-dev libglew-dev libglfw3-dev`\n\n- Create the Makefile and build\n\n`mkdir build`\n\n`cd build`\n\n`cmake -DCMAKE_BUILD_TYPE=\u003cRelease ro Debug\u003e ..`\n\n`make`\n\n### Options\n\nAvailable premake options:\n\n- `BAIKAL_ENABLE_DENOISER` enables EAW denoiser in interactive output:\n\n- `BAIKAL_ENABLE_RPR` generates RadeonProRender API implemenatiton C-library and couple of RPR tutorials.\n\n## Run\n\n## Run Baikal standalone app\n - `export LD_LIBRARY_PATH=\u003cRadeonProRender-Baikal path\u003e/build/bin/:${LD_LIBRARY_PATH}`\n - `cd BaikalStandalone`\n - `../build/bin/BaikalStandalone`\n\nPossible command line args:\n- `-platform index` select specific OpenCL platform\n- `-device index` select specific OpenCL device\n- `-p path` path to mesh/material files\n- `-f file` mesh file to render\n- `-w` set window width\n- `-h` set window height\n- `-ns num` limit the number of samples per pixel\n- `-cs speed` set camera movement speed\n- `-cpx x -cpy y -cpz z` set camera position\n- `-tpx x -tpy y -tpz z` set camera target\n- `-interop [0|1]` disable | enable OpenGL interop (enabled by default, might be broken on some Linux systems)\n- `-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\n\nThe list of supported texture formats:\n\n- png\n- bmp\n- jpg\n- gif\n- exr\n- hdr\n- tx\n- dds (limited support)\n- tga\n\nYou can download additional test scenes from [RadeonProRender-Tests](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Tests). Once extracted, you can load e.g. the Classroom example like this:\n\n`../build/bin/BaikalStandalone -p /path/to/extracted/folder/Classroom/ -f classroom.obj`\n\nThe path can be absolute or relative to `BaikalStandalone`.\n\n## Run BaikalDataGenerator\n - `export LD_LIBRARY_PATH=\u003cRadeonProRender-Baikal path\u003e/build/bin/:${LD_LIBRARY_PATH}`\n - `cd BaikalStandalone`\n - `../build/bin/BaikalStandalone`\n\nMandatory command line args:\n- `-light_file` full path to config file with light description\n- `-camera_file` full path to config file with camera states description\n- `-spp_file` full path to config file with necessary sampling per pixel enumeration\n- `-scene_file` full path to scene\n- `-output_dir` directory to store generated dataset\n- `-width` generated ouput width\n- `-height` generated ouput height\n\nPossible command line args:\n- `-gamma` enables gamma corection for 3 chanel color output. '-gamma 1' means that gamma correction is enabled, otherwise disabled\n\n## Run unit tests\n- `export LD_LIBRARY_PATH=\u003cRadeonProRender-Baikal path\u003e/build/bin/:${LD_LIBRARY_PATH}`\n - `cd BaikalTest`\n - `../build/bin/BaikalTest`\n\nUnit tests are producing test images into BaikalTest/OutputImages and compare them to reference images expected to be at BaikalTest/ReferenceImages.\n\nPossible command line args:\n- `-genref 1` generate reference images\n\n\n# Hardware  support\n\nThe renderer has been tested on the following hardware and OSes:\n\n## Linux\n - Ubuntu Linux 14.04\n - AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100\n - AMD Radeon driver 15.302: R9 Nano, R9 Fury X, R9 290\n - NVIDIA driver 352.79: GeForce GTX970, Titan X\n\n## Windows\n - Windows 7/8.1/10\n - AMD FirePro driver 15.201: W9100, W8100, W9000, W7000, W7100, S9300x2, W5100\n - AMD Radeon driver 16.4: R9 Nano, R9 Fury X, R9 290, Pro Duo\n - NVIDIA driver 364.72: GeForce GTX970, Titan X\n\n## OSX\n - OSX High Sierra\n - Mac Pro (Late 2013) AMD FirePro D500 x2\n - Macbook Pro Retina 13\" (Early 2013) Intel HD 4300\n - Macbook Pro Retina 13\" (2017) Intel Iris\n - Macbook 12\" (Early 2015) Intel HD 5300\n\n# Known Issues\n\n## Windows\n \n - 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.\n \n ## Linux\n\n - If \u003cCL/cl.h\u003e is missing try to specify OpenCL SDK location.\n - 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). \n \nAMD:\n`export $AMDAPPSDKROOT=\u003cSDK_PATH\u003e`\nNVIDIA:\n`export $CUDA_PATH=\u003cSDK_PATH\u003e`\n\n---\n# Features\nBeing more of an experimental renderer, than a production rendering solution, Baikal still maintains a good set of features.\n\n## Light transport\n\nBaikal 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. \n\n## Geometry\n\nTo 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.\n\nInternally meshes and instances are represented using Shape interface. If used through RPR API meshes and instances are represented by rpr_shape opaque pointer type. \n\n## Materials\n\nBaikal supports compound materials assembled from the following building blocks:\n* Matte BRDF (Lambertian)\n* Microfacet BRDF (GGX or Beckmann distributions)\n* Ideal reflection BRDF\n* Ideal refraction BTDF\n* Microfacet refraction BTDF (GGX or Beckmann distributions)\n* Transparent BTDF\n* Translucent BTDF\n* Emission\n\nEach of these building blocks can have:\n* Built-in Fresnel factor\n* Normal map\n* Bump map\n\nBuilding blocks are combined together using one of the following blend modes:\n* Mix – linear interpolation of components using fixed weight\n* Fresnel blend – linear interpolation of components with weight depending on angle of incidence\n\nMaterials can use RGBA uint8, float16 or float32 uncompressed textures for albedos, weights and normal/bump maps.\n\nInternally 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). \n\n## Lights\n\nBaikal supports the following types of lights:\n* Point light\n* Directional light\n* Spot light\n* Area light (emissive geometry)\n* Image-based environment light\n\nAll 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.\n\n## Sampling\n\n\nBaikal can use one of the following samplers for random points/directions generation:\n\n* Random sampler (less efficient, mainly for debugging)\n* Sobol quasi- Monte-Carlo sampler\n* Correlated multi-jittered sampler\n\nIn 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.\n\n## GPU execution model\t\n\nBaikal 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. \nInside 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.\n\n![Image](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/blob/master/Doc/Images/4.png)\n\n## Performance\nIn 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. \n\nIn terms of intersection throughput performance is determined by underlying RadeonRays engine. Several examples using “Science Fiction” scene on R9 Fury X:\n\n\n![Image](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/blob/master/Doc/Images/1.jpg)\n“Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.\n\nPrimary rays: 773Mrays/s (2.68ms)\n\nSecondary rays: 285Mrays/s (7.27ms)\n\nShadow rays: 1109Mrays/s (1.87ms)\n\n\n![Image](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/blob/master/Doc/Images/2.jpg)\n“Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.\n\nPrimary rays: 470Mrays/s (4.42ms)\n\nSecondary rays: 195Mrays/s (10.66ms)\n\nShadow rays: 800Mrays/s (2.59ms)\n\n\n![Image](https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRender-Baikal/blob/master/Doc/Images/3.jpg)\n“Science Fiction” scene is a courtesy of Juan Carlos Silva, 3drender.com.\n\nPrimary rays: 562Mrays/s (3.69ms)\n\nSecondary rays: 270Mrays/s (7.67ms)\n\nShadow rays: 1219Mrays/s (1.7ms)\n\n\n# RadeonPro Render API support\nWe 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:\n\n* Full material system (currently only basic BRDFs and blends of them are supported, no procedurals and arithmetic nodes)\n* Volumetrics (currently work in progress in Baikal)\n* IES lights\n* Visibility flags\n* Displacement and subdivision\n* Tilt shift camera\n* Bokeh shape controls\n* Multiple UVs\n* Post-processing\n* Analytic sky system\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fradeonprorender-baikal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpuopen-librariesandsdks%2Fradeonprorender-baikal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fradeonprorender-baikal/lists"}