[BETA] kvrVraySceneRender Fuse

Where the future is being made, today.

Welcome to the WSL development corner!

In this forum, please post your development projects. You get kudos and feedback here.
Topics ideally have preset prefixes, and this is what they (might) mean:

  • [DEV] - very much work in progress, don't build a business on this, could go anywhere
  • [BETA] - should kinda do what it's supposed to do, please test, give feedback
  • [RC] - this may end up in Reactor soon, polishing up, now's the time for last minute thoughts
  • [ABD] - died a premature death, sadness, will not see the light of day ever (unless someone picks up the scraps)

Once a development project has been released (hurray), topics can be marked as - you guessed it - [RELEASED] :cheer:

Development topics only, please. For generic questions, how-to's, questions and inquiries about existing tools etc, please go to the appropriate other forums.
User avatar
AndrewHazelden
Fusius Of Borg
Posts: 2607
Joined: 10 years ago
Reactions score: 2
Location: West Dover, Nova Scotia, Canada
Has thanked: 6 times
Been thanked: 23 times
Contact:

[BETA] kvrVraySceneRender Fuse

#1

Unread post by AndrewHazelden »

KartaVR kvrVraySceneRender - v1.0 2022-01-16 10.15 AM
By Andrew Hazelden <andrew@andrewhazelden.com>

Fuse Support Requirements

  • An OpenCL, CUDA, or Metal based GPU
  • Fusion Studio 16-17.4.2+ or Resolve 16-17.4.2+

Open-Source Software License Term

The kvrVraySceneRender.fuse is Apache 2.0 licensed.

Overview

Render V-Ray based .vrscene file assets interactively from the V-Ray VFB window, from within the comfort of a Resolve/Fusion GUI or Fusion Render Node session, via V-Ray Universal Render Node command-line interface bindings.

Download

Place this file in your Reactor:/Deploy/Fuses/Kartaverse/ PathMap folder.
(You make need to create the intermediate sub-folders by hand.)
kvrVraySceneRender.fuse

Fuse Screenshots

Image

Image

GUI Controls

The VRScene Filename control supports the use of PathMaps and %04d style frame padding characters.
The EXR Filename control supports the use of PathMaps and %04d style frame padding characters.

The "Static Frame" control allows you to load either a (static) single image, or an image sequence.

The "Interactive" control allows you to have the rendering launched during a Fusion Studio GUI artist session. When this control is unchecked renderings are only carried out during batch renders.

The "Skip Rendering if image exists" checkbox allows you to make sure you aren't re-rendering the same frame again. This control will look for the expected image name on disk and only launch a rendering of a new image if no image file is found.

Workflow Notes

This fuse works with Cryptomatte since it adds a Metadata.Filename record to the image output stream generated by the node. This allows Cryptomatte masking operations to work in Fusion if the VRScene file being rendered has the Cryptomatte Render Element Enabled.

Todo Sooner

  • Error handling - missing vray host program error is mis-identified as a missing scene.
  • Drag and drop import .vrscene file into Fusion comp view.
  • Parse the vrscene file on drag/drop import to look for scene filename token
  • "Open VRScene in Script Editor" Button - Open the file with the Script editor defined in the Fusion preferences
  • VRay Bin hosts on MacOS/Win/Linux selector

Todo Later

  • Customize EXR Filename
  • Render Element Override controls
  • figure out multi-rendering of same frame issue
  • Check-point auto-save image every N minutes
  • Get EXR image name from popen result
  • Batch vs interactive rendering
  • VFB project workspace - save history tab path
  • Cryptomatte depth is not 32-bit - look at V-Ray frame buffer settings in Maya
  • EffectsMask input on VrayBatchRender sets bucket priority masking

Image Saved File Info

Code: Select all

[2021/Jul/8|06:41:39] [2117 MB] Successfully written image file "/Volumes/Projects/Yeti_Vray_Project/images/tmp/blue_sonic_fur.exr"

When drag/drop importing a vrsene file grab the name from the fields:
Code: [Select all] [Expand/Collapse] [Download] (Sample2.vrscene)
  1. img_file="sphere.exr";
  2. img_dir="/Users/vfx/Documents/maya/projects/default/images/tmp/";
