Colors and Materials Overview
In Foxel, colors and materials play a crucial role in defining the visual aesthetics of your voxel creations. This section provides an overview of how colors and materials are organized and utilized within your projects.
Color Palette
Foxel features a Color Palette that contains 256 colors. Each color in the palette can be indexed and applied to individual voxels, pixels, or texels, allowing for a wide range of visual customization.
Material Set
In addition to colors, Foxel includes a Material Set that comprises 128 materials. Each material is defined by four key attributes:
- Metallic: Determines how reflective the material is.
- Roughness: Affects the surface texture and light scattering.
- Emissive: Controls the material's ability to emit light.
- Alpha: Defines the transparency level of the material.
Foxel's engine utilizes Physically Based Rendering (PBR), which allows materials to interact with light in a realistic manner. This enhances the visual fidelity of your voxel creations, making them appear more lifelike and dynamic.
Voxel Color and Material Assignment
In Foxel, each voxel, pixel, or texel is linked to a specific color and material, which are represented as indices within the Color Palette and Material Set. This indexing approach not only optimizes storage but also simplifies the management of colors and materials throughout the entire project.
Project-Specific Assets
Each project in Foxel has its own unique Color Palette and Material Set. All objects and assets contained within a project utilize the project's defined colors and materials. This ensures a cohesive look and feel across all elements of your project.
Importing Assets
When importing files as assets into your project, Foxel converts the original colors to match the project's Color Palette. This means that if the source colors are not part of the Color Palette, the original coloring will be lost. To prevent this, you can add the colors from the source file to your project before importing the file itself. For more information on how to do this, see the Editing Colors section.