tinyScenegraphs v-ray bindingsFriends of tinySG,
with yafaray and embree, tinySG already implemented two ray tracer plugins years ago.
However, the new v-ray plugin takes path-tracing in tinyScenegraph scenes to the next
level. Using a full-featured SDK makes things so much easier and comfortable that it only
took me about 3 weeks to integrate v-ray as a plugin into the tinySG scene editor, csgEdit.
Basic architecturetinyScenegraphs plugin registry enables plugins to cooperate and communicate with each other. Plugins may provide their own user interfaces and access core scene control in csgEdit. This allows the v-ray plugin to access scene geometry, lighting information and material definitions within any loaded scene. It can also communicate with tinyCoiffeur to control hair/fur creation, define hair simulation parameters, trigger the simulator and fetch the results. This way it is pretty simple to enrich any scene with fur or hair, without the hair being part of the originally loaded scene.
The v-ray plugin may open it's own render window and synchronise the virtual camera
with the camera of the regular viewer, pause rendering, assign resources like CPU cores
to v-ray and define other parameters specific to the ray tracer. The raytrace viewer
can display several render elements to show not only the final ray traced image, but also
components, like diffuse or specular lighting, vertex normals, depth, transparency, etc.
Picking inside the v-ray render window first links to v-ray scene nodes, and from there
to the original tinySG scenegraph nodes. Any scene update on the tinySG side emits an
event to all interested plugins. The v-ray plugin catches the event and live-updates the
v-ray scene accordingly.
New features
Intermediate results, july 2022Initial efforts focused on supporting a complete set of pbr material parameters and various types of light sources (point, sphere, spot, directional, area and dome). The plugin takes geometry of various scene shape nodes, mainly indexed tri-, quad- and facesets, as well as material definitions from csgAdvancedMaterial nodes and converts them into v-ray plugin instances.
Once the basics were in place, fur was next as this is the most difficult
part to render using classic OpenGL, and it is useful for many subtle effects
beside rendering teddy bears. tinyCoiffeur "fluff mode"Future plansThe implementation of the v-ray plugin is really an intermediate project to a long running switch to a Vulkan renderer that is supposed to become the new standard interactive renderer core. Once that one is available, ray tracing HW on modern GPUs immediately becomes accessible for all kinds of algorithms, not necessarily focused rendering.
Keep rendering, Acknowledgements and links:
Copyright by Christian Marten, 2009-2022 Last change: 30.07.2022 |