Code Monkey home page Code Monkey logo

radeonprorendersdk's People

Contributors

feniksa avatar richardge avatar takahiroharada avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

radeonprorendersdk's Issues

Support for clipping planes

Is there a possibility for supporting clipping planes in ProRender? Or a way to recreate the feature with the current version of the SDK? I've had a few feature requests come in for this and it would be nice to support.

An example of Rhinos clipping planes
Clipping Planes

Northstar don't use the texture of materials

When I use the hybrid backend to render the matbal of the 63_tutorial I got rusted textures correctly used, but when I render the same scene with the northstar backend texture aren't displayed on the matbal.

		CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/amd.png", &uberMat3_img));

		rpr_material_node uberMat3_imgTexture = nullptr;
		CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat3_imgTexture));
		CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat3_imgTexture, RPR_MATERIAL_INPUT_DATA, uberMat3_img));

		rpr_material_node uberMat3 = nullptr;
		CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_UBERV2, &uberMat3));
		CHECK(rprMaterialNodeSetInputNByKey(uberMat3, RPR_MATERIAL_INPUT_UBER_DIFFUSE_COLOR, uberMat3_imgTexture));

		CHECK(rprShapeSetMaterial(planeShape, uberMat3));


		//
		// Create a new Uber material for the orb model.
		//

		rpr_image uberMat2_img1 = nullptr;
		CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/lead_rusted_Base_Color.jpg", &uberMat2_img1));
		rpr_image uberMat2_img2 = nullptr;
		CHECK(rprContextCreateImageFromFile(g_context, "../resources/renderer/textures/lead_rusted_Normal.jpg", &uberMat2_img2));

		rpr_material_node uberMat2_imgTexture1 = nullptr;
		CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat2_imgTexture1));
		CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat2_imgTexture1, RPR_MATERIAL_INPUT_DATA, uberMat2_img1));
		rpr_material_node uberMat2_imgTexture2 = nullptr;
		CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_IMAGE_TEXTURE, &uberMat2_imgTexture2));
		CHECK(rprMaterialNodeSetInputImageDataByKey(uberMat2_imgTexture2, RPR_MATERIAL_INPUT_DATA, uberMat2_img2));

		rpr_material_node uberMat2 = nullptr;
		CHECK(rprMaterialSystemCreateNode(g_matsys, RPR_MATERIAL_NODE_UBERV2, &uberMat2));

		CHECK(rprMaterialNodeSetInputNByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_COLOR, uberMat2_imgTexture1));
		CHECK(rprMaterialNodeSetInputNByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_NORMAL, uberMat2_imgTexture2));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_DIFFUSE_WEIGHT, 1, 1, 1, 1));

		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_COLOR, 1, 1, 1, 1));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_WEIGHT, 1, 1, 1, 1));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ROUGHNESS, 0, 0, 0, 0));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ANISOTROPY, 0, 0, 0, 0));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_ANISOTROPY_ROTATION, 0, 0, 0, 0));
		CHECK(rprMaterialNodeSetInputUByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_MODE, RPR_UBER_MATERIAL_IOR_MODE_METALNESS));
		CHECK(rprMaterialNodeSetInputFByKey(uberMat2, RPR_MATERIAL_INPUT_UBER_REFLECTION_IOR, 1.36, 1.36, 1.36, 1.36));

		// Apply this new Uber Material to the shapes
		for (const auto& iShape : matBallShape)
		{
			CHECK(rprShapeSetMaterial(iShape, uberMat2));
		}

Notice that the plane is rendered with the AMD texture with both backends.

Assigned material on mesh only rendering properly some of the time.

I'm having trouble with assigned materials to part of a mesh only rendering sometimes, the render seems to only work a small percentage of the time. I tried to render the part of the mesh using the glass material in proRender and principled BSDF with the same issues.

The hair is another story, I may have to modify the color sliders to get that to render properly or replace it entirely. I'm using hair cards from curve to mesh, and put a color slider on top to control the color fade.

Setup:
Blender 3.3 with GPU compute
processor: AMD Ryzen 7 3700X 8-Core Processor 3.60 GHz
OS: Windows 11 home 22H2 build 22621.674
GPU: AMD Radeon RX 6700 XT
AMD software: Adrenalin Edition version 22.Q2
installed memory: 48GB
BaseBoard Product: MPG X570 GAMING EDGE WIFI (MS-7C37)

knee disc not rendering
eyes not rendering properly

Intended render

intended render disc
intended render eyes

Node Input not getting removed in Northstar64 but Tahoe64 its fine

This simple example works in Tahoe64 perfectly but in Northstar64 the removing line does nothing and throws no error
i have not checked any other nodes as i have only just started adding them, but in this case it happends with the "Blend" node.
` //add MICROFACET
Rpr.Check((int)Rpr.MaterialSystemCreateNode(g_matsys, Rpr.MaterialNodeType.MICROFACET, out micro_mat));
//set rough
Rpr.Check((int)Rpr.MaterialNodeSetInputFByKey(micro_mat, Rpr.MaterialInput.ROUGHNESS, 0.5f,0.5f,0.5f,0.5f));
//add Blend
Rpr.Check((int)Rpr.MaterialSystemCreateNode(g_matsys, Rpr.MaterialNodeType.BLEND, out blend_mat));
//set weight to 0
Rpr.Check((int)Rpr.MaterialNodeSetInputFByKey(blend_mat, Rpr.MaterialInput.WEIGHT, 0, 0, 0, 0));
//set blend input COLOR0 to micro_mat
Rpr.Check((int)Rpr.MaterialNodeSetInputNByKey(blend_mat, Rpr.MaterialInput.COLOR0, micro_mat));

        //removing micro_mat from blend input COLOR0
        //this line does not work to remove material with Northstar64 but Tahoe64 it works fine
        Rpr.Check((int)Rpr.MaterialNodeSetInputNByKey(blend_mat, Rpr.MaterialInput.COLOR0,IntPtr.Zero));

        //attach blend to object
        Rpr.Check((int)Rpr.ShapeSetMaterial(RenderObjects[1].ObjIntptr, blend_mat));`

@RichardGe

Hello everyone, I'm new to this topic.

