Importing VRED Files
VRED models usually are pretty advanced scenes including a lot of manual work and knowledge. Those scenes can be imported within Pixyz for seamless usage in various virtual experiences. made with other realtime engines, such as Unity.
Importing a *.vpb file in Pixyz requires Autodesk VRED Pro or Design to be installed (with a valid license) on the same computer on which Pixyz is running.
NOTE Only geometries (meshes or BREP surfaces) and equivalent materials are directly imported inside a Pixyz scene.
Configuring Pixyz API
To start importing *.vpb files in Pixyz, the software needs to be configured when executing a Python file. See Preferences settings:
pxz.core.setModuleProperty("IO", "VredExecutablePath", "C:/Program Files/Autodesk/VREDPro-11.0/bin/WIN64/VREDPro.exe")
Best practices when importing a VRED model using Pixyz
Without PreferLoadMesh
:
- If the *.vpb model contains NURBS data , you can choose to import these by setting your Pixyz IO Preferences as follow:
pxz.core.setModuleProperty("IO", "PreferLoadMesh", "False")
- Due to the nature of *.vpb files, all surfaces will be divided in different occurrences. This will considerably increase the import time and the number of parts. We strongly advise to use the Merge Final Occurences , followed by a CAD repair (orient = False) functions after importing:
a. Importing (wireframe view): 94 235 parts, surfaces are not stitched together
With PreferLoadMesh
set to True
If the preference setting
PreferLoadMesh
is set toTrue
, the mesh displayed in VRED will be imported (any existing UVs and ambient occlusion maps are then preserved).
VRED existing mesh → 50M triangles:
To import ambient occlusion as vertex colors, open Autodesk VRED and set ExportVertexColors to True in Preferences > FileIO > FBX > Export:
Importing Variants
If the preference setting LoadVariant
is set to True, geometrical variants and material variants are imported:
- The custom property
_PIXYZ_TRANSFORM_SWITCH_TAG
is added to the switch occurrences - The custom property
<_PIXYZ_MATERIAL_SWITCH_TAG, *switch material name*>
is added to occurrences having a material switch - Material variants can be retrieved in the material library or in the
_Pixyz_MATERIAL_POOL
occurrence in the Product Structure:
- More information regarding the imported *vpb materials and variants can be found in additional files (created at import). Their links are attached to the
Root
node as custom properties:
Importing animations
An *.fbx file containing information on the *.vpb animations is exported during the process (animations are preserved when importing a *.vpb file). The link is attached to the Root
node as a custom property:
Importing Realistic materials
Properties of VRED shaders included in a *.vpb file can now be retrieved at import as "Custom Materials", by enabling the ImportRealisticMaterial parameter:
pxz.core.setModuleProperty("IO", "ImportRealisticMaterials", "True")
In Pixyz Studio:
The purpose of keeping this information is for digital continuity. For example, if a user wants to recreate VRED-like shaders in an application like Unity and its HDRP renderer (HD Render Pipeline)