9.22 Material
On this page:
9.22.1 Examples
9.22.1.1 Simple material example
9.22.1.2 Searchlight style with only diffuse color.

9.22 Material

This effect should be used along with the Light effect. After you have set you light properties, you are expected to set your "Material" properties as well. As with a light source. A material has a Specular, Emissive (ambient) and Diffuse property.

Please refer to the Light effect or the Blue Book Chapter 5 for more information.

 

Parameters

 

Default

 

Range    

 

Description

 

MatColorR

 

1.0

 

[0.0,1.0]

 

The red component of the material color

 

 

 

 

 

MatColorG

 

1.0

 

[0.0,1.0]

 

The blue component of the material color

 

 

 

 

 

MatColorB

 

1.0

 

[0.0,1.0]

 

The green component of the material color

 

 

 

 

 

MatEmissionR

 

0.0

 

[0.0,1.0]

 

The red component of the material emission

 

 

 

 

 

MatEmissionG

 

0.0

 

[0.0,1.0]

 

The blue component of the material emission

 

 

 

 

 

MatEmissionB

 

0.0

 

[0.0,1.0]

 

The green component of the material emission

 

 

 

 

 

MatDiffuseR

 

1.0

 

[0.0,1.0]

 

The red component of the material diffusion

 

 

 

 

 

MatDiffuseG

 

1.0

 

[0.0,1.0]

 

The blue component of the material diffusion

 

 

 

 

 

MatDiffuseB

 

1.0

 

[0.0,1.0]

 

The green component of the material diffusion

 

 

 

 

 

MatSpecularR

 

0.0

 

[0.0,1.0]

 

The red component of the material specularity

 

 

 

 

 

MatSpecularG

 

0.0

 

[0.0,1.0]

 

The blue component of the material specularity

 

 

 

 

 

MatSpecularB

 

0.0

 

[0.0,1.0]

 

The green component of the material specularity

 

 

 

 

 

MatShininess

 

10

 

[0.0,128.0]

 

The shininess of our texture

 

 

 

 

 

ComputeSurface

 

1

 

{0,1}

 

Set to 1 if you want to break down the surface into a quad grid so that lighting effects are smoother. If another effect down the effect stack is doing this for you, then you can set this to 0.

Input pattern: (A)
Image-Op: If ComputeSurface is set to 1

9.22.1 Examples
9.22.1.1 Simple material example
; muSE v2
; My yellowish style
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                                (effect "Perspective" (A))
                                (effect "CropMedia" (A))))
 
(define muvee-segment-effect (effect-stack
                              (effect "Light" (A))
                              (effect "Material" (A)
                                      (param "MatColorB" 0.0))))

In this simple example, the material will not absorb any blue color. What that implies is that we end up with a yellow-ish looking muvee.

9.22.1.2 Searchlight style with only diffuse color.
; muSE v2
; Searchlight2. The return!
 
(style-parameters)
 
(segment-durations 8.0)
 
(define muvee-global-effect (effect-stack
                                (effect "Perspective" (A))
                                (effect "CropMedia" (A))))
 
(define muvee-segment-effect (effect-stack
                              (effect "Light" (A)
                                      (param "LightDiffuseR" 1.0)
                                      (param "LightDiffuseG" 1.0)
                                      (param "LightDiffuseB" 1.0)
                                      (param "DefaultMaterialColor" 0))
                              (effect "Material" (A)
                                      (param "MatColorR" 0.0)
                                      (param "MatColorG" 0.0)
                                      (param "MatColorB" 0.0))))

The above example is *almost* the same as the one we showed in the Light effect. Except that this time, the material only absorbs Diffuse light as its emissive and color are set to zero. As can be seen, we have a really circular search light.