Packagealternativa.engine3d.materials
Classpublic class StandardMaterial
InheritanceStandardMaterial Inheritance TextureMaterial Inheritance Material Inheritance Object

Material with diffuse, normal, opacity, specular maps and glossiness value. The material is able to draw skin with the number of bones in surface no more than 41. To reduce the number of bones in surface can break the skin for more surface with fewer bones. Use the method Skin.divide (). To be drawn with this material, geometry should have UV coordinates vertex normals and tangent and binormal values​​.

See also

alternativa.engine3d.core.VertexAttributes.TEXCOORDS
alternativa.engine3d.core.VertexAttributes.NORMAL
alternativa.engine3d.core.VertexAttributes.TANGENT4
alternativa.engine3d.objects.Skin.divide()


Public Properties
 PropertyDefined By
 Inheritedalpha : Number = 1
Transparency.
TextureMaterial
 InheritedalphaThreshold : Number = 0
alphaThreshold defines starts from which value of alpha a fragment of the surface will get into transparent pass.
TextureMaterial
 InheriteddiffuseMap : TextureResource
Diffuse map.
TextureMaterial
  glossiness : Number = 100
Glossiness.
StandardMaterial
  glossinessMap : TextureResource
Glossiness map.
StandardMaterial
  lightMap : TextureResource
Light map.
StandardMaterial
  lightMapChannel : uint = 0
Number of the UV-channel for light map.
StandardMaterial
 Inheritedname : String
Name of the material
Material
  normalMap : TextureResource
Normal map.
StandardMaterial
  normalMapSpace : int
Type of the normal map.
StandardMaterial
 InheritedopacityMap : TextureResource
Opacity map.
TextureMaterial
 InheritedopaquePass : Boolean = true
If true, perform opaque pass.
TextureMaterial
  specularMap : TextureResource
Specular map.
StandardMaterial
  specularPower : Number = 1
Brightness of a flare.
StandardMaterial
 InheritedtransparentPass : Boolean = true
If true, perform transparent pass.
TextureMaterial
Public Methods
 MethodDefined By
  
StandardMaterial(diffuseMap:TextureResource = null, normalMap:TextureResource = null, specularMap:TextureResource = null, glossinessMap:TextureResource = null, opacityMap:TextureResource = null)
Creates a new StandardMaterial instance.
StandardMaterial
  
[override]
StandardMaterial
 Inherited
getResources(resourceType:Class = null):Vector.<Resource>
Gather resources used by material for uploading into context3D.
Material
Protected Methods
 MethodDefined By
  
[override]
StandardMaterial
Property Detail
glossinessproperty
public var glossiness:Number = 100

Glossiness. Multiplies with glossinessMap value.

glossinessMapproperty 
public var glossinessMap:TextureResource

Glossiness map.

lightMapproperty 
public var lightMap:TextureResource

Light map.

lightMapChannelproperty 
public var lightMapChannel:uint = 0

Number of the UV-channel for light map.

normalMapproperty 
public var normalMap:TextureResource

Normal map.

normalMapSpaceproperty 
normalMapSpace:int

Type of the normal map. Should be defined by constants of NormalMapSpace class.

The default value is NormalMapSpace.TANGENT.


Implementation
    public function get normalMapSpace():int
    public function set normalMapSpace(value:int):void

See also

specularMapproperty 
public var specularMap:TextureResource

Specular map.

specularPowerproperty 
public var specularPower:Number = 1

Brightness of a flare. Multiplies with specularMap value.

Constructor Detail
StandardMaterial()Constructor
public function StandardMaterial(diffuseMap:TextureResource = null, normalMap:TextureResource = null, specularMap:TextureResource = null, glossinessMap:TextureResource = null, opacityMap:TextureResource = null)

Creates a new StandardMaterial instance.

Parameters
diffuseMap:TextureResource (default = null) — Diffuse map.
 
normalMap:TextureResource (default = null) — Normal map.
 
specularMap:TextureResource (default = null) — Specular map.
 
glossinessMap:TextureResource (default = null) — Glossiness map.
 
opacityMap:TextureResource (default = null) — Opacity map.
Method Detail
clone()method
override public function clone():Material

Returns
Material
clonePropertiesFrom()method 
override protected function clonePropertiesFrom(source:Material):void

Parameters

source:Material