• Stars
    star
    481
  • Rank 91,384 (Top 2 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 3 months ago

Reviews

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

Repository Details

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.

Radeon ProRender Blender Addon

Build Requirements

2.93+

  • Blender 2.93+
  • Python 3.9.2 (Blender 2.93 uses 3.9.2) x64(for Core) - all code, addon and misc tested with python3
  • python-cffi - py -3.9 -m pip install cffi
  • Visual Studio 2015 SP3 / 2017 / 2019 with SDK 8.1 and 2015.3 v140 toolset installed
  • If you are using Visual studio 2019 you would need to install the Windows SDK 8.1 manually from Microsoft website https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/
  • cmake 3.x. Make sure it's added to the PATH environment variable

Note that the .sln provided is for easy editing and searching of files on Windows. The blender code builds on the command line rather than in the solution file. Visual Studio does provided support for debugging Python when you attach to the running Blender process with loaded addon.

Software, required for development:

  • numpy - py -3.9 -m pip install numpy

ThirdParty libraries

There is ThirdParty repository included to the project as a submodule. Please update submodules:

Plugin includes 4 submodules: RadeonProRender SDK: [email protected]:Radeon-Pro/RadeonProRenderSDK.git

Shared components Image Processing Library: [email protected]:Radeon-Pro/RadeonProImageProcessingSDK.git

ThirdParty components and miscellaneous tools [email protected]:Radeon-Pro/RadeonProRenderThirdPartyComponents.git

All of them are included via SSH protocol. You will need to create and install SSH keys https://help.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh

Once SSH keys are installed update/checkout submodules for active branch

git submodule update --init -f --recursive

Developing

Coding Conventions

Aim is to conform to pep8. At minimum it's 4 spaces for indentation, sources are utf-8, there's .gitconfig in the root of the project - please set you editor to use it(for most simplicity). E.g. PyCharm(recommended!) default setting are fine and seems that it also picks up .editorconfig automatically also, Tortoise Merge has a checkbox 'Enable EditorConfig', for Visual Studio there's EditorConfig extension

Git - we try to avoid merge commits, easiest way to do it:

git config [--global] merge.ff only # this one rejects merges that would result in merge commit

git config [--global] pull.rebase true # converts pull to do, essentially, fetch&rebase

Also, make more meaningful commits(one commit per feature) the easy way:

git merge <branch> --squash # this will create a single change set from multiple commits coming from

Recommended software

  • PyCharm Community Edition - very recommended, possible to enable intellisense(limited) for Blender code and for RPR Core
  • Visual Studio - has a very nice python extension, possible to enable intellisense for Blender and for RPR Core, provides remote debugging in Blender

Build

run build.py to build.

Run Addon while developing it(without real installation)

  • make sure you have no installed addon for Blender version you want to use; remove installed version if needed.
  • set environment variable BLENDER_EXE to blender.exe you want to use via the command line or system environment settings.
  • run run_blender_with_rpr.cmd

Example:

set BLENDER_EXE="C:\Program Files\Blender Foundation\Blender 2.93\blender.exe" && run_blender_with_rpr.cmd

Debugging

log

Using python's 'logging' module underneath, rprblender.utils.logging has functions similar to logging. It also includes callable class Log which provides simplified interface to do logging. Example: from rprblender.utils import logging log = logging.Log(tag='export.mesh')

log("sync", mesh, obj)

e.g. logging.debug(*argv, tag) where argv is what is printed(same as with print) and tag is string suffix for logger name, for filtering so that logging.limit_log(name, level_show_always) will allow to filter out what doesn't start with name(expect levels equal or above level_show_always)

configdev.py(loaded very early) can be used to include code like limit_log to configure your session

from .utils import logging
logging.limit_log('default', logging.DEBUG)

from . import config
config.pyrpr_log_calls = True #  log all Core function calls to console, can be VERY useful
  • Visual Studio has really nice(and working) mixed(python and C stack) debugging - recommended!
  • Blender debug - it's easiest to build Blender in Release or RelWithDebInfo(and add #pragma optimize( "", off ))
  • Debug in PyCharm - import pydevd; pydevd.settrace('localhost', port=52128, stdoutToServer=True, stderrToServer=True, suspend=False)

Making a new release

  • run build_installer.py <build_folder>. Where build_folder is some separate location - it will clone needed repos(if not already), reset then to needed branch and build installer. Byt default it builds windows installer on master.
  • tag the commit in the build folder's ProRenderBlenderPlugin git tag builds/x.y.zz
  • push the tag git push --tags
  • increase version in src/rprblender/__init__.py

PyCharm

Blender api intellisense support

Get pycharm-blender. See instructions on the github page or, in short, run pypredef_gen.py from Blender itself or using command line, e.g. blender --python pypredef_gen.py, add "pypredef" folder path that this script creates to you PyCharm Interpreter paths, find paths settings under File | Settings(or Default Settings) | Project Interpreter

Increase max file size for Pycharm intellisence(bpy.py generated is huge), go to Help | Edit Custom VM Options and add the following line:

-Didea.max.intellisense.filesize=5000000

Restart PyCharm

Visual Studio

Create and configure RPRBlender python project

Install python extension in Visual Studio

Create new project from existing python code: Menu -> File -> New -> Project -> Python tab -> From Existing Python Code

Add following Search Paths to project:

  • rprblender\support
  • <path to Blender 2.93>\2.93\scripts\modules # path where to Blender's modules
  • <path to "PyCharm->Blender api intellisense support">

Configure VS remote debugger to Blender

Install Blender-VScode-Debugger addon

Get Blender-VScode-Debugger plugin for Blender from https://github.com/Barbarbarbarian/Blender-VScode-Debugger

Install plugin Blender_VScode_Debugger.py in Blender: Menu -> File -> User Preferences -> Click "Install Add-on from file" -> Select Blender_VScode_Debugger.py -> Click "Install Add-on from file". New adddon "Development: Debugger for Visual Code" should be appeared

Enable "Development: Debugger for Visual Code" addon. Select "Path to PTVSD module": C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Python Tools for Visual Studio\2.2\

Click "Save User Settings"

Attach VS remote debugger to Blender

In Blender: press -> in appeared dialog type "debug" -> select "Connect to Visual Studio Code Debugger"

In VS: Menu -> Debug -> Attach To Process -> select Transport "Python remote (ptvsd)" -> type in Qualifier "my_secret@localhost:3000" -> click Refresh: process Blender.exe "tcp://localhost:3000" should be appeared -> select process -> click Attach

Remote debugging connection established.

Versioning

The version number should be updated when a new plugin is released. This is done by editing the version field of the bl_info structure in the src/rprblender/init.py file. Currently a build script will update the build number when checkins happen to the master branch. So it is only necessary to update the major or minor number when required.

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

Capsaicin

AMD ARR team rendering framework
C
363
star
9

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
10

RadeonProRender-Baikal

C++
334
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