I'm having trouble understanding how to start and render or work like you do. I have Visual Studio and Visual Code, but I don't know how to execute the files. It's not like Blender or 3ds Max. Does anyone have a very specific guide or could they tell me how to do what they show in the examples? I'm using Windows 11.

You're welcome!

Questions/suggestions

I will do some new tests of the SDK now that I can use a GPU that support ray tracing (Nvidia 3080 RTX).

It seems that there is a lot improvements made since last time I checked, but the documentation and samples seems to stay a weakness.

Let me be specific:
For the documentation:

  • We need a comparison table of backends (hybrid, hybrid pro, Northstar)
    • Rendering differences
    • Features supported
    • Performance differences
  • More explanations on how to integrate in an application (UI, DX12, Vulkan,...).
    For samples:
  • really need to have an application that do real time rendering with a small UI, for each backends.
    • GL interop is the only one interactive and the navigation is not smooth.

Last time I checked I got issues depending on the selected GPU (integrated or discret) and backends seems to see GPU in different orders, so having a way to select them by name in the API can be great.

Please notice that I tried the NVidia Pathtracer SDK, which provide a full interactive application directly. It is much more convenient to see what their SDKs are capable to do.

[HybridPro] Support for material faces

I have a large static mesh made up of a number of submaterials which I'm attempting to apply using rpr::Shape::SetMaterialFaces. This throws RPR_ERROR_UNSUPPORTED when using the HybridPro backend.

I can work around this by splitting the mesh by material into separate shapes at runtime, but material faces seem like the best way to do this (and makes the code a lot cleaner).

Segmentation fault after transitioning from Tahoe to Northstar

Using RPR with Tahoe works very well in my application under Ubuntu 20.04. However, after transitioning to Northstar as described in "Transitioning from RPR 1.X to 2.0 / Loading RPR 2.0", I get a segmentation fault in libNorthstar64.so:

Thread 35 "quintus-debug" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff7893e700 (LWP 16040)]
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in  ()
#1  0x00007fff79372a53 in Tahoe::ThreadPoolImpl::threadFunc(Tahoe::ThreadPoolImpl*, int) () at /home/sh/local/dev/quintus/dist/libNorthstar64.so
#2  0x0000000002773134 in execute_native_thread_routine ()
#3  0x00007ffff68de609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#4  0x00007ffff668d103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

I am wondering if this has something to do with the references to Tahoe in message #1?

Thanks for any advice in advance!

OpenGL interop issues with hybrid backend

I am now able to create the context with the hybrid backend with my GPU that have less than 4GB of VRAM.
I made some other fixes in my code, but I can't figure out what I do incorrectly to retrieve the result of the render() call in my OpenGL texture.

I am creating the context with RPR_CREATION_FLAGS_ENABLE_GL_INTEROP | RPR_CREATION_FLAGS_ENABLE_DEBUG | RPR_CREATION_FLAGS_ENABLE_GPU0 as flags.

I am creating the FBO by calling rprContextCreateFramebufferFromGLTexture2D(g_context, GL_TEXTURE_2D, 0, g_texture, &g_frame_buffer);

The in my draw function, I am calling the rprContextRender function before using the g_texture that I draw on the viewport sized quad.

I am getting following Vulkan errors:
Error: Can't wait until fence is signalled, VkResult=-4
Error: Failed to submit to a queue, VkResult=-4

I also noticed that if I create the OpenGL context with version 3.2 instead of 3.0, my test application doesn't render anything with the path-tracer backend.

Is it easier to make both backends (hybrid and Northstar64) working with Vulkan?

Hybrid Mode Fails

We are unable to use the Hybrid mode in the latest AMD Radeon Pro SDK (downloaded from Github, RadeonProRenderSDK-1.35.2.zip).

Compiling and running the “tutorials/63_hybrid” tutorial fails to create the context and we got the output attached (Log.txt). It seems to be some Vulkan issue (I assume that the Hybrid.dll is actually using Vulkan as a backend).
What we tried:

  1. Various combinations of RPR_CREATION_FLAGS_ENABLE_GPU0- RPR_CREATION_FLAGS_ENABLE_GPU
  2. Enable debug logging by specifying RPR_CREATION_FLAGS_ENABLE_DEBUG to no avail (the Tahoe64.dll plugin is logging stuff into tahoe.log, the Hybrid.dll seems to ignore this flag).

Report.zip

Lightmap export

Hi,

is there any way to export lightmaps texture to bake light for use in a real time engine?

Missing Libraries for Command Line tools on Ubuntu 22.04 LTS

Hi all,

I'd like to know what to do about missing libraries that are keeping me from running the CL-Tools:

~/RadeonProRenderSDK$ RadeonProRender/binUbuntu18/RprsRender64 ./Resources/Meshes/matball.rprs config.json 
E010000: RPR plugin 'libTahoe64.so' not found.
file=../Rpr/Apps/RprsRender/main.cpp (1164)
Critical error : the program stops now.

The tutorials compiled well though but they also exit with an error:

~/RadeonProRenderSDK/tutorials/Bin$ ./05_basic_scene64 
./05_basic_scene64: error while loading shared libraries: libRadeonProRender64.so: cannot open shared object file: No such file or directory

However the $PATH includes the absolute path to all libraries.
Anybody knows what to do?

libRadeonProRender64 is not getting loaded

Tried the sdk tutorial building instructions on Ubuntu 20.04 and macOS. Both of them failed

On Ubuntu

./21_material_layered64: error while loading shared libraries: libRadeonProRender64.so: cannot open shared object file: No such file or directory

On macOS

dyld: Library not loaded: @rpath/libRadeonProRender64.dylib
  Referenced from: /Users/shubham/git/RadeonProRenderSDK/tutorials/Bin/./22_material_uber64
  Reason: image not found

Also on Ubuntu glew.h is not included resulting in this error

In file included from ../32_gl_interop/ShaderManager.cpp:1:
../32_gl_interop/ShaderManager.h:30:10: fatal error: GL/glew.h: No such file or directory
   30 | #include <GL/glew.h>

Documentation needed for rprCameraSetUVDistortion()

I just noticed a new camera setting in the latest update:

/** @brief Set distorion image for camera
*
* @param camera The camera to set UV Distortion for
* @param distortionMap distorion image
* @return RPR_SUCCESS in case of success, error code otherwise
*/
extern RPR_API_ENTRY rpr_status rprCameraSetUVDistortion(rpr_camera camera, rpr_image distortionMap);

