content_create_material_transparent
Creates a transparent Lit material in the live Flax Editor for glass, water, or film, with adjustable opacity, roughness, and refraction.
Instructions
Creates a transparent surface Material (blend mode Transparent, Lit) through the live Flax Editor, for glass, water or film. Opacity 0 is fully clear. Refraction is the material's Refraction input: 1 bends nothing. Flax applies it as a strong screen distortion: 1.03 already shrinks objects behind a bottle-sized surface to about 40 % of their width, as through thick glass. Use 1.0 for thin glass with something inside (a bottle with liquid), and values above 1 only for a lens effect. The material traces screen-space reflections. Its four values are public parameters named BaseColor, Opacity, Roughness and Refraction, so content_create_material_instance makes variants (a tint, frosted or thicker glass, water) of one material. Paths are relative to Content/ and must end in .flax. No asset may exist at the path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opacity | Yes | Opacity in 0..1. 0 is fully clear, 1 is opaque. Clear glass: about 0.1 to 0.25. | |
| baseColor | Yes | Uniform RGBA base color, every component in 0..1. Near white for clear glass. | |
| roughness | Yes | Surface roughness in 0..1. Polished glass: about 0.05. | |
| refraction | No | Refraction input in 1..3. 1 bends nothing. Even 1.03 visibly shrinks what is behind the surface. | |
| relativePath | Yes | Destination path relative to Content/, ending in .flax. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| opacity | Yes | ||
| baseColor | Yes | ||
| blendMode | Yes | ||
| roughness | Yes | ||
| materialId | Yes | ||
| parameters | Yes | ||
| refraction | Yes | ||
| mainThreadId | Yes | ||
| materialPath | Yes |