Skip to content

Prefabs Overview โ€‹

A Prefab is reusable voxel content that can be placed into other assets.

Prefabs are useful for building libraries of repeated objects, structures, and scene elements that you want to reuse across different assets and projects.

How Prefabs Are Organized โ€‹

Prefabs are stored in Prefab Packages.

A Prefab Package can contain any number of Prefabs. Each Prefab has its own Color Palette and Material Set, which are stored with the Prefab inside the package. Prefab Packages are shared resources, which makes them easy to reuse across multiple projects.

On the Prefabs page of the workspace, the left side shows available Prefab Packages, and the right side shows the Prefabs of the currently open package.

For an overview of workspace pages, see Pages.

How Prefabs Are Used โ€‹

When a Prefab is placed into an asset, Foxel creates a new Voxel Layer from the prefab data.

During this process, the Prefab's colors and materials are remapped to the target asset. This allows Prefabs from shared packages to be reused in assets with different Color Palettes and Material Sets.

Prefab Features โ€‹

  • Voxel-Based: Each Prefab is based on voxel data and can contain up to 256 ร— 256 ร— 256 voxels.
  • Own Colors and Materials: Each Prefab contains its own Color Palette and Material Set.
  • Rendered Previews: Prefab previews are displayed using the colors stored in the Prefab.
  • Reusable Libraries: Prefabs are grouped into Prefab Packages, making them easy to organize and reuse.
  • Cross-Project Use: Prefab Packages are shared resources and can be used across multiple projects.