Standard Material

doc.bjs.com Materials

Patch existing material

[
  {
    "material1" : {
        "diffuseColor" : "#00ff00",
        "isFrozen" : true,
        "emissiveColor" : "#0000ff"
    }   
  }   
]

Assign existing material to a mesh

[
  {
    "mesh2" : {
        "material" : "material1"
    }   
  }   
]

Create new material with material::standard

[
  {
    "mesh1" : {
        "material" : {
            "material::standard" : {
                "name" : "material1",
                "diffuseColor" : "#ff0000"
            }
        }
    }   
  }   
]

Standard Materials Parameters

From doc.bjs.com - Material + StandardMaterial

  • id : string
  • name : string
  • fogEnabled : boolean
  • isFrozen : boolean
  • zOffset : number

Diffuse

As viewed under a light.

  • diffuseColor : color
  • diffuseTexture : texture
  • useAlphaFromDiffuseTexture : boolean

Specular

Highlight given to the material by a light.

  • specularColor : color
  • specularTexture : texture
  • specularPower : number
  • useSpecularOverAlpha : boolean
  • useGlossinessFromSpecularMapAlpha : boolean

Emissive

As if self lit.

  • emissiveColor : color
  • emissiveTexture : texture
  • useEmissiveAsIllumination : boolean
  • linkEmissiveWithDiffuse : boolean

Ambient

Lit by the environmental background lighting.

Opacity

  • alpha : number
  • opacityTexture : texture
  • alphaMode bjs-playground - alphaModes:
    • BABYLON.Engine.ALPHA_COMBINE,BABYLON.Engine.ALPHA_ADD
    • BABYLON.Engine.ALPHA_SUBTRACT
    • BABYLON.Engine.ALPHA_MULTIPLY
    • BABYLON.Engine.ALPHA_MAXIMIZED
  • backFaceCulling : boolean

Bump

Reflection

  • reflectionTexture : texture
  • useReflectionOverAlpha : boolean

Refraction

  • refractionTexture : texture
  • indexOfRefraction : number
  • invertRefractionY : boolean

Lighting

  • lightmapTexture : texture
  • maxSimultaneousLights : number
  • disableLighting : boolean
  • useLightmapAsShadowmap : boolean
  • twoSidedLighting : boolean

Fresnel

doc.bjs.com - How to use FresnelParameters

Parallax

doc.bjs.com - How to use Parallax Mapping

  • useParallax : boolean
  • useParallaxOcclusion : boolean
  • parallaxScaleBias : number

Misc

  • invertNormalMapX : boolean
  • invertNormalMapY : boolean
  • fillMode : BABYLON.Material.TriangleFillMode | BABYLON.Material.WireFrameFillMode | BABYLON.Material.PointFillMode
  • roughness : number
  • useLogarithmicDepth : boolean
  • wireframe : boolean
  • state : string
  • sideOrientation : BABYLON.Material.ClockWiseSideOrientation | BABYLON.Material.CounterClockWiseSideOrientation
  • needDepthPrePass : boolean
  • disableDepthWrite : boolean
  • forceDepthWrite : boolean
  • separateCullingPass : boolean
  • pointSize : number
  • pointsCloud : boolean
  • checkReadyOnEveryCall : boolean
  • checkReadyOnlyOnce : boolean

results matching ""

    No results matching ""