..but there seems to be no documentation of the actual distortion map format and effect on the (supposedly!) camera rays generation. I was wondering if this is meant to be a way to add lens distortion to the camera.

An update to the documentation would be really appreciated, thanks!

RPR_CONTEXT_Y_FLIP not working

// do nothing
CHECK(rprContextSetParameterByKey1u(context, RPR_CONTEXT_Y_FLIP, 1u));

// flip horizontally correctly
CHECK(rprContextSetParameterByKey1u(context, RPR_CONTEXT_X_FLIP, 1u));

Segfault in rprLoadMaterialX_free

I get this segfault from time to time:

Exception: EXCEPTION_ACCESS_VIOLATION at 0x7fff8fff1917 -- memcpy at C:\Windows\SYSTEM32\VCRUNTIME140.dll (unknown line)
memcpy at C:\Windows\SYSTEM32\VCRUNTIME140.dll (unknown line)
unknown function (ip: 00007fff3a90dc0b)
unknown function (ip: 00007fff3a90e49b)
rprLoadMaterialX_free at C:\Users\sdani\.RadeonProRender64.dll (unknown line)
rprLoadMaterialX_free at C:\Users\sdani\.RadeonProRender64.dll (unknown line)
rprContextCreateMesh at C:\Users\sdani\.RadeonProRender64.dll (unknown line)

I wouldn't be surprised if this is my fault - but I'm not actually doing anything with MaterialX, so I'm not sure what MaterialX it's trying to free when I create a new mesh.

