VRay SDK for C++
Loading...
Searching...
No Matches
VRay::ProxyCreateParams Struct Reference

Used by VRay::Proxy::createMeshFile() More...

#include <vraysdk.hpp>

Public Types

enum  PreviewTypes { SIMPLIFY_FACE_SAMPLING = 0 , SIMPLIFY_CLUSTERING , SIMPLIFY_EDGE_COLLAPSE , SIMPLIFY_COMBINED }
 

Public Attributes

int animOn
 enables saving multiple animated frames in the proxy
 
Bool bakeTransforms
 when enabled (default), applies the input Transform(s) to the geometry data, otherwise writes the Transform(s) into separate data channel
 
std::string customPreviewFile
 file name to read and use its vertices and faces for the preview voxel
 
std::string destination
 destination file name
 
int elementsPerVoxel
 number of triangles in each voxel
 
int endFrame
 used if animOn is true
 
Bool exportPointCloud
 when enabled, adds a point cloud representation of the mesh separated into different levels of detail. The various levels of detail can be used by proxies for saving memory when rendering distant objects.
 
int mergeVoxels
 merge all voxels of the same type, before subdivision
 
std::vector< int > objectIDs
 array of unique IDs for the respective meshes. This should usually match Node.objectID values.
 
std::vector< std::string > objectNames
 array of names to associate with respective meshes. This can be used to identify the pieces when reading the proxy.
 
float pointSize
 determines the size of point cloud disks at the most detailed level. If this value is small, point clouds rendered at the lowest level appear closer to original mesh but use more memory.
 
int previewFaces
 approximate number of preview triangles (default 10000; set to 0 to disable preview)
 
int previewHairs
 number of preview hairs (default 1000)
 
int previewParticles
 number of preview particles (default 20000)
 
int previewType
 
int startFrame
 used if animOn is true
 
std::vector< Bool > voxelInfoFlipNormals
 array of flipNormals flags (1 flag per mesh object - true if the geometric normals should be flipped)
 
std::vector< Bool > voxelInfoSmoothed
 array of smoothed flags (1 flag per mesh object - true if the voxel should be rendered with smoothed normals)
 
std::vector< ColorvoxelInfoWireColor
 array of diffuse (wire) colors - 1 Color per mesh object
 

Detailed Description

Member Enumeration Documentation

◆ PreviewTypes

Enumerator
SIMPLIFY_FACE_SAMPLING 

Copy faces from the original model, leaving them unchanged. This method is the fastest, but the resulting triangles are not connected, and for a detailed model it will produce a semi-transparent cloud of triangles.

SIMPLIFY_CLUSTERING 

Split the model with a grid and keep one vertex from each cell Runs in O(n) time, deals well with disconnected triangles and produces relatively good results. It will not produce exactly the desired number of faces.

SIMPLIFY_EDGE_COLLAPSE 

Choose an edge based on a heuristic and collapse it to a single vertex, repeat until the desired number of faces is reached. Produces the best results, except on disconnected triangles, but is slower - O(nlogn).

SIMPLIFY_COMBINED 

Combines clustering and edge collapse. First, vertex clustering is applied, targeting 4 times the final number of faces. Then edge collapse is applied. This is almost as fast as face sampling, deals well with disconnected triangles, and the results are almost as good as edge collapse. This is the recommended type if you don't need the fastest possible preview generation, which is face sampling.

Member Data Documentation

◆ previewType

int VRay::ProxyCreateParams::previewType
See also
enum PreviewTypes

The documentation for this struct was generated from the following file: