Visual3D Game EngineAPI Documentation for XNA, C#, VB, and .NET
Assembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Contains implementation of material LOD definitions.
Contains implementation of material rendering.
Contains methods for update of shared material
shaders and specific permutations.
Class encapsulating the rendering properties of an object. The Material class encapsulates ALL aspects of the visual appearance, of an object.
Namespace: Visual3D.Graphics3DAssembly: Visual3D.Engine (in Visual3D.Engine.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
| C# | Visual Basic |
[SerializableAttribute] public class Material : RenderMaterial, IMaterialSupportInstancing, IMaterialSupportShadows, IMaterialSupportDepthOfField, IMaterialSupportObjectID, IRenderMaterial, IPreparedForUse, IHyperlinkBehaviorProvider, ILinkedEntity, IOwned, IPersistentDatabaseAsset
<SerializableAttribute> _ Public Class Material _ Inherits RenderMaterial _ Implements IMaterialSupportInstancing, IMaterialSupportShadows, IMaterialSupportDepthOfField, IMaterialSupportObjectID, _ IRenderMaterial, IPreparedForUse, IHyperlinkBehaviorProvider, ILinkedEntity, IOwned, _ IPersistentDatabaseAsset
Members
| All Members | Constructors | Fields | Properties | Methods | Events |
| Member | Description | |
|---|---|---|
| Material()()()() | Initializes a new instance of the Material class | |
| Material(String) | Initializes a new instance of the Material class | |
| AllowEmissiveBloom | Turns on/off support of rendering with emissive bloom. | |
| AllowSpecularBloom | Turns on/off support of rendering with specular bloom. | |
| AlphaTestFunction | Gets/sets function to use as Alpha Test. Pixels not passed alpha test are not passed to render target.
See also AlphaTestThreshold property. | |
| AlphaTestThreshold | Gets/sets threshold value for Alpha Test. Depending on AlphaTestFunction,
pixel color's alpha is being tested against this value, and pixel is rejected or accepted
for frame buffer. | |
| Ambient | ||
| AmbientMap | Optional texture used to mask out ambient light (ambient map or light map). | |
| AssetID | (Inherited from Registered.) | |
| AssetInfo | (Inherited from Registered.) | |
| AssetOwner | Gets or sets the owner to which this asset belongs and is a member of. (Inherited from Asset.) | |
| AttachedToOwner(IComponentOwner) | (Inherited from EntityComponent.) | |
| BaseAsset | (Inherited from Registered.) | |
| BeginPass(Int32, RenderContext) | (Overrides RenderMaterial..::..BeginPass(Int32, RenderContext).) | |
| CanBeMergedWith(Material) |
Indicates that this material can be merged with other during model parts merging
| |
| CategoryAnimation | ||
| CategoryCommon | ||
| CategoryDynamicLight | ||
| CategoryNormalMapping | ||
| CategorySpecialFX | ||
| CategoryStaticLight | ||
| CategoryTexturing | ||
| CategoryTransparency | ||
| Changed | Fires in response to any material property change. | |
| Clone()()()() | Strongly typed Clone implementation, exposed instead of base Clone. Note
that it does not add the material to the library | |
| Clone(String) | Strongly typed Clone implementation, exposed instead of base Clone. Note
that it does not add the material to the library | |
| ComponentOwner | Owner of this component (contained in it's ".Components" container). (Inherited from EntityComponent.) | |
| Components | Components that are attached to this Entity. (Inherited from ComponentBase.) | |
| ComponentsForGlobalSceneFolders | (Inherited from ComponentBase.) | |
| Context | Defines the Owner of this component as well as the role (i.e. 'slot') that this component fulfills. (Inherited from ComponentBase.) | |
| CopyTo(Material) | Copy settings of this material to another Material instance. | |
| CreateDefault(String) | ||
| CreateDefaultLODSet(Int32) | ||
| CreateIdentity()()()() | (Inherited from Registered.) | |
| CreateIdentityList()()()() | (Inherited from Registered.) | |
| CreateInstance(Boolean) | Creates an instance or non-inheriting duplicate of this asset. (Inherited from Asset.) | |
| CreateService<(Of <<'(TService>)>>)()()()() | (Inherited from ComponentBase.) | |
| CustomFXMaterial | Gets/sets custom FX-based material to use instead of high-level Material. | |
| CustomFXMaterialCurrentTechnique | Gets/sets the active technique of .FX material. | |
| CustomFXMaterialName | Gets/sets name of the custom FX-based material to use instead of high-level Material. | |
| CustomOgreMaterial | Gets/sets Ogre material used to render. | |
| CustomOgreMaterialName | Gets/sets name of Ogre material used to render. | |
| CustomRenderMaterial | Gets/sets custom render material to use instead of high-level Material. | |
| Default | ||
| DefaultInvalid | ||
| DefaultTransparencyMode | ||
| DepthBias |
Gets/sets additional bias (shift) to the depth of polygons rendered with this material.
Polygons with larger depth bias are forced to be in front of polygons with same depth
but less depth bias.
| |
| DesignTimeFXMaterialInfo | Design time property which returns general information about
current technique, such as number of light sources supported and their type,
auto parameter names. | |
| DesignTimeFXMaterialParameters | Design time property which returns an instance of dynamically generated class
exposing the list of material properties as public properties. | |
| DesignTimeFXMaterialTechnique | Design time property which gets/sets the active technique of .FX material. | |
| DetachedFromOwner(IComponentOwner) | (Inherited from EntityComponent.) | |
| DetailTexture | ||
| Diffuse | ||
| DiffuseMask | ||
| DisableDepthCheck | ||
| DisableDepthWrite | ||
| Dispose()()()() | (Inherited from ComponentBase.) | |
| Disposed | (Inherited from ComponentBase.) | |
| Emissive | ||
| EmissiveBloomLevel | Gets/sets strength of emissive bloom effect. | |
| EmissiveMap | ||
| EndPass(Int32, RenderContext) | (Overrides RenderMaterial..::..EndPass(Int32, RenderContext).) | |
| EnvironmentDiffuseTexture | ||
| EnvironmentMap | ||
| EnvironmentMask | ||
| ErrorMessage | Returns error message in case if IsValid gets false. Materials
are responsible for update this property during OnPrepareForUse. (Inherited from RenderMaterial.) | |
| FixupToUseWithRenderable(IRenderable) | Checks for several conditions depending on which this
material can (or cannot) be used with given renderable geometry,
and change material properties to fullfil this geometry requirements. | |
| FixupToUseWithRenderable(IRenderable, String%) | Checks for several conditions depending on which this
material can (or cannot) be used with given renderable geometry,
and change material properties to fullfil this geometry requirements. | |
| FogDisabled | BaseSkyRendermaterial overrides this, based on EnableFogOnSky.
(Inherited from RenderMaterial.) | |
| GetNumberOfPasses(RenderContext) | (Overrides RenderMaterial..::..GetNumberOfPasses(RenderContext).) | |
| GetParallaxPerspectiveOffset()()()() | ||
| GetParallaxVirtualHeight()()()() | ||
| GetService<(Of <<'(TService>)>>)()()()() | (Inherited from ComponentBase.) | |
| GetService<(Of <<'(TService>)>>)(TService%) | (Inherited from ComponentBase.) | |
| Glossiness |
Gets/sets glossiness level of material. Less glossiness gives
larger specular spot. Can be from 1 to 1000 and more.
This property has been replaced with Shininess which is easier to use and should be used instead.
| |
| Handle | (Inherited from Registered.) | |
| HasComponents | (Inherited from ComponentBase.) | |
| HasHandle | (Inherited from Registered.) | |
| HasName | (Inherited from EntityComponent.) | |
| HasOwner<(Of <<'(TOwner>)>>)(IOwned) | (Inherited from EntityExtensions.) | |
| HasOwner<(Of <<'(TOwner>)>>)(IOwned, TOwner%) | (Inherited from EntityExtensions.) | |
| HasOwner<(Of <<'(TOwner>)>>)(IOwned, TOwner%, Boolean) | (Inherited from EntityExtensions.) | |
| HasPrototype | Gets if a prototype has been specified to inherit instance data from. (Inherited from Asset.) | |
| HasScope | (Inherited from Registered.) | |
| HasUniqueName | Gets if a UniqueName is specified to identify this asset with respect to its owner's other members. (Inherited from Registered.) | |
| ID | (Inherited from Registered.) | |
| IDChanged | (Inherited from Registered.) | |
| IgnoreSceneAmbient | ||
| Initialize()()()() | Initializes the asset so that it might be prepared for use.
By default, PrepareForUse() is called from this method as well. (Inherited from Asset.) | |
| Invalidate()()()() | Set material state to 'not up-to-date' and schedule full
update when material is going to be rendered next time. | |
| IsDefault | ||
| IsDefaultEmpty | ||
| IsDeserialized | Indicates if Instance was created by Deserialization. (Inherited from ComponentBase.) | |
| IsDisabled | ||
| IsDisposed | Indicates if resource has been disposed. (Inherited from Asset.) | |
| IsDisposing | Indicates if resource is in process of Disposing but not fully disposed. (Inherited from Asset.) | |
| IsInitialized | Gets if this entity is currently in an initialized (and non-disposed) state. (Inherited from Asset.) | |
| IsInvalid | ||
| IsLitUniformly |
Turns uniform lighting on/off. Is set to true, diffuse and specular
light will not take normal vectors in account, and normal map and specular lighting will
be forced to off.
| |
| IsNew | Indicate that material was just created and has initial state.
Resets to false after at least one property has been changed. | |
| IsPersistent | ||
| IsPrototype | (Inherited from Asset.) | |
| IsReadOnly | Gets/sets read-only mode for material. If material is in this mode, any
changes made to it's properties will not affect on resulting rendering output.
Initial material setup must be performed before 1st call of PrepareForUse method. | |
| IsReadyForUse | Gets/sets if asset is ready to be used.
Can be set to 'true' in class constructor in order to skip Preparation logic. (Inherited from Asset.) | |
| IsSaved | Indicates if the component is to be Saved when the owning context is saved
(e.g. for components in your scene, this controls whether or not they are saved to the scene file when the scene is saved).
Typically objects are 'Saved', unless they are transient to be programmatically created each time. (Inherited from ComponentBase.) | |
| IsSavedOnCreatingInstance | (Inherited from Asset.) | |
| IsValid | Returns true if material is valid. Unless material become ready for use, this property
will return false. Actual value will be returned after first PrepareForUse call.
Materials are responsible for update IsValid flag during OnPrepareForUse.
See also ErrorMessage property for detailed error info. (Inherited from RenderMaterial.) | |
| IsValidNonDefault(Material) | ||
| LightModel | ||
| LODSettings | ||
| MaterialClass |
Gets/sets material class, which defines general way to customize and use Material -
i.e. use Ogre material or custom material, or customizable high-level material.
| |
| MaxLightsPerPass | Custom assined maximum number of lights per pass. If 0 or less, material
will try to calculate this value on i'ts own. | |
| Name | (Inherited from EntityComponent.) | |
| NameID | (Inherited from EntityComponent.) | |
| NormalMap | ||
| NormalMapAmplifyFactor | Gets/sets optional multiplifier for normal map strength. | |
| NormalMapType | ||
| OnMemberwiseClone()()()() | (Inherited from ComponentBase.) | |
| Opacity | Gets/sets constant transparency value (0 for fully transparent, 1 for opaque). | |
| OwnerActivated(IComponentOwner) | (Inherited from EntityComponent.) | |
| OwnerDeactivated(IComponentOwner) | (Inherited from EntityComponent.) | |
| OwnerOf<(Of <<'(TOwner>)>>)()()()() | (Inherited from Registered.) | |
| ParallaxHeight | Gets/sets virtual height of parallax effect, in range 0 to 1. | |
| PointSpriteEnable | Turns point sprite rendering mode ON/OFF. Use it
for PointList geometry type. Default is false. | |
| PointSpriteSize | When PointSpriteEnable is set to true, defines a screen-space size of
point sprites rendererd. | |
| PrepareForUse()()()() | Attempts to prepare asset for use. To be sure, check "IsReadyForUse"
after calling this method to ensure it's really ready for use before using it. (Inherited from Asset.) | |
| PreserveDifferentMaterialNames | ||
| Prototype | Gets or sets the prototype, if specified, from which this asset inherits instance data. (Inherited from Asset.) | |
| RenderMode | Optional override of solid/wireframe render mode. | |
| RevertReflection | ||
| Scope | (Inherited from Registered.) | |
| SetDefaultsSettings()()()() | Resets material to default state. | |
| SetDynamicAttributes(RuntimeAttributeDictionary) | (Overrides RenderMaterial..::..SetDynamicAttributes(RuntimeAttributeDictionary).) | |
| SetFixedAttributes(RuntimeAttributeDictionary) | (Inherited from RenderMaterial.) | |
| ShadowAlphaTestThreshold | Gets/sets threshold value for Alpha Test when rendering shadows of
semitransparent object. Depending on AlphaTestFunction, pixel color's alpha is being
tested against this value, and pixel is rejected or accepted for shadow map. | |
| Shininess | ||
| SourceFile | Gets/Sets the source file for this program. (Inherited from Asset.) | |
| Specular | ||
| SpecularBloomLevel | Gets/sets strength of specular bloom effect. | |
| SpecularMask | ||
| StorageModule | (Inherited from Registered.) | |
| Texture | ||
| TexturingMode | ||
| ToString()()()() | (Inherited from ComponentBase.) | |
| TransparencyFadeInDistances | Optional Near distances to fade in when camera
is too close. Set to null for no fade. Use TransparencyFadeMinValue to
control min value of fade. | |
| TransparencyFadeMinValue | If TransparencyFadeDistances has non-null value, this property
gets/sets lowest transparency modifier to use for fade. Default is 0 (material will become fully
transparent at too far/close distances). | |
| TransparencyFadeOutDistances | Optional Far distances to fade in when camera
is too far. Set to null for no fade. Use TransparencyFadeMinValue to
control min value of fade. | |
| TransparencyMap | Gets/sets texture used as transparency map. Only one channel of
this texture is used (Alpha or Red, if alpha is not found). You can specify
what channel to use via TransparencyMap.ChannelMap properties. | |
| TransparencyMode | (Overrides RenderMaterial..::..TransparencyMode.) | |
| TransparencyValue | ||
| UniqueName | (Inherited from Registered.) | |
| Updated | Fires after material update after property changes has been completed. | |
| UseTwoSidedLighting | ||
| UseTwoSidedRendering |
Inheritance Hierarchy
System..::..Object
Visual3D.EntityModel..::..ComponentBase
Visual3D.EntityModel..::..EntityComponent
Visual3D..::..Registered
Visual3D..::..Asset
Visual3D.Graphics3D.MaterialRendering..::..RenderMaterial
Visual3D.Graphics3D..::..Material
Visual3D.EntityModel..::..ComponentBase
Visual3D.EntityModel..::..EntityComponent
Visual3D..::..Registered
Visual3D..::..Asset
Visual3D.Graphics3D.MaterialRendering..::..RenderMaterial
Visual3D.Graphics3D..::..Material