I wanted to look at the source to see what it's doing, since then it would likely be easy to figure out what's happening, but I just realized that you only open source the headers :(

Can you point me to some likely causes of why rprContextCreateMesh would just try to free some material I haven't created?

Missing context parameter defines for HybridPro.dll

When iterating through all parameters of a rpr_context created with the HybridPro.dll plugin I get many parameters that have no #define yet in RadeonProRender.h. They are also missing in the utility class RPRStringIDMapper. The full output I get (including the RPR_PARAMETER_DESCRIPTION) is below. The parameters starting with id 0x1001 seem to be missing from the header.

INFO: Creating RadeonProRender Version 3.1.0 (Build a9c8434)
All parameters (count = 54):
  iterations (id = 0x10b; desc = 'Number of iterations performed for current render') = 1
  tonemapping.photolinear.sensitivity (id = 0x115; desc = 'Sensitivity if photo tonemapper selected') = 1.000000
  tonemapping.photolinear.exposure (id = 0x116; desc = 'Exposure if photo tonemapper selected') = 0.125000
  tonemapping.photolinear.fstop (id = 0x117; desc = 'FStop if photo tonemapper selected') = 1.000000
  maxrecursion (id = 0x11b; desc = 'Ray trace depth') = 21
  raycastepsilon (id = 0x11c; desc = 'Ray cast epsilon') = 0.001000
  radianceclamp (id = 0x11d; desc = 'Clamp radiance') = 50.000000
  xflip (id = 0x11e; desc = 'Flip framebuffer output along X axis') = 0
  yflip (id = 0x11f; desc = 'Flip framebuffer output along Y axis') = 1
  displaygamma (id = 0x124; desc = 'Display gamma') = 1.000000
  framecount (id = 0x131; desc = 'Frame number') = 0
  maxdepth.diffuse (id = 0x138; desc = 'Diffuse ray trace depth') = 5
  maxdepth.glossy (id = 0x139; desc = 'Reflection ray trace depth') = 5
  maxdepth.refraction (id = 0x13b; desc = 'Refraction ray trace depth') = 5
  maxdepth.refraction.glossy (id = 0x13c; desc = 'Refraction ray trace depth') = 5
  aaenabled (id = 0x166; desc = 'Enable anti-aliasing') = 1
  pluginversion (id = 0x16b; desc = 'Get the version of the plugin DLL attached to the RPR API. Constant value.') = 3552402737
  ocioconfigpath (id = 0x171; desc = 'OpenColorIO config path') = ''
  ociorenderingcolorspace (id = 0x172; desc = 'OpenColorIO destination color space') = ''
  randseed (id = 0x1000; desc = 'Random seed') = 0

   (id = 0x1001; desc = 'Render quality') = 2
   (id = 0x1002; desc = 'Number of prerendered frames. Must not be less than 2') = 2
   (id = 0x1006; desc = 'Enable TAA samples accumulation') = 0
   (id = 0x1007; desc = 'Enable path tracing upscale') = 0
   (id = 0x1008; desc = 'Path tracing upscale factor') = 1.000000
   (id = 0x100c; desc = 'Enable using lightmaps') = 0
   (id = 0x1011; desc = 'Stereo Render') = 0
   (id = 0x1012; desc = 'Enable hierarchical light sampling') = 1
   (id = 0x1013; desc = 'Arithmetics support') = 0
   (id = 0x1014; desc = 'Number of camera jitter points') = 8
   (id = 0x1015; desc = 'Use MSAA instead of TAA') = 0
   (id = 0x101e; desc = 'Traversal mode configuration') = 0
   (id = 0x1022; desc = 'strict/relaxed material checks') = 0
   (id = 0x102d; desc = 'Path tracing denoiser type') = 0
   (id = 0x102e; desc = 'Maximum textures available') = 512
   (id = 0x102f; desc = 'Enable reservoir sampling') = 0
   (id = 0x1030; desc = 'Exposure') = 1.000000
   (id = 0x1031; desc = 'Enable tone mapping') = 0
   (id = 0x1033; desc = 'ReSTIR GI') = 0
   (id = 0x1034; desc = 'Path Space Regularization: Attenuation factor for roughness. [0.0, 1.0], 0.0 - Unbiased, high variance, 1.0 - Biased, low variance') = 0.000000
   (id = 0x1035; desc = 'Reduce overall shaders compilation time, in some cases can increase performance, especially on complex materials') = 0
   (id = 0x1036; desc = 'Enable Rasterization') = 0
   (id = 0x1037; desc = 'World space ReSTIR spatial resample iteration count') = 3
   (id = 0x1038; desc = 'Max reservoirs per world space hash grid cell') = 128
   (id = 0x1039; desc = 'Enable half-res indirect') = 0
   (id = 0x1003b; desc = 'Enable Radiance Cache') = 0
   (id = 0x1003c; desc = 'Set ReSTIR GI bias correction method') = 2
   (id = 0x1003d; desc = 'Enable sample validation which helps to remove temporal lag of indirect lighting at the cost of decreased performance') = 1
   (id = 0x1003e; desc = 'Enable motion blur') = 0
   (id = 0x1003f; desc = 'Sample count for motion blur') = 8
   (id = 0x10040; desc = 'Enable Median Of meaNs for accumulation in ground truth') = 0
   (id = 0x10041; desc = 'Gini coefficient threshold used in Median Of meaNs ') = 0.250000
   (id = 0x10042; desc = 'Upscaler algorithm') = 0
   (id = 0x10043; desc = 'FSR2 quality') = 0

Tutorial 32_gl_interop do the copy of FB from RAM

I took a deeper look at the tutorial of the gl_interop and it isn't the optimal implementation actually.
The documentation recommend to use rprContextCreateFramebufferFromGLTexture2D to directly create the framebuffer from the GL texture to avoid the copy from VRAM to RAM and then RAM to VRAM back.

Maybe it's ok to have this slow path with the northstar backend as it is not intended to be used for real time purpose but this is critical for the hybrid backend which should be use in this tutorial IMHO.

Immediate return from rprContextRender

Im using this library from rust with, but the render function returns immediately here is relevant code :

       `status = rprContextSetAOV(*self.context, rpr_aov_RPR_AOV_COLOR,  *ptr_framebuffer);
        info!("rprContextSetAOV status:{:?}", status);
        status = rprContextSetParameterByKey1f(*self.context, rpr_context_info_RPR_CONTEXT_DISPLAY_GAMMA , 0.2f32 );
        info!("rprContextSetParameterByKey1f status:{:?}", status);
        status = rprContextSetParameterByKey1u(
            *self.context,
            200000 as rpr_context_info,
            10,
        );
        info!("rprContextSetParameterByKey status:{:?}", status);
        status = rprFrameBufferClear( *ptr_framebuffer);
        info!("rprFrameBufferClear status:{:?}", status);
        status = rprContextRender(*self.context);
        info!("rprContextRender status:{:?}", status);
        status = rprContextResolveFrameBuffer(
            *self.context,
            *ptr_framebuffer,
            *ptr_framebuffer,
            1,
        );
        info!("rprContextResolveFrameBuffer status:{:?}", status);
        let mut size: *mut usize = alloc(Layout::new::<usize>()) as *mut usize;
        status = rprFrameBufferGetInfo(
            *ptr_framebuffer_resolved,
            rpr_framebuffer_info_RPR_FRAMEBUFFER_DATA,
            0,
            null_mut(),
            size,
        );
        info!("rprFrameBufferGetInfo status:{:?}", status);
        let mut buffer = vec![255; *size / size_of::<u32>()];
        status = rprFrameBufferGetInfo(
            *ptr_framebuffer_resolved,
            rpr_framebuffer_info_RPR_FRAMEBUFFER_DATA,
            *size,
            buffer.as_mut_ptr() as *mut c_void,
            0 as *mut usize,
        );
        info!("rprFrameBufferGetInfo status:{:?}", status);
        status = rprFrameBufferSaveToFile(*ptr_framebuffer_resolved, "31_temp.bin\0".as_ptr() as *const i8);
        info!("rprFrameBufferSaveToFil status:{:?}", status);
        buffer`

Need C# wrapper for RadeonProRender_Baikal.h and RadeonProRender_VK.h

Hi there, I was wondering if it would be possible to also get a C# wrapper for the remaining bits of API outside of RadeonProRender.h, such as Baikal and Vulkan.

Are you using any particular technology to generate these wrapper automatically ? Is there way to proper "AMD way" generate these on our side so that we don't have to write them by hand ?

Also, what about "RadeonProRender_V2.h" and C# ? I suppose the existing C# wrapper is for the V1, is it necessary to use the V2 to get all the features ?

Thanks in advance and cheers,

Mathieu.

tutorial binaries lacking LC_RPATH loader command in macOS

Hello!

Maybe I'm the only person to try the samples under macOS, because it seems like they can't possibly work as written. In a nutshell, the built binaries try to load libRadeonProRender64.dylib at the path @rpath/libRadeonProRender64.dylib, however no LC_RPATH loader command is present, so at runtime the dylib is not found and the process exits.

andre@boop RadeonProRenderSDK % ./tutorials/Bin/03_instance64                                            
dyld: Library not loaded: @rpath/libRadeonProRender64.dylib
  Referenced from: /Users/andre/work/RadeonProRenderSDK/./tutorials/Bin/03_instance64
  Reason: image not found
zsh: abort      ./tutorials/Bin/03_instance64

andre@boop RadeonProRenderSDK % otool -l tutorials/Bin/03_instance64 | egrep -A 2 -i 'lc_load_dylib|lc_rpath' 
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name @rpath/libRadeonProRender64.dylib (offset 24)
--
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
--
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)

Adding a load command to set LC_RPATH solves the problem. In my case:

andre@boop RadeonProRenderSDK % install_name_tool -add_rpath /Users/andre/work/RadeonProRenderSDK/RadeonProRender/binMacOS tutorials/Bin/03_instance64 

andre@boop RadeonProRenderSDK % otool -l tutorials/Bin/03_instance64 | egrep -A 2 -i 'lc_load_dylib|lc_rpath'
          cmd LC_LOAD_DYLIB
      cmdsize 64
         name @rpath/libRadeonProRender64.dylib (offset 24)
--
          cmd LC_LOAD_DYLIB
      cmdsize 48
         name /usr/lib/libc++.1.dylib (offset 24)
--
          cmd LC_LOAD_DYLIB
      cmdsize 56
         name /usr/lib/libSystem.B.dylib (offset 24)
--
          cmd LC_RPATH
      cmdsize 80
         path /Users/andre/work/RadeonProRenderSDK/RadeonProRender/binMacOS (offset 12)

andre@boop RadeonProRenderSDK % ./tutorials/Bin/03_instance64 
Radeon ProRender SDK simple rendering tutorial.
Context successfully created.
Rendering finished.

Add a tutorial for the fullspectrum rendering

