Accessing VPB Materials
Pixyz now conveys VPB materials as Pixyz custom Materials which lets you access to all the materials parameters in order to create custom shaders.
For that you need to: mp
- Enable the "ImportRealisticMaterials" preference: Core.Native.NativeInterface.SetModuleProperty("IO", "ImportRealisticMaterials", "True")
- Map the VRED shaders names to your corresponding Unity shaders names in the VredToShaderGraph dictionary in Pixyz.Commons.Utilities.ShaderUtilities.
Example of shader mapping using the Autoshowroom HDRP sample.
- Map the VRED shaders properties names to your corresponding Unity shaders keyword in the VredPropToKeyword dictionary in Pixyz.Commons.Utilities.ShaderUtilities.
Example of properties name mapping using the Autoshowroom HDRP sample.
NOTE Materials conversion from Pixyz to Unity happens in Pixyz.ImportSDK.MaterialConversions. VRED materials are considered as Custom Materials. If during the conversion process, a Custom Material is detected, the ConvertCustomMaterial function is called. This function will try to get all the properties and values of the imported material, but has no idea to which Unity shader properties and values it should map them. That's why you should indicate your shaders and properties mapping.