Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following are the types recognized in a V-Ray scene (think .vrscene file). They have corresponding types in the different AppSDK App SDK language bindings. The SDK uses the respective basic language types wherever possible and defines custom type classes for the rest.

  • Basic types: int, bool, float, Color (3 float RGB), AColor (4 float ARGB), Vector (3 float), string (UTF-8), Matrix (3 Vectors), Transform (a Matrix and a Vector for translation).
  • Objects: references to other plugin instances.
  • Typed lists: The typed lists in App SDK are IntList, FloatList, ColorList, VectorList, TransformList and VectorList PluginList.
  • Generic heterogeneous lists: The In C++, the App SDK uses a generic type class called Value for items in a generic list. In C#, Python and Node.js, native language types are used (lists or arrays). Note that generic lists can be nested.
  • Output parameters
    : These are additional values generated by a given plugin which may be used as input by others. For example the TexAColorOp plugin (described in section 5.2) can be referenced directly as a texture, resulting in its default color texture output, but you can also refer to any of its other outputs, like sum, difference, maximum etc. for different results (Note: in some cases connecting an output parameter to an input parameter may not work directly, so you'd have to make the connection through a wrapper plugin like TexAColor or TexFloat).
    In App SDK output parameters are represented by the PluginRef type which combines a plugin reference and an output name.

Parameter polymorphism is an important feature of V-Ray. Texture parameters accept simple (basic) values, so instead of creating an additional texture plugin which generates a single color you just set a Color value to the texture slot. Same goes for float textures and single float values etc. You can also set the value of a texture parameter to an output parameter as described above.

...

  • fov - The horizontal field of view in radians.
  • orthographic - Enable to have orthographic projection instead of perspective (RenderView::fov doesn’t matter in this case, in favor of RenderView::orthographicWidth).
  • transform - A transformation (rotation + translation) which defines where the camera is and how it is rotated. The matrix is in column-major format and you will need to calculate it yourself. You can't set rotation angles as in most 3D software. The default camera orientation with identity matrix is so that +Y is pointing up and -Z is the view direction. If your scene uses +Y for up-axis, you will need to set V-Ray's scene up-axis accordingly - see the Units subsection in the settings section below.

...

  • Node => Instancer2 => N * Node (invisible) -> GeomSomething

    and even

  • Node => Instancer2 => Nodes => Instancer2 => etc.

 


5. Creating materials

Exporting materials is probably the most complicated part, because it may involve complex shader networks, especially in apps with high artistic control, such as the popular DCC tools from Autodesk. Nevertheless, you can get good results even by using only a few plugins.

...

A general note on settings plugins: when you create a new Renderer object there are no instances of them, so you will need to create them before changing parameters. If you start rendering the AppSDK App SDK will create a SettingsOutput and if the render mode is RT it will create SettingsRTEngine. On the other hand, if you're loading a scene from file, it will have instances of most (but not all) settings plugins and you need to use them. This is because every time V-Ray exports a vrscene file it automatically writes out the settings even if they are at default values.

...

These are controlled from the SettingsOutput plugin, but it is one of the few exceptions where you should not touch the plugin directly. The AppSDK App SDK has APIs for setting image and region size (i.e. renderer.setRenderRegion, depends on language).

...

To apply a filter, just create an instance of one of those plugins. You can use only one at a time.

Info
See 3dsMax docs or Maya docs for more info on filters.

...

Info
For parameter descriptions see the Maya docs.

The default values when you create a SettingsColorMapping plugin are different from the recommended values in 3dsMax and Maya for legacy reasons. These are the values you should use for new scenes:

...

If you save the rendered image from the VFB and not from an AppSDK App SDK API, the corresponding Settings{JPEG|PNG|EXR|TIFF} plugin controls compression quality and bits per channel. You may need to change these according to your needs.

...

VRayClipper

Volumetric plugins

...


The information from this page is also available at User Guide V-Ray Application SDK