I am trying to make the rasterization backend working without success, it would pretty nice to have a tutorial that explain how set up a viewport with the fullspectrum rendering feature.

Linux "premake5" binary lacks execute permissions after git clone.

Following the 3 steps of build instructions in readme.md leads to failure since the "premake5" binary lacks execute permissions after cloning the git repo. So, either the permissions of the file need to be corrected, or one additional "chmod 755" step has to be added to the readme.md instructions for linux.

eclipse - johns:/tmp % mkdir rpr
eclipse - johns:/tmp % cd rpr
eclipse - johns:/tmp/rpr % git clone https://github.com/GPUOpen-LibrariesAndSDKs/RadeonProRenderSDK.git
Cloning into 'RadeonProRenderSDK'...
remote: Enumerating objects: 41, done.
remote: Counting objects: 100% (41/41), done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 1463 (delta 13), reused 17 (delta 8), pack-reused 1422
Receiving objects: 100% (1463/1463), 352.69 MiB | 14.03 MiB/s, done.
Resolving deltas: 100% (937/937), done.
Updating files: 100% (183/183), done.
eclipse - johns:/tmp/rpr % cd RadeonProRenderSDK/
eclipse - johns:/tmp/rpr/RadeonProRenderSDK % cd tutorials/
eclipse - johns:/tmp/rpr/RadeonProRenderSDK/tutorials % ../premake5/linux64/premake5 gmake
../premake5/linux64/premake5: Permission denied.
eclipse - johns:/tmp/rpr/RadeonProRenderSDK/tutorials % ls -al ../premake5/linux64/premake5
-rw-r--r-- 1 johns johns 2262056 Mar 10 14:42 ../premake5/linux64/premake5

The subsequent steps work correctly after manually fixing the "premake5" file permissions:

eclipse - johns:/tmp/rpr/RadeonProRenderSDK/tutorials % chmod 755 ../premake5/linux64/premake5
eclipse - johns:/tmp/rpr/RadeonProRenderSDK/tutorials % ../premake5/linux64/premake5 gmake
Building configurations...
Running action 'gmake'...
Generated Makefile...
Generated build/00_context_creation.make...
Generated build/01_camera_setup.make...
Generated build/02_mesh.make...
Generated build/03_instance.make...
Generated build/04_deformation_motion_blur.make...
Generated build/10_light_point.make...
Generated build/11_light_mesh.make...
Generated build/12_light_environment.make...
Generated build/20_material_textured.make...
Generated build/21_material_layered.make...
Generated build/22_material_uber.make...
Generated build/23_material_uber_sss.make...
Generated build/30_tiled_render.make...
Generated build/31_framebuffer_access.make...
Generated build/32_gl_interop.make...
Generated build/33_aov.make...
Generated build/40_postprocess_bloom.make...
Generated build/41_postprocess_gamma.make...
Generated build/50_curve.make...
Generated build/51_volume.make...
Generated build/60_mesh_export.make...
Generated build/61_mesh_import.make...
Generated build/62_matball_demo.make...
Generated build/63_hybrid.make...
Generated build/64_mesh_obj_demo.make...
Done (67ms).

Getting RGB values from frame buffer

Is there a way to get RGBA values from frame buffer ? The closes' thing I found to it is under the ocio tutorial. Any further insight for me ?
Another question, how is a preview in software like Blender and Maya achieved, am I supposed to use one of the interop headers like RadeonProRender_VK ?

Camera differences in full spectrum rendering

Hi,

I've noticed the camera behaves differently in full spectrum rendering versus the ultra rendering modes. The camera setup follows the same code paths on my end but I get vastly different rendering results. The image seems horizontally stretched. Is this a known issue or do I need to setup the cameras differently between the two modes?

Hybrid
Ultra

Depth AOV generate empty image

Wen generate RPR_AOV_DEPTH the result image is empty.

I'm using the tutorial 33_aov, with this changes:

// before render
rpr_framebuffer frame_buffer_depth, frame_buffer_depth2;
CHECK(rprContextCreateFrameBuffer(context, fmt, &desc, &frame_buffer_depth));
CHECK(rprContextCreateFrameBuffer(context, fmt, &desc, &frame_buffer_depth2));
CHECK(rprFrameBufferClear(frame_buffer_depth));
CHECK(rprFrameBufferClear(frame_buffer_depth2));
CHECK(rprContextSetAOV(context, RPR_AOV_DEPTH, frame_buffer_depth));

// after render
CHECK(rprContextResolveFrameBuffer(context, frame_buffer_depth, frame_buffer_depth2, true));
CHECK(rprFrameBufferSaveToFile(frame_buffer_depth2, "33_depth.png"));

OS: Windows 10
GPU: Radeon RX 5500 XT
Driver: 20.5.1

33_depth

Add a tutorial to show how to create a context with multiple backends

I tried to create a context with both plugins hybrid and northstar backends, the creation of the context fails. I have no issue when I create them one by one and switching them by modifying the code.

I suspect the issue is that I use RPR_CONTEXT_CREATEPROP_HYBRID_VERTEX_MEMORY_SIZE and RPR_CONTEXT_CREATEPROP_HYBRID_ACC_MEMORY_SIZE properties for the creation of the hybrid backend that the northstar backend can't manage.
If I try to create the context with only the northstar plugin and RPR_CONTEXT_CREATEPROP_HYBRID_VERTEX_MEMORY_SIZE and RPR_CONTEXT_CREATEPROP_HYBRID_ACC_MEMORY_SIZE properties it fails with the RPR_ERROR_INTERNAL_ERROR error code.

May the northstar fails his initialization when it doesn't reconnnize some properties?

I think that it will be a great thing to have a tutorial that show how to proceed to create a context with multiples plugins if it is the correct way to be able to do a full spectrum renderer.

rpr_status -4 Undocumented

(Rust) via bindings. Im getting an rpr_status -4 when calling rprContextRender on Northstar on Tahoe not, but I'm getting a black render. rpr_status -4 is undocumented on rpr_status any advice ? After some testing it seems to be a gpu issue, I'm using Nvidia with the latest drivers. Im also getting a weird render
31_temp

How to get access to RPR 2.0 Beta?

Hey guys, I can only find the repo for 1.35, how would I get access to the 2.0 beta? Also, if possible I'd like to get source access so that I can investigate porting to other platforms. Thanks