A sample .vrscene code block:
Code: [Select all] [Expand/Collapse] [Download] (Sample2.vrscene)
  1. SettingsOutput vraySettingsOutput {
  2.   img_width=1920;
  3.   img_height=1080;
  4.   img_pixelAspect=1;
  5.   img_file="sphere.exr";
  6.   img_dir="/Users/vfx/Documents/maya/projects/default/images/tmp/";
  7.   img_file_needFrameNumber=0;
  8.   img_separateAlpha=0;
  9.   img_noAlpha=0;
  10.   img_dontSaveRgbChannel=0;
  11.   img_deepFile=0;
  12.   img_rawFile=0;
  13.   img_rawFileVFB=1;
  14.   img_rawFileSaveColorCorrections=0;
  15.   img_clearMode=0;
  16.   anim_start=1;
  17.   anim_end=1;
  18.   anim_frame_padding=4;
  19.   anim_renumber_on=0;
  20.   anim_renumber_start=0;
  21.   anim_renumber_step=1;
  22.   anim_ren_frame_start=0;
  23.   frame_start=1;
  24.   frames_per_second=1;
  25.   frames=ListInt(    1);
  26.   rgn_left=0;
  27.   rgn_width=1920;
  28.   rgn_top=0;
  29.   rgn_height=1080;
  30.   bmp_width=1920;
  31.   bmp_height=1080;
  32.   r_left=0;
  33.   r_width=1920;
  34.   r_top=0;
  35.   r_height=1080;
  36.   relements_separateFolders=0;
  37.   relements_separate_rgba=0;
  38.   relements_divider=".";
  39.   film_offset_x=0;
  40.   film_offset_y=-0;
  41.  
  42. }
You do not have the required permissions to view the files attached to this post.

User avatar
AndrewHazelden
Fusius Of Borg
Posts: 2607
Joined: 10 years ago
Reactions score: 2
Location: West Dover, Nova Scotia, Canada
Has thanked: 6 times
Been thanked: 23 times
Contact:

Re: [BETA] kvrVraySceneRender Fuse

#2

Unread post by AndrewHazelden »

Kartaverse X V-Ray X Domemaster3D Lens Shaders

(Originally posted on LinkedIn for the KartaVR v5 Launch)

I'd like to describe an interesting approach that allows some of that old Domemaster3D for Maya omni-stereo 360° rendering magic to still be carried along into the new-age world of the Kartaverse. ;)

I have been working on an experimental prototype V-Ray compatible batch rendering integration fuse for several months now. It is a slight work-around from a conventional plugin renderer in that the fuse lets you instance a V-Ray .vrscene file exported from any V-Ray hosted DCC package, into a Fusion comp's node graph.

You can scrub the Fusion timeline, and perform interactive renderings with the help of the typical V-Ray VFB. This gives you the ability to access all common VFB window niceties like inspecting render elements while the rendering is ongoing or looking at the sample rate render element.

You can even take advantage of V-Ray's most excellent "DR" distributed rendering mode to massively speed up the rendered output rate. In the case of this screenshot, several AMD Threadripper 3990X workstations were brought online to massively accelerate the 3D rendering. This fuse-based rendering interface supports V-Ray running on the CPU or multiple GPUs in parallel.

Image

If offline batch rendering is what you are after, once you have your .vrscene files constructed and a Fusion node graph built, you can send the final Fusion .comp file, with .vrscene assets present, to any render node on your render farm. The render node needs Fusion Render Node v17 program installed, and a copy of the V-Ray v5.1 Universal Render Node program, too.

Cryptomatte render elements are able to pass interactively into the rest of the Fusion flow from the VrayBatchRender.fuse output soon as the frame completes rendering. This allows an artist to start applying Cryptomatte masking techniques to any EXR image-based 3D element they want from their .vrscene files.

What's most interesting is that V-Ray compatible 360VR omni-stereo lens shaders can be used with the V-Ray Batch Render integration in Resolve/Fusion. This gives artists access to the classic DomeAFL_FOV_Stereo & LatLong_Stereo lens shaders in a new home.

This first implementation was done via the Fuse API. Who knows how far things could be taken down the road if the V-Ray APP SDK integration was used in the future. It's exciting stuff regardless.

Also, users that have PCIe Gen 4 motherboards with 4x multi-GPUs, or 2x GPUs with NVLink bridge connectors, finally have a way to saturate your Resolve system to 100% GPU and 100% CPU usage levels.

Source VRSCENE Media

The .vrscene file was from the Rusty Hazelden "Art of V-Ray" series featured by Future Publishing in "3D Artist" magazine & shown on the Chaos Group V-Ray for Maya Blog.

Chaos Group Maya Blog | Master V-Ray Next for Maya with this 4-part practical guide

https://www.chaos.com/blog/master-v-ray ... ical-guide

YouTube | The Art of V-Ray Vol. 1