beastapi/beastmaterial.h File Reference
The api for specifying materials in beast.
|
ILBStatus | ILBCreateMaterial (ILBSceneHandle scene, ILBConstString name, ILBMaterialHandle *material) |
|
ILBStatus | ILBCreateShader (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBConstString fileName, ILBShaderHandle *target) |
|
ILBStatus | ILBFindMaterial (ILBSceneHandle scene, ILBConstString name, ILBMaterialHandle *material) |
|
ILBStatus | ILBFindShader (ILBManagerHandle beastManager, ILBConstString uniqueName, ILBShaderHandle *target) |
|
ILBStatus | ILBSetAlphaAsTransparency (ILBMaterialHandle material, ILBBool alphaAsTransparency) |
|
ILBStatus | ILBSetChannelUVLayer (ILBMaterialHandle material, ILBMaterialChannel channel, ILBConstString uvLayerName) |
|
ILBStatus | ILBSetGIScale (ILBMaterialHandle material, float diffuseBoost, float emissiveScale, float specularScale) |
|
ILBStatus | ILBSetMaterialColor (ILBMaterialHandle material, ILBMaterialChannel channel, const ILBLinearRGBA *color) |
|
ILBStatus | ILBSetMaterialDisplayName (ILBMaterialHandle material, ILBConstString displayName) |
|
ILBStatus | ILBSetMaterialScale (ILBMaterialHandle material, ILBMaterialChannel channel, float scale) |
|
ILBStatus | ILBSetMaterialTexture (ILBMaterialHandle material, ILBMaterialChannel channel, ILBTextureHandle texture) |
|
ILBStatus | ILBSetMaterialTextureWrapMode (ILBMaterialHandle material, ILBMaterialChannel channel, ILBMaterialChannelWrapMode wrapModeU, ILBMaterialChannelWrapMode wrapModeV, ILBTextureHandle texture) |
|
ILBStatus | ILBSetMaterialUseVertexColors (ILBMaterialHandle material, ILBMaterialChannel channel) |
|
ILBStatus | ILBSetPrimaryGICorrection (ILBMaterialHandle material, float intensity, float saturation) |
|
ILBStatus | ILBSetSecondaryGICorrection (ILBMaterialHandle material, float intensity, float saturation) |
|
ILBStatus | ILBSetShader (ILBMaterialHandle material, ILBShaderHandle shader) |
|
ILBStatus | ILBSetShaderParamColor (ILBMaterialHandle material, ILBConstString param, ILBLinearRGB *value) |
|
ILBStatus | ILBSetShaderParamFloat (ILBMaterialHandle material, ILBConstString param, float value) |
|
ILBStatus | ILBSetShaderParamInt (ILBMaterialHandle material, ILBConstString param, int32 value) |
|
ILBStatus | ILBSetShaderParamTexture (ILBMaterialHandle material, ILBConstString param, ILBTextureHandle value) |
|
ILBStatus | ILBSetShaderParamUV (ILBMaterialHandle material, ILBConstString param, ILBConstString value) |
|
Defines the different channels in the Beast API shading model.
Enumerator |
---|
ILB_CC_DIFFUSE |
Contains the visible color or texture of the surface.
|
ILB_CC_SPECULAR |
Contains the color of the specular highlights reflected by the surface.
|
ILB_CC_EMISSIVE |
Contains the color of the light emitted by the surface, if any.
|
ILB_CC_TRANSPARENCY |
Determines the color of the light that can pass through the surface.
|
ILB_CC_SHININESS |
Determines how smooth the surface will appear. Larger values produce smaller, more intense specular highlights.
|
ILB_CC_REFLECTION |
Determines how reflective the surface is.
|
ILB_CC_NONDIRECTIONAL |
Contains the color of the ambient or non-directional light that should be applied to the surface. Used only by the RNM render pass.
|
ILB_CC_NORMAL |
Normal map containing high frequency detail of the surface.
|
Enumerator |
---|
ILB_WM_REPEAT |
Clamps to the border value outside the 0..1 UV range.
|
ILB_WM_MIRROR |
Mirrors around the border outside the 0..1 UV range. U=1.1 becomes 0.9.
|
ILB_WM_CLAMP |
Repeats around the border value outside the 0..1 UV range. U=1.1 becomes 0.1
|
Add a material to the scene.
- Parameters
-
scene | the scene the material should be a part of |
name | the name of the material, must be unique within the scene. |
material | a pointer to the material handle where the created material should be stored |
- Returns
- The result of the operation.
- examples-physical/code/common/samplescommon.h, examples/code/atlas/atlas.cpp, examples/code/baking/baking.cpp, examples/code/cache/cache.cpp, examples/code/ernst/ernst.cpp, examples/code/lightsources/lightsources.cpp, examples/code/liveernst/liveernst.cpp, examples/code/lua/lua.cpp, examples/code/materials/materials.cpp, examples/code/occlusion/occlusion.cpp, examples/code/pointcloud/pointcloud.cpp, examples/code/readback/readback.cpp, examples/code/renderstats/renderstats.cpp, examples/code/rnm/rnm.cpp, examples/code/shbaking/shbaking.cpp, examples/code/simple/simple.cpp, and examples/code/uvset/uvset.cpp.
Compiles and creates a representation of an OSL shader.
- Parameters
-
beastManager | the Beast Manager |
uniqueName | a unique name for the shader |
fileName | the path to the OSL source file |
target | pointer where the newly created shader will be stored |
Checks if the material exists, if it does, it returns its handle.
- Parameters
-
scene | the scene the material is a part of |
name | the name of the material |
material | a pointer to the material handle to store the result in |
- Returns
- ILB_ST_SUCCESS if the material was found, ILB_ST_UNKNOWN_OBJECT if it wasn't
Retrieves an OSL shader based on its unique name.
- Parameters
-
beastManager | the Beast Manager |
uniqueName | the unique name of the shader to retrieve |
target | pointer where the shader will be stored |
Sets if the material should use the alpha value of the diffuse channel as transparency.
This is disabled by default.
- Parameters
-
material | the material to change the setting on |
alphaAsTransparency | the new setting |
Sets what UV layer should be used for the texture for a color channel.
- Parameters
-
material | the material to change texture channel for |
channel | the channel to set the texture on |
uvLayerName | the name of the UV layer on the mesh to use. This parameter can not be checked at call time and if the UV layer is not present it will fall back on default |
Sets boost and scaling factors for different aspects of the material in GI calculations.
Default values are all 1.0.
- Parameters
-
material | the material to change the setting on |
diffuseBoost | the value to boost the diffuse value with in GI calculations |
emissiveScale | the value to scale the emissive value with in GI calculations |
specularScale | the value to scale the specular value with in GI calculations |
Sets the color for a channel on a material.
Note that color is not supported for shininess or reflectivity.
- Parameters
-
material | the material to apply the color on |
channel | the channel to set the color on |
color | pointer to the color to set |
- examples/code/atlas/atlas.cpp, examples/code/baking/baking.cpp, examples/code/cache/cache.cpp, examples/code/ernst/ernst.cpp, examples/code/lightsources/lightsources.cpp, examples/code/liveernst/liveernst.cpp, examples/code/lua/lua.cpp, examples/code/materials/materials.cpp, examples/code/occlusion/occlusion.cpp, examples/code/pointcloud/pointcloud.cpp, examples/code/readback/readback.cpp, examples/code/renderstats/renderstats.cpp, examples/code/rnm/rnm.cpp, examples/code/shbaking/shbaking.cpp, and examples/code/simple/simple.cpp.
Sets the display name for the material.
This name does not have to be unique within the scene and can be used by tools to give human understandable names to objects that has names that are generated and for some reason isn't suitable to read
- Parameters
-
material | the material to set the name for |
displayName | the display name to set |
Sets a scale for a channel on a material Will be multiplied with material color, texture and vertex colors if specified on the channel Can also be used to set the shininess of the material.
The default value of the scale is 1.0f.
- Parameters
-
material | the material to apply the color on |
channel | the channel to set the color on |
scale | the scale to set |
Sets the texture for a channel on a material.
Will be multiplied with material color, scale and vertex colors if specified on the channel
- Parameters
-
material | the material to apply the texture on |
channel | the channel to set the texture on. |
texture | the texture to apply |
Sets the texture wrap mode for a channel on a material.
U and V can be wrapped independently.
- Parameters
-
material | the material to apply the texture on |
channel | the channel to set the texture on. |
wrapModeU | the wrap to apply for the U coordinate |
wrapModeV | the wrap to apply for the V coordinate |
Sets the material to use vertex color for a channel.
Will be multiplied with material color, scale and texture if specified on the channel
- Parameters
-
material | the material to apply vertex colors on |
channel | the channel to set the vertex colors on support multiple vertex color sets |
Sets color correction on the primary GI calculations on the material.
Default values are 1.0 for intensity and 1.0 for saturation.
- Parameters
-
material | the material to change the setting on |
intensity | the desired primary GI intensity |
saturation | the desired primary GI saturation |
Sets color correction on the secondary GI calculations on the material.
Default values are 1.0 for intensity and 1.0 for saturation.
- Parameters
-
material | the material to change the setting on |
intensity | the desired secondary GI intensity |
saturation | the desired secondary GI saturation |
Assigns an OSL shader to a material.
The material must be created in a physical scene.
- Parameters
-
material | the material to assign the shader to |
shader | the shader to assign |
Sets an OSL color input parameter for a material.
- Parameters
-
material | the material to set the parameter on |
param | the parameter name |
value | the value to set for the parameter |
Sets an OSL float input parameter for a material.
- Parameters
-
material | the material to set the parameter on |
param | the parameter name |
value | the value to set for the parameter |
Sets an OSL integer input parameter for a material.
- Parameters
-
material | the material to set the parameter on |
param | the parameter name |
value | the value to set for the parameter |
Sets an OSL texture input parameter for a material.
- Parameters
-
material | the material to set the parameter on |
param | the parameter name |
value | the value to set for the parameter |
Connects an UV set to an OSL UV input parameter for a material.
The parameter is declared like this in OSL: "vector uvset = vector(0.0,0.0,0.0) [[int lockgeom=0]]". Note that the lockgeom=0 must be set in order for OSL to eval the parameter every shading call.
- Parameters
-
material | the material to set the parameter on |
param | the parameter name |
value | the UV set to connect to the parameter |
Go to the source code of this file.