Scheme Extensions Ma thru Zz |
|
|
Technical Article |
None |
; material ; Create a material. (define mat1 (material)) ;; mat1 ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 15 10 5))) ;; block1 ; Assign the material to the block. (entity:set-material block1 mat1) ;; () ; Remove the material attribute. (entity:set-material block1 #f) ;; () |
[Top]
material | material |
Description
This extension returns a list containing pairs of the property name and
its present value.
When a new "plain" color type material is created, the default reflection
type is "phong". It has the following properties:
"ambient factor" | 1 |
"diffuse factor" | 0.75 |
"specular factor" | 0.5 |
"exponent" | 10 |
"specular color" | #[color 1 1 1] |
A high ambient factor causes the image to appear bright white in views regardless of the color that has been set. To reveal the color, reset the reflection properties to less extreme values.
; material:color-props ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 30 10 3) 20)) ;; cyl1 ; Determine if the cylinder has a material. (entity:material cyl1) ;; #f ; Create a material. (define mat1 (material)) ;; mat1 ; Get the default material color type. (material:color-type mat1) ;; "plain" ; Get the default material color properties. (material:color-props mat1) ;; (("color" . #[color 1 1 1])) ; Set the material. (entity:set-material cyl1 mat1) ;; () ; Set the color of the material. (entity:set-material-color cyl1 (color:rgb 1 1 0)) ;; () ; Get the color properties of the material. (material:color-props mat1) ;; (("color" . #[color 1 1 0])) |
[Top]
material | material |
Description
This extension returns the type of color shader assigned to the material
as a string.
; material:color-type ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 30 10 3) 20)) ;; cyl1 ; Determine if the cylinder has a material. (entity:material cyl1) ;; #f ; Create a material. (define mat1 (material)) ;; mat1 ; Get the default material color type. (material:color-type mat1) ;; "plain" ; Set the color type of the material. (material:set-color-type mat1 "wrapped polka") ;; () ; Get the color type of the material. (material:color-type mat1) ;; "wrapped polka" |
[Top]
None |
Description
This extension returns all valid color material types as a string list.
; material:color-types ; Get a list of valid color shader types. (material:color-types) ;; ("base" "blue marble" "chrome" "cubes" "plain" ;; "marble" "simple wood" "solid clouds" ;; "solid polka" "wrapped brick" "wrapped checker" ;; "wrapped diagonal" "wrapped grid" "wrapped image" ;; "wrapped polka" "wrapped s stripe" ;; "wrapped t stripe" "wrapped textured brick") |
[Top]
material | material |
Description
This extension returns a list containing pairs of the property name and
its present value.
; material:displacement-props ; Create a material. (define mat1 (material)) ;; mat1 ; Set the displacement type of the material. (material:set-displacement-type mat1 "casting") ;; () ; Get the displacement properties of the material. (material:displacement-props mat1) ;; (("scale" . 1) ("casting amplitude" . 0.05) ;; ("dented amplitude" . 0.5) ("dented scale" . 1) ;; ("dented threshold" . 0.8) ("detail" . 2)) |
[Top]
material | material |
Description
Displacement status is only applicable to Advanced Rendering. Displacement
properties cannot be displayed when using Basic Rendering.
; material:displacement-status ; Create a material. (define mat1 (material)) ;; mat1 ; Set the displacement type of the material. (material:set-displacement-type mat1 "casting") ;; () ; Set the displacement status of the material. (material:set-displacement-status mat1 #f) ;; () ; Get the displacement status of the material; (material:displacement-status mat1) ;; #f |
[Top]
material | material |
Description
This extension returns the type of displacement shader assigned to the
material as a string.
; material:displacement-type ; Create a material. (define mat1 (material)) ;; mat1 ; Get the displacement type of the material. (material:displacement-type mat1) ;; "none" ; Set the displacement type of the material. (material:set-displacement-type mat1 "casting") ;; () ; Get the displacement type of the material. (material:displacement-type mat1) ;; "casting" |
[Top]
None |
Description
This extension returns all valid displacement material types as a string
list.
; material:displacement-types ; Get the list of valid displacement shader types. (material:displacement-types) ;; ("casting" "none" "rough" "wrapped bump map" ;; "wrapped dimple" "wrapped knurl" "wrapped rough" ;; "wrapped tread plate") |
[Top]
material | material |
Description
This extension returns a list containing pairs of the property name and
its present value.
; material:reflection-props ; Create a material. (define mat1 (material)) ;; mat1 ; Get the default reflection shader properties. (material:reflection-props mat1) ;; (("ambient factor" . 1) ("diffuse factor" . 0.75) ;; ("specular factor" . 0.5) ("exponent" . 10) ;; ("specular color" . #[color 1 1 1])) |
[Top]
material | material |
Description
The extension returns #t for on and #f for off.
; material:reflection-status ; Create a material. (define mat1 (material)) ;; mat1 ; Get the current reflection status. (material:reflection-status mat1) ;; #f ; Set the reflection status off. (material:set-reflection-status mat1 #f) ;; () (material:reflection-status mat1) ;; #f |
[Top]
material | material |
Description
This extension returns the type of reflection shader assigned to the material
as a string.
; material:reflection-type ; Create a material. (define mat1 (material)) ;; mat1 ; Get the default reflection shader type. (material:reflection-type mat1) ;; "phong" |
[Top]
None |
Description
This extension returns all valid reflection material types as a string
list.
; material:reflection-types ; Get a list of valid reflection shader types. (material:reflection-types) ;; ("chrome 2D" "conductor" "constant" "dielectric" ;; "environment" "glass" "matte" "metal" "mirror" ;; "phong" "plastic") |
[Top]
material | material |
color-type | string |
; material:set-color-type ; material:set-color-type ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 5 30 0) 8)) ;; cyl1 ; Create a material. (define mat1 (material)) ;; mat1 ; Set the color shader type. (material:set-color-type mat1 "solid polka") ;; () ; Set the properties of the color shader type. (material:set-color-prop mat1 "background color" 5) ;; () ; Assign the material to the cylinder. (entity:set-material cyl1 mat1) ;; () ; Set the appropriate render mode. (render:set-mode "full") ;; () ; Render and view the results. (render) ;; () ; OUTPUT Example |
[Top]
material | material |
name | string |
value | real | color |
scale | 1.0 (real) |
coverage | 0.5 (real) |
fuzz | 0.1 (real) |
color | #[color 1 1 1] |
scale | 1.0 (real) |
width | 0.8 (real) |
height | 0.8 (real) |
grid size | 0.2 (real) |
transparency | 0.0 (real) |
filename | string |
; material:set-transparency-prop ; Create a material. (define mat1 (material)) ;; mat1 ; Set the reflection shader type. (material:set-transparency-type mat1 "wrapped grid") ;; () ; Set the property of the reflection shader type. (material:set-transparency-prop mat1 "grid size" 0.3) ;; () ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 5 30 0) 8)) ;; cyl1 ; Assign the material to the cylinder. (entity:set-material cyl1 mat1) ;; () ; Set the appropriate render mode. (render:set-mode "full") ;; () ; Render and view the results. (render) ;; () ; OUTPUT Example |
[Top]
material | material |
status | boolean |
; material:set-transparency-status ; Create a material. (define mat1 (material)) ;; mat1 ; Set the transparency shader status on. (material:set-transparency-status mat1 #t) ;; () |
[Top]
material | material |
transparency-type | string |
; material:set-transparency-type ; Create a material. (define mat1 (material)) ;; mat1 ; Set the reflection shader type. (material:set-transparency-type mat1 "wrapped grid") ;; () ; Create a solid cylinder. (define cyl1 (solid:cylinder (position 0 0 0) (position 5 30 0) 8)) ;; cyl1 ; Assign the material to the cylinder. (entity:set-material cyl1 mat1) ;; () ; Set the appropriate render mode. (render:set-mode "full") ;; () ; Render and view the results. (render) ;; () ; OUTPUT Example |
[Top]
material | material |
Description
This extension returns a list containing pairs of the property name and
its present value.
; material:transparency-props ; Create a material. (define mat1 (material)) ;; mat1 ; Set the type of transparency for the material. (material:set-transparency-type mat1 "wrapped grid") ;; () ; Get the properties of the transparency type. (material:transparency-props mat1) ;; (("scale" . 1) ("width" . 0.8) ("height" . 0.8) ;; ("grid size" . 0.2) ("transparency" . 0)) |
[Top]
material | material |
Description
The extension returns #t for on and #f for off.
; material:transparency-status ; Create a material. (define mat1 (material)) ;; mat1 ; Get the current transparency status. (material:transparency-status mat1) ;; #f ; Set the transparency status off. (material:set-transparency-status mat1 #f) ;; () (material:transparency-status mat1) ;; #f |
[Top]
material | material |
Description
This extension returns the type of transparency shader assigned to the
material as a string.
; material:transparency-type ; Create a material. (define mat1 (material)) ;; mat1 ; Get the default transparency type. (material:transparency-type mat1) ;; "none" |
[Top]
None |
Description
This extension returns all valid transparency material types as a string
list.
; material:transparency-types ; Get a list of all valid transparency shaders. (material:transparency-types) ;; ("base" "eroded" "none" "plain" "wrapped grid" ;; "wrapped image") |
[Top]
object | scheme-object |
Description
This extension returns #t if the object is a material; otherwise, it returns
#f.
; material? ; Create a material. (define mat1 (material)) ;; mat1 ; Determine if the object is actually a material. (material? mat1) ;; #t |
[Top]
color-type | string |
; render:set-default-color-type ; Set the default color shader type. (render:set-default-color-type "blue marble") ;; () |
[Top]
type | string |
Description
Texture space controls how a a wrapped material entity is applied to a
face or solid body. A texture space is applied to an entity using
entity:set-texture-space.
The Advanced Rendering Component is required to display texture space on
wrapped materials. However, in the Basic Rendering Component, the texture
space may be created, its properties changed, and the texture space entity
associated with a model entity. However, Basic Rendering Component does
not display the results.
; texture-space ; Create a solid block. (define block1 (solid:block (position 0 0 0) (position 5 10 16))) ;; block1 ; Create a solid sphere. (define sphere1 (solid:sphere (position -10 -10 -10) 10)) ;; sphere1 ; Create two texture spaces. (define texture1 (texture-space "auto axis")) ;; texture1 (define texture2 (texture-space "spherical")) ;; texture2 ; Set the textures onto the solids. (entity:set-texture-space block1 texture1) ;; () (entity:set-texture-space sphere1 texture2) ;; () |
[Top]
texture-space | texture-space |
Description
This extension returns a list containing pairs of the property type and
their current values.
The Advanced Rendering Component is required to display texture space on
wrapped materials. However, in the Basic Rendering Component, the texture
space may be created, its properties changes, and the texture space entity
associated with a model entity. However, Basic Rendering Component does
not display the results.
; texture-space:props ; Create a texture space. (define texture1 (texture-space "auto axis")) ;; texture1 ; Get the properties of the texture space. (texture-space:props texture1) ;; (("scale" . 1)) |
[Top]
texture-space | entity |
name | string |
value | integer | real | gvector |
Description
Texture space controls how a a wrapped material entity is applied to a
face or solid body. A texture space is applied to an entity using
entity:set-texture-space.
The Advanced Rendering Component is required to display texture space on
wrapped materials. However, in the Basic Rendering Component, the texture
space may be created, its properties changes, and the texture space entity
associated with a model entity. However, Basic Rendering Component does
not display the results.
intensity | 1.0 (real) |
color | #[color 1 1 1] |
scale | 1.0 (real) |
aspect ratio | 1.0 (real) |
origin | #[gvector 0 0 0] |
normal vector | #[gvector 0 0 1] |
up vector | #[gvector 0 1 0] |
scale around axis | 1.0 (real) |
scale along axis | 1.0 (real) |
centre point | #[gvector 0 0 0] |
axis direction | #[gvector 0 0 1] |
origin | #[gvector 1 0 0] |
latitude scale | 1.0 (real) |
longitude scale | 1.0 (real) |
centre point | #[gvector 0 0 0] |
origin | #[gvector 1 0 0] |
axis direction | #[gvector 0 0 1] |
u scale | 1.0 (real) |
v scale | 1.0 (real) |
scale | 1.0 (real) |
scale | 1.0 (real) |
scale | 1.0 (real) |
; texture-space:set-prop ; Get a list of valid texture space shader types. (texture-space:types) ;; ("arbitrary plane" "auto axis" "cylindrical" ;; "spherical" "uv" "x plane" "y plane" "z plane") ; Create a texture space. (define texture1 (texture-space "arbitrary plane")) ;; texture1 ; Set a property of the texture space. (texture-space:set-prop texture1 "aspect ratio" 0.75) ;; () |
[Top]
texture-space | texture-space |
; texture-space:type ; Get a list of valid texture space shader types. (texture-space:types) ;; ("arbitrary plane" "auto axis" "cylindrical" ;; "spherical" "uv" "x plane" "y plane" "z plane") ; Create a texture space. (define texture1 (texture-space "auto axis")) ;; texture1 ; Get the type of texture space. (texture-space:type texture1) ;; "auto axis" |
[Top]
None |
Description
This extension returns all valid texture space types in a list of strings.
The Advanced Rendering Component is required to display texture space on
wrapped materials. However, in the Basic Rendering Component, the texture
space may be created, its properties changes, and the texture space entity
associated with a model entity. However, Basic Rendering Component does
not display the results.
; texture-space:types ; Get a list of valid texture space shader types. (texture-space:types) ;; ("arbitrary plane" "auto axis" "cylindrical" ;; "spherical" "uv" "x plane" "y plane" "z plane") |
[Top]
object | scheme-object |
; texture-space? ; Create a texture space. (define texture1 (texture-space "auto axis")) ;; texture1 ; Determine if the texture space is actually ; a texture space. (texture-space? texture1) ;; #t |
[Top]
© 1989-2007 Spatial Corp., a Dassault Systèmes company. All rights reserved.