Vectron (Vector-Polygon) is a Procedural uber primitive, providing infinite procedurally-generated scenes, volumes, and geometry, which bypass Meshes and Volumes. Vectrons have zero-memory footprints, driving increased efficiencies when compared to meshes or volumes generated on CPUs. This enables Vectron to provide procedurally-generated scenes on the GPUThe GPU is responsible for displaying graphical elements on a computer display. The GPU plays a key role in the Octane rendering process as the CUDA cores are utilized during the rendering process. without using VRAM. Vectron provides tools in your workflow, and it helps render triangle-free geometry with the OctaneRender® built-in OSL (Open Shader LanguageA shading language developed by Sony Pictures Imageworks. There are multiple render engines that utilize OSL as it is particularly suited for physically-based renderers.) support and OSL texture shaders.

Procedural primitives using OSL vector geometry nodes let you create complex shapes, surfaces, volumes, warps, operators, and effects. By vectorizing meshes and volumes into Vectron objects, you can manipulate Vectron nodes in new ways. Examples include: spheres, strands, sound waves, infinite planes, liquids, clouds, oceans, flow field, and more.

To start using the Vectron primitives, click on Geometry , then select Vectron to create a Vectron in the Graph Editor (Figure 1).

The Vectron Operators allow the Procedural OSL geometry node graph's workflow to follow the same structure as OSL texture node graphs with 4D mixing, blending, and boundary operator nodes for skinning, Metaballs, and procedural resurfacing. Boolean operations are also enabled in Vectrons (figure 1a).


Figure 1: Creating a Vectron node in the Nodegraph Editor


Figure 1a: Accessing the Vectron nodes in the Node Graph Editor window

The initial Vectron node generates a Sphere object with four default pins:

Figure 2: Bound values


The Vectron node has an OSL script with the following lines of code:

#include <octane-oslintrin.h>
shader Vectron(
float radius = 1 [[float min = 0, float slidermax = 1e4, float sliderexponent = 4]],
vector translate = 0,
output _sdf out = _SDFDEF)
out.dist = distance(P, translate) - radius;

To edit the OSL script, select the node from the Nodegraph Editor window, and then click the Open In Editor icon in the Node Inspector window (Figure 3). Then recompile the script to view the new shape of the Vectron object (Figure 4), and manipulate the new node's attributes generated by the script.

Figure 3: The Open In Editor icon


Figure 4: The Compile icon


Figure 5: A Vectron node with a modified OSL script


You can download the example of the Vectron node in Figure 5 to see it in action here: VectronSphere.orbx

You can also download a collection of Vectron examples here: Fun_With_Vectron (4).orbx

Note: OctaneRender includes some basic operators under Geometry > Vectron, which can subtract and merge Vectron items.


There are also two additional nodes for use with Vectron objects. The Vectron Subtract and Vectron Union nodes can be used to place boolean operations onto two or more Vectron objects.

Applications Of The Vectron Primitive And SDF Surfaces

OctaneRender can render defined SDF surfaces using OSL shaders without the need to convert them to a Mesh first. You can change the surfaces with input variables without having to wait for any processing, and you can also create networks of set operations such as unions, subtractions, intersection, and their smooth variants - none of which need to be meshed before rendering, and all compiled using OSL.

Figure 6: Example of OSL shaders with input variables to manipulate the shape of Vectron objects


Figure 7: Example of a more complex network of set operations (unions, subtractions, intersection, and their smooth variants)


Figure 8: Samples from shadertoy being fed into the OSL vectron geometry node


Figure 9: An example of an SDF smooth union with a Mix materialUsed to mix any two material types. implemented as part of the union