Curves with emission are rendered in black

I'm using RadeonProRender.jl in Julia, and can't get emission working on a curve object. I'm not sure if it's a bug in the Julia implementation, a limitation of the SDK, or something else. I can't post a minimal example because this is all WIP Julia code, but here's an image showing the result:

grafik

This is a line segment primitive which the RPRMakie package transforms into RPR Curves, roughly like this:

curve = RPR.Curve(context, points, indices, radius, Vec2f.(0.0, LinRange(0, 1, nsegments)),
                      fill(1, nsegments))
    material = RPR.UberMaterial(matsys)
material.emission_color = to_color(:red) # should create red light?
material.emission_weight = 1000 # I tried to make it really strong as well, no effect visible
# I tried to set the double-sided mode to true or false in case the curves had inward normals for some reason
# material.emission_mode = false
set!(curve, material.node)

Ray query support

Are low-level ray queries (e.g. arbitrary origin rays, intersection data, etc.) accessible from the ProRender SDK? Or only from RadeonRays? I'd like to be able to access these features without losing the convenience of ProRender's material support.

Also, out of curiosity, is there another developer forum elsewhere? Light traffic here, so just wondering if I'm in the right place. :)

IES Light

I want to create the same scene with IES light from the maya demo:

https://radeon-pro.github.io/RadeonProRenderDocs/en/plugins/maya/photometric_light.html?highlight=ies

The parameters I'm using are:

  • IESLightSetImageFromIESdata = (ies file), 255, 255
  • IESLightSetRadiantPower3f = 2, 2, 2

The image in maya is this:

image

and when I render in RPR I get this:

13

I don't understand what parameters and values I need to use to have the same light spread

Thanks,

My computer info:
Windows 10 Pro
GPU: Radon RX 550XT
Driver: 20.5.1
Plugin; Tahoe
RPR_VERSION_MAJOR_MINOR_REVISION 0x00103503
RPR_VERSION_BUILD 0x92f604e2

Tracing files:
rpr-tracing-104d418e-c9cd-4962-b58a-ef59b412c5e1.zip

IES Files:
iesfiles.zip

RenderDoc profiling crashes

Hi there, when I try to attach RenderDoc for graphics profiling I get a error leading to a crash when calling rprContextCreateMesh() with return code -18.

The code works fine when RenderDoc is not attached.

image

Is graphics profiling even supposed to be supported ?

Thanks in advance,
Mathieu.

Prorender for Maya 2023

I can't install Pro Render to Maya 2023. Supports up to 2022. Please add support for 2023 too. Thanks

Blender 3.5.1 / Prorender 3.6 / Polaris

When using this Combination - Blender crashes immediately after going to interactive view or hitting render - empty scene just default cube. Prorender 3.5 was working mostly fine - i suspect this has something to do with the Backend switch to VK / HIP -
ProRender beeing the only option as Cycles also would not run via HIP on Polaris Cards. Could theese be added - since OpenCL never was working correctly after Blender 2.8 on theese ( Crashes / Memory Corruption but ONLY in Cycles ) - RPR was working Lux was working using OpenCL. Now it would be very nice to have HIP for Polaris Cards too - since their been good stable workhorses otherwise. If not then could PLEASE somone look at the Cycles 2.93 LTS Source and fix that Memory corruption issue which completelly destroys the driver to a Hardcrash at least - so there is maybe ONE Version finally running after 7 Years :p ?

Thx & Cheers!

Debug:
Error: Required instance extension VK_KHR_get_physical_device_properties2 is not supported. ContextNode::Initialize: "Error: Required instance extension VK_KHR_get_physical_device_properties2 is not supported." Error: Fatal error: Could not create Vulkan instance, VkResult=-1 2023-06-07 19:37:40,176 WARNING rpr.engine.init [30808]: ('Plugin is not registered', WindowsPath('C:/Users/redacted/AppData/Roaming/Blender Foundation/Blender/3.5/scripts/addons/rprblender/Hybrid.dll'), '') 2023-06-07 19:37:40,790 INFO rpr.material_library [30808]: Material library located at C:\ProgramData\RadeonProRender\MaterialLibrary\Xml I0607 19:37:41.289916 30808 device.cpp:47] CUEW initialization failed: Error opening the library I0607 19:37:41.289916 30808 device.cpp:32] HIPEW initialization succeeded I0607 19:37:41.289916 30808 device.cpp:34] Found precompiled kernels Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FFD6E5F0F1D Module : amdhip64.dll Thread : 000060b0

Blender Build:
version: 3.5.1, branch: blender-v3.5-release, commit date: 2023-04-24 18:11, hash: e1ccd9d4a1d3, type: release build date: 2023-04-24, 23:56:35 platform: 'Windows-10-10.0.19045-SP0' binary path: 'D:\\Software\\blender-3.5.1-windows-x64\\blender.exe' build cflags: /W3 /w34062 /w34115 /w34189 /w35038 /wd4018 /wd4146 /wd4065 /wd4127 /wd4181 /wd4200 /wd4244 /wd4267 /wd4305 /wd4800 /wd4828 /wd4996 /wd4661 /wd4848 /we4013 /we4133 /we4431 /we4033 /DWIN32 /D_WINDOWS /W3 /nologo /J /Gd /MP /bigobj /Zc:inline -openmp build cxxflags: /W3 /w34062 /w34115 /w34189 /w35038 /wd4018 /wd4146 /wd4065 /wd4127 /wd4181 /wd4200 /wd4244 /wd4267 /wd4305 /wd4800 /wd4828 /wd4996 /wd4661 /wd4848 /we4013 /we4133 /we4431 /we4033 /DWIN32 /D_WINDOWS /W3 /EHsc /nologo /J /Gd /MP /EHsc /bigobj /Zc:inline /permissive- /Zc:twoPhase- -openmp /Zc:__cplusplus build linkflags: /MACHINE:X64 /SUBSYSTEM:CONSOLE /STACK:2097152 /ignore:4049 /ignore:4217 /ignore:4221 build system: CMake

