Rhino C++ API
8.14
|
#include <opennurbs_material.h>
Classes | |
class | ParametersNames |
Public Types | |
enum | BRDFs : int { BRDFs::GGX = 0, BRDFs::Ward = 1 } |
Interface. More... | |
Public Member Functions | |
ON_PhysicallyBasedMaterial (const ON_Material &src) | |
ON_PhysicallyBasedMaterial (const ON_PhysicallyBasedMaterial &src) | |
virtual | ~ON_PhysicallyBasedMaterial () |
virtual int | AddTexture (const ON_Texture &tx) |
virtual int | AddTexture (const wchar_t *filename, ON_Texture::TYPE type) |
double | Alpha (void) const |
Controls Alpha transparency - 1.0 is fully opaque, 0.0 is non-visible. Use opacity for refraction - this overrides all other shading. More... | |
virtual double | Anisotropic (void) const |
Degree of anisotropy. This controls the aspect ratio of the specular highlight. (0 = isotropic, 1 = maximally anisotropic) More... | |
virtual double | AnisotropicRotation (void) const |
Rotates the direction of anisotropy, with 1.0 going full circle. More... | |
virtual ON_4fColor | BaseColor (void) const |
virtual BRDFs | BRDF (void) const |
virtual double | Clearcoat (void) const |
A second, special-purpose specular lobe - Extra white specular layer on top of others. This is useful for materials like car paint and the like. More... | |
virtual double | ClearcoatRoughness (void) const |
Controls clearcoat glossiness (0 = a “satin” appearance, 1 = a “gloss” appearance) More... | |
virtual int | DeleteTexture (const wchar_t *filename, ON_Texture::TYPE type) |
virtual ON_4fColor | Emission (void) const |
Controls emission - uses base color. More... | |
virtual int | FindTexture (const wchar_t *filename, ON_Texture::TYPE type, int i0=-1) const |
Texture access functions - exactly the same as ON_Material. Provided for ease of use. More... | |
virtual bool | IsValid (class ON_TextLog *text_log=nullptr) const |
virtual ON_Material & | Material (void) |
Access the referenced ON_Material. More... | |
virtual const ON_Material & | Material (void) const |
virtual double | Metallic (void) const |
virtual double | Opacity (void) const |
Mix between fully opaque surface at zero and fully glass like transmission at one. More... | |
virtual double | OpacityIOR (void) const |
Index of refraction for transmission. More... | |
virtual double | OpacityRoughness (void) const |
Controls roughness used for transmitted light. More... | |
virtual double | ReflectiveIOR (void) const |
Reflective Ior - see specular amount above. Linked to Specular property. More... | |
virtual double | Roughness (void) const |
Surface roughness, controls both diffuse and specular response. More... | |
void | SetAlpha (double) |
virtual void | SetAnisotropic (double) |
virtual void | SetAnisotropicRotation (double) |
virtual void | SetBaseColor (const ON_4fColor &) |
virtual void | SetBRDF (const BRDFs &) |
virtual void | SetClearcoat (double) |
virtual void | SetClearcoatRoughness (double) |
virtual void | SetEmission (ON_4fColor) |
virtual void | SetMetallic (double) |
virtual void | SetOpacity (double) |
virtual void | SetOpacityIOR (double) |
virtual void | SetOpacityRoughness (double) |
virtual void | SetReflectiveIOR (double) |
virtual void | SetRoughness (double) |
virtual void | SetSheen (double) |
virtual void | SetSheenTint (double) |
virtual void | SetSpecular (double) |
virtual void | SetSpecularTint (double) |
virtual void | SetSubsurface (double) |
virtual void | SetSubsurfaceScatteringColor (const ON_4fColor &) |
virtual void | SetSubsurfaceScatteringRadius (double) |
void | SetUseBaseColorTextureAlphaForObjectAlphaTransparencyTexture (bool) |
virtual double | Sheen (void) const |
virtual double | SheenTint (void) const |
Amount to tint sheen towards base color. More... | |
virtual double | Specular (void) const |
virtual double | SpecularTint (void) const |
virtual double | Subsurface (void) const |
virtual ON_4fColor | SubsurfaceScatteringColor (void) const |
Color for full subsurface transport if implemented. More... | |
virtual double | SubsurfaceScatteringRadius (void) const |
Radius for full subsurface transport if implemented. More... | |
virtual void | SynchronizeLegacyMaterial (void) |
Call this function to set the ON_Material up to represent the PBR material as well as possible. More... | |
virtual void | ToLegacy (void) |
Expert function to remove all PBR data from a material. More... | |
bool | UseBaseColorTextureAlphaForObjectAlphaTransparencyTexture () const |
Friends | |
bool | ON_PhysicallyBasedMaterial_Supported (const ON_PhysicallyBasedMaterial &material) |
|
strong |
Interface.
Reflectance model to use. Default is GGX. Renderers do not need to support a specific model, but certain material definitions may specify in the hope that a renderer will support. GGX support is built into Rhino (Cycles, display)
Enumerator | |
---|---|
GGX | |
Ward | https://pdfs.semanticscholar.org/330e/59117d7da6c794750730a15f9a178391b9fe.pdf |
ON_PhysicallyBasedMaterial::ON_PhysicallyBasedMaterial | ( | const ON_Material & | src | ) |
ON_PhysicallyBasedMaterial::ON_PhysicallyBasedMaterial | ( | const ON_PhysicallyBasedMaterial & | src | ) |
|
virtual |
|
virtual |
|
virtual |
double ON_PhysicallyBasedMaterial::Alpha | ( | void | ) | const |
Controls Alpha transparency - 1.0 is fully opaque, 0.0 is non-visible. Use opacity for refraction - this overrides all other shading.
virtual
|
virtual |
Degree of anisotropy. This controls the aspect ratio of the specular highlight. (0 = isotropic, 1 = maximally anisotropic)
|
virtual |
Rotates the direction of anisotropy, with 1.0 going full circle.
|
virtual |
|
virtual |
|
virtual |
A second, special-purpose specular lobe - Extra white specular layer on top of others. This is useful for materials like car paint and the like.
|
virtual |
Controls clearcoat glossiness (0 = a “satin” appearance, 1 = a “gloss” appearance)
|
virtual |
|
virtual |
Controls emission - uses base color.
|
virtual |
Texture access functions - exactly the same as ON_Material. Provided for ease of use.
|
virtual |
|
virtual |
Access the referenced ON_Material.
|
virtual |
|
virtual |
The metallic-ness (0 = dielectric, 1 = metallic). This is a linear blend between two different models.The metallic model has no diffuse component and also has a tinted incident specular, equal to the base color
|
virtual |
Mix between fully opaque surface at zero and fully glass like transmission at one.
|
virtual |
Index of refraction for transmission.
|
virtual |
Controls roughness used for transmitted light.
|
virtual |
Reflective Ior - see specular amount above. Linked to Specular property.
|
virtual |
Surface roughness, controls both diffuse and specular response.
void ON_PhysicallyBasedMaterial::SetAlpha | ( | double | ) |
virtual
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void ON_PhysicallyBasedMaterial::SetUseBaseColorTextureAlphaForObjectAlphaTransparencyTexture | ( | bool | ) |
|
virtual |
An additional grazing component, primarily intended for cloth. Amount of soft velvet like reflection near edges, for simulating materials such as cloth.
|
virtual |
Amount to tint sheen towards base color.
|
virtual |
Incident specular amount. Linked to Ior property below. specular=((ior−1)/(ior+1))2/0.08
|
virtual |
A concession for artistic control that tints incident specular towards the base color. Grazing specular is still achromatic. Tints the facing specular reflection using the base color, while glancing reflection remains white. Normal dielectrics have colorless reflection, so this parameter is not technically physically correct and is provided for faking the appearance of materials with complex surface structure.
|
virtual |
Controls diffuse shape using a subsurface approximation. If full subsurface transport is implemented, acts as a mix between diffuse and SSS
|
virtual |
Color for full subsurface transport if implemented.
|
virtual |
Radius for full subsurface transport if implemented.
|
virtual |
Call this function to set the ON_Material up to represent the PBR material as well as possible.
|
virtual |
Expert function to remove all PBR data from a material.
bool ON_PhysicallyBasedMaterial::UseBaseColorTextureAlphaForObjectAlphaTransparencyTexture | ( | ) | const |
These function just route through to ON_Material - PBR materials need to support the same functionality.
If UseBaseColorTextureAlphaForObjectAlphaTransparencyTexture returns true, the alpha channel of the texture in m_textures with m_type=pbr_base_color is used in addition to any textures with m_type=pbr_alpha_texture.
|
friend |