oa::StandardSurfaceMaterial

Full Standard Surface PBR material. Parameterized on Autodesk Standard Surface / OpenPBR. Maps losslessly to glTF 2.0 pbrMetallicRoughness + KHR_materials_ior, KHR_materials_clearcoat, KHR_materials_sheen, and KHR_materials_subsurface_scattering. Arnold and Cycles standard_surface import is a natural correspondence. Texture channel packing (ORM convention): orm_texture R = ambient occlusion, G = roughness, B = metalness. normal_texture stores tangent-space XY as BC5 SNORM; Z is reconstructed as sqrt(saturate(1 - dot(n.xy, n.xy))). All color values are linear at this API boundary.

StRust public API

Declaration

pub struct StandardSurfaceMaterial {Show 28 fields pub base_color: [f32; 3], pub base_color_texture: Option<TextureHandle>, pub metalness: f32, pub roughness: f32, pub orm_texture: Option<TextureHandle>, pub normal_texture: Option<TextureHandle>, pub normal_scale: f32, pub specular_ior: f32, pub specular_tint: [f32; 3], pub emission_color: [f32; 3], pub emission_scale: f32, pub emission_texture: Option<TextureHandle>, pub coat_weight: f32, pub coat_roughness: f32, pub coat_ior: f32, pub coat_normal_texture: Option<TextureHandle>, pub sheen_weight: f32, pub sheen_color: [f32; 3], pub sheen_roughness: f32, pub subsurface_weight: f32, pub subsurface_color: [f32; 3], pub subsurface_radius: [f32; 3], pub opacity: f32, pub opacity_texture: Option<TextureHandle>, pub alpha_mode: AlphaMode, pub alpha_cutoff: f32, pub uv_scale: [f32; 2], pub uv_offset: [f32; 2], }
Public Rust declaration.

Public Methods

pub fn validate(&self) -> Result<()>
fn clone(&self) -> StandardSurfaceMaterial
fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn eq(&self, other: &StandardSurfaceMaterial) -> bool

Associated Functions

fn default() -> Self

Public Data Members

base_color[f32; 3]field
base_color_textureOption<TextureHandle>field
metalnessf32field
roughnessf32field
orm_textureOption<TextureHandle>field
normal_textureOption<TextureHandle>field
normal_scalef32field
specular_iorf32field
specular_tint[f32; 3]field
emission_color[f32; 3]field
emission_scalef32field
emission_textureOption<TextureHandle>field
coat_weightf32field
coat_roughnessf32field
coat_iorf32field
coat_normal_textureOption<TextureHandle>field
sheen_weightf32field
sheen_color[f32; 3]field
sheen_roughnessf32field
subsurface_weightf32field
subsurface_color[f32; 3]field
subsurface_radius[f32; 3]field
opacityf32field
opacity_textureOption<TextureHandle>field
alpha_modeAlphaModefield
alpha_cutofff32field
uv_scale[f32; 2]field
uv_offset[f32; 2]field

Public Method Documentation

pub fn validate(&self) -> Result<()>
No public source comment is attached to this declaration.
fn clone( &self ) -> StandardSurfaceMaterial
No public source comment is attached to this declaration.
fn fmt( &self, f: &mut Formatter<'_> ) -> Result
No public source comment is attached to this declaration.
fn eq( &self, other: &StandardSurfaceMaterial ) -> bool
No public source comment is attached to this declaration.
fn default() -> Self
No public source comment is attached to this declaration.