GPU:
`
GPU:

renderer: 'Radeon (TM) RX 480 Graphics'
vendor: 'ATI Technologies Inc.'
version: '4.5.0 Core Profile Context 23.4.2.230412'
device type: 'AMD'
backend type: 'OPENGL'
extensions:
GL_AMD_blend_minmax_factor
GL_AMD_depth_clamp_separate
GL_AMD_gpu_shader_half_float
GL_AMD_gpu_shader_int16
GL_AMD_gpu_shader_int64
GL_AMD_pinned_memory
GL_AMD_sample_positions
GL_AMD_shader_trinary_minmax
GL_AMD_vertex_shader_layer
GL_AMD_vertex_shader_viewport_index
GL_ARB_ES2_compatibility
GL_ARB_ES3_compatibility
GL_ARB_arrays_of_arrays
GL_ARB_base_instance
GL_ARB_bindless_texture
GL_ARB_blend_func_extended
GL_ARB_buffer_storage
GL_ARB_clear_buffer_object
GL_ARB_clear_texture
GL_ARB_clip_control
GL_ARB_color_buffer_float
GL_ARB_compute_shader
GL_ARB_conditional_render_inverted
GL_ARB_conservative_depth
GL_ARB_copy_buffer
GL_ARB_copy_image
GL_ARB_cull_distance
GL_ARB_debug_output
GL_ARB_depth_buffer_float
GL_ARB_depth_clamp
GL_ARB_depth_texture
GL_ARB_derivative_control
GL_ARB_direct_state_access
GL_ARB_draw_buffers
GL_ARB_draw_buffers_blend
GL_ARB_draw_elements_base_vertex
GL_ARB_draw_indirect
GL_ARB_draw_instanced
GL_ARB_enhanced_layouts
GL_ARB_explicit_attrib_location
GL_ARB_explicit_uniform_location
GL_ARB_fragment_coord_conventions
GL_ARB_fragment_layer_viewport
GL_ARB_fragment_program
GL_ARB_fragment_program_shadow
GL_ARB_fragment_shader
GL_ARB_framebuffer_no_attachments
GL_ARB_framebuffer_object
GL_ARB_framebuffer_sRGB
GL_ARB_geometry_shader4
GL_ARB_get_program_binary
GL_ARB_get_texture_sub_image
GL_ARB_gl_spirv
GL_ARB_gpu_shader5
GL_ARB_gpu_shader_fp64
GL_ARB_half_float_pixel
GL_ARB_half_float_vertex
GL_ARB_indirect_parameters
GL_ARB_instanced_arrays
GL_ARB_internalformat_query
GL_ARB_internalformat_query2
GL_ARB_invalidate_subdata
GL_ARB_map_buffer_range
GL_ARB_multi_bind
GL_ARB_multi_draw_indirect
GL_ARB_multisample
GL_ARB_multitexture
GL_ARB_occlusion_query
GL_ARB_occlusion_query2
GL_ARB_parallel_shader_compile
GL_ARB_pipeline_statistics_query
GL_ARB_pixel_buffer_object
GL_ARB_point_parameters
GL_ARB_point_sprite
GL_ARB_polygon_offset_clamp
GL_ARB_program_interface_query
GL_ARB_query_buffer_object
GL_ARB_robustness
GL_ARB_sample_shading
GL_ARB_sampler_objects
GL_ARB_seamless_cube_map
GL_ARB_seamless_cubemap_per_texture
GL_ARB_separate_shader_objects
GL_ARB_shader_atomic_counters
GL_ARB_shader_ballot
GL_ARB_shader_bit_encoding
GL_ARB_shader_clock
GL_ARB_shader_draw_parameters
GL_ARB_shader_group_vote
GL_ARB_shader_image_load_store
GL_ARB_shader_image_size
GL_ARB_shader_objects
GL_ARB_shader_precision
GL_ARB_shader_stencil_export
GL_ARB_shader_storage_buffer_object
GL_ARB_shader_subroutine
GL_ARB_shader_texture_image_samples
GL_ARB_shader_texture_lod
GL_ARB_shader_viewport_layer_array
GL_ARB_shading_language_100
GL_ARB_shading_language_420pack
GL_ARB_shadow
GL_ARB_shadow_ambient
GL_ARB_sparse_buffer
GL_ARB_sparse_texture
GL_ARB_spirv_extensions
GL_ARB_stencil_texturing
GL_ARB_sync
GL_ARB_tessellation_shader
GL_ARB_texture_barrier
GL_ARB_texture_border_clamp
GL_ARB_texture_buffer_object
GL_ARB_texture_buffer_range
GL_ARB_texture_compression
GL_ARB_texture_compression_bptc
GL_ARB_texture_compression_rgtc
GL_ARB_texture_cube_map
GL_ARB_texture_cube_map_array
GL_ARB_texture_env_add
GL_ARB_texture_env_combine
GL_ARB_texture_env_dot3
GL_ARB_texture_filter_anisotropic
GL_ARB_texture_filter_minmax
GL_ARB_texture_float
GL_ARB_texture_gather
GL_ARB_texture_mirror_clamp_to_edge
GL_ARB_texture_multisample
GL_ARB_texture_multisample_no_array
GL_ARB_texture_non_power_of_two
GL_ARB_texture_query_levels
GL_ARB_texture_rectangle
GL_ARB_texture_rg
GL_ARB_texture_rgb10_a2ui
GL_ARB_texture_stencil8
GL_ARB_texture_storage
GL_ARB_texture_storage_multisample
GL_ARB_texture_swizzle
GL_ARB_texture_view
GL_ARB_timer_query
GL_ARB_transform_feedback
GL_ARB_transform_feedback2
GL_ARB_transform_feedback3
GL_ARB_transform_feedback_instanced
GL_ARB_transform_feedback_overflow_query
GL_ARB_transpose_matrix
GL_ARB_uniform_buffer_object
GL_ARB_vertex_array_bgra
GL_ARB_vertex_array_object
GL_ARB_vertex_attrib_64bit
GL_ARB_vertex_attrib_binding
GL_ARB_vertex_buffer_object
GL_ARB_vertex_program
GL_ARB_vertex_shader
GL_ARB_vertex_type_10f_11f_11f_rev
GL_ARB_vertex_type_2_10_10_10_rev
GL_ARB_viewport_array
GL_ARB_window_pos
GL_ATI_draw_buffers
GL_ATI_meminfo
GL_ATI_separate_stencil
GL_ATI_shader_texture_lod
GL_ATI_texture_env_combine3
GL_EXT_abgr
GL_EXT_bgra
GL_EXT_blend_color
GL_EXT_blend_equation_separate
GL_EXT_blend_func_separate
GL_EXT_blend_minmax
GL_EXT_blend_subtract
GL_EXT_clip_cull_distance
GL_EXT_color_buffer_half_float
GL_EXT_compiled_vertex_array
GL_EXT_copy_buffer
GL_EXT_copy_image
GL_EXT_debug_label
GL_EXT_depth_bounds_test
GL_EXT_direct_state_access
GL_EXT_draw_buffers2
GL_EXT_draw_buffers_indexed
GL_EXT_draw_range_elements
GL_EXT_fog_coord
GL_EXT_framebuffer_blit
GL_EXT_framebuffer_multisample
GL_EXT_framebuffer_object
GL_EXT_framebuffer_sRGB
GL_EXT_geometry_point_size
GL_EXT_geometry_shader4
GL_EXT_gpu_program_parameters
GL_EXT_gpu_shader4
GL_EXT_gpu_shader5
GL_EXT_memory_object
GL_EXT_memory_object_win32
GL_EXT_multi_draw_arrays
GL_EXT_nonuniform_qualifier
GL_EXT_packed_depth_stencil
GL_EXT_packed_pixels
GL_EXT_pixel_buffer_object
GL_EXT_point_parameters
GL_EXT_polygon_offset_clamp
GL_EXT_provoking_vertex
GL_EXT_render_snorm
GL_EXT_sRGB_write_control
GL_EXT_secondary_color
GL_EXT_semaphore
GL_EXT_semaphore_win32
GL_EXT_shader_image_load_store
GL_EXT_shader_integer_mix
GL_EXT_shader_io_blocks
GL_EXT_shadow_funcs
GL_EXT_stencil_wrap
GL_EXT_tessellation_point_size
GL_EXT_tessellation_shader
GL_EXT_texture3D
GL_EXT_texture_array
GL_EXT_texture_border_clamp
GL_EXT_texture_buffer
GL_EXT_texture_buffer_object
GL_EXT_texture_compression_bptc
GL_EXT_texture_compression_latc
GL_EXT_texture_compression_rgtc
GL_EXT_texture_compression_s3tc
GL_EXT_texture_edge_clamp
GL_EXT_texture_env_add
GL_EXT_texture_env_combine
GL_EXT_texture_env_dot3
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_integer
GL_EXT_texture_lod
GL_EXT_texture_lod_bias
GL_EXT_texture_mirror_clamp
GL_EXT_texture_object
GL_EXT_texture_rectangle
GL_EXT_texture_sRGB
GL_EXT_texture_sRGB_R8
GL_EXT_texture_sRGB_RG8
GL_EXT_texture_sRGB_decode
GL_EXT_texture_shared_exponent
GL_EXT_texture_snorm
GL_EXT_texture_storage
GL_EXT_timer_query
GL_EXT_transform_feedback
GL_EXT_vertex_array
GL_KHR_blend_equation_advanced
GL_KHR_debug
GL_KHR_no_error
GL_KHR_parallel_shader_compile
GL_KHR_robust_buffer_access_behavior
GL_KHR_robustness
GL_NV_blend_square
GL_NV_copy_image
GL_NV_depth_buffer_float
GL_NV_float_buffer
GL_NV_primitive_restart
GL_NV_shader_atomic_int64
GL_NV_texture_barrier
GL_OES_EGL_image
GL_OVR_multiview
GL_OVR_multiview2
GL_OVR_multiview_multisampled_render_to_texture
GL_S3_s3tc
WGL_EXT_swap_control

Implementation Dependent GPU Limits:

Maximum Batch Vertices: 536870911
Maximum Batch Indices: 536870911

GLSL:
Maximum Varying Floats: 64
Maximum Vertex Attributes: 32
Maximum Vertex Uniform Components: 8000
Maximum Fragment Uniform Components: 8000
Maximum Vertex Image Units: 32
Maximum Fragment Image Units: 32
Maximum Pipeline Image Units: 160

Features:
Compute Shader Support: 1
Shader Storage Buffer Objects Support: 1
Image Load/Store Support: 1

`

