Skip to content

Referencing Assets

Voxel Scene assets can incorporate content from other assets into their scenes by using Reference objects. These objects generate voxel data from the assigned asset and utilize that data as their source.

Steps to Create a Reference

  1. Open the Asset Panel where your available assets are listed.
  2. Drag and drop the desired asset onto the Scene View. This action will create a Reference object of the matching type, assign the asset to it, and load the generated voxel data.

Alternatively:

  1. Navigate to Object > Create and select the appropriate Reference object type to manually create a Reference. Ensure that the reference type matches the asset you want to assign.
  2. In the Inspector, locate the Asset property and select the asset you wish to assign from the dropdown menu.

Updating References

References are not updated automatically; changes made to an asset are not reflected in the Reference object unless explicitly updated. To update selected references, use Object > References > Update or Object > References All to refresh all references in the scene.

Converting References

The individual voxels of Reference objects cannot be edited directly unless the Reference is converted to a Voxel Layer. To do this, use Object > Reference > Convert to Voxel Layer.

Breaking References

You can also opt to break a reference, which will convert and add the content of the referred asset to the hierarchy. To do this, use Object > Reference > Break. The results depend on the asset type:

  • Voxel Scene: A copy of all Voxel Objects is added to the hierarchy, and References are converted to Voxel Layers.
  • Mesh Asset: Each mesh is voxelized and added to the hierarchy.
  • Voxel Movie: Each frame is copied, and visibility keyframes are added to maintain the animation of the Voxel Movie.
  • Heightmap: A simple copy of the generated voxel data is created.

How Voxel Data Generation Works

The generation of voxel data from Reference objects depends on the type of asset being referenced:

Voxel Scene and Mesh Asset

For Voxel Scene and Mesh Asset types, the generation process includes:

  1. Scan Box Utilization: The selected Scan Box defines the area that will be scanned. This Scan Box determines which parts of the asset are converted into voxel data. The Scan Box used by the Reference can be set in the Inspector, allowing you to choose either the assigned asset's Default Scan Box or any custom Scan Box object found in that asset.

  2. Voxelization Process: The generator scans the area within the defined Scan Box, voxelizing the objects found in that region. This process converts the 3D geometry into a voxel representation.

  3. Merging Voxel Data: The voxelized data is then merged into a single voxel grid, which can be utilized in the Voxel Scene.

Heightmap

For Heightmap assets, the generation process involves:

  1. 2D Pixel Data Conversion: The 2D pixel data from the Heightmap is converted into voxel data. This conversion uses the height information stored in each pixel to create a three-dimensional representation.

Voxel Movie

For Voxel Movie assets, the generation process is straightforward:

  1. Frame Voxel Data Retrieval: The Reference object retrieves the voxel data from the specified frame of the Voxel Movie. This allows for dynamic content to be incorporated into your scene based on the selected frame.