[Question] Rendering a scene with a 3D skybox

Context

  • I'm rendering Source engine BSPs which (usually) have a 3D skybox
  • These are implemented as:
    • Geometry stored in the same manner as the main world, with no distinction
    • A number of faces with a SKY flag set surrounding the main world
      • usually forming a cube without its bottom face, but can be more complex
    • A "sky camera" which defines the origin of the skybox coordinate space
  • At runtime, the game renders the player's view transformed to the skybox to a render target, which is then rendered to the sky faces in screen space
  • A somewhat technical definition of BSPs themselves for extra context:

Problems

  • Rays that hit sky surfaces need to be transformed to the skybox coordinate space (via the sky camera's transform and a scale factor)
  • If using the HybridPro plugin, the raster pass would (by my understanding) need to render the skybox perspective to an RT as the Source implementation does
    • Performing this render seems trivial, but compositing the RT into the view less so
    • It could be as easy as rendering the player's real view over the top of the previous RT, if we can count sky faces as misses or as alpha 0 (without rendering what's behind)
  • It's not possible to just remove the sky faces from the mesh, as the 3D skybox is usually placed directly above the main world
    • This causes the skybox vertices to be visible from the player's perspective
  • It's also not possible to accurately remove the 3D skybox vertices themselves, as they're indistinguishable from other geometry
  • If any of the ProRender plugins use bidirectional path tracing, then light rays for directional/ibl/etc lighting would need to start within the sky faces

Acceptable solution

If all of the above is not possible to solve with ProRender, the following would be enough to get a reasonable effect:

  • Count all rays that hit sky faces as misses
  • Discard all sky face fragments for the hybrid raster pass

This would prevent any erroneous rendering of the 3D skybox and would allow rendering the 3D skybox using the same method as Source (compositing two separate renders).

The only issue with this is that elements of the skybox wont affect the lighting of the main world (i.e. a tall building in the skybox wont cast a shadow outside of the skybox)

Questions

  • Is the full solution possible with ProRender, and if so, how?
  • Is the acceptable solution possible with ProRender, and if so, how?
  • If none of this is possible, could it be added?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.