đŸēCreating Artifacts

Creating and Uploading Uploadable Artifacts

All the work related to preparing and building the geometry bundle of the artifact will be done in the latest version of the Content Creator Template (github) with the addition of the following package:

UploadableArtifactsTemplate.unitypackage

Currently, we have the ability to add geometry to three special artifacts: Blank Grabbable, Blank Placeable, and Blank Grounded. Each of these three artifacts has its own unique behavior:

  1. Grabbable - an object with physics (affected by gravity) that can be picked up by hand or a pointer.

  2. Placeable - an object without physics that can only be moved as a decorator.

  3. Grounded - an object that automatically aligns to the ground and can only be moved as a decorator.

As an example, let's demonstrate creating geometry for an artifact using the Ford GT 2006 model.

Creating the Bundle

  1. Download/Create the model.

  2. Import the model into the project.

  3. Place the model in the scene, configure it, and create a prefab.

  4. Add a collider to the prefab, which will also handle interactions with the artifact. If you are using custom geometry (using MeshCollider) and you want this geometry to be applied to an artifact with physics (e.g., Blank Grabbable), you need to enable the Convex checkbox on the MeshCollider component.

  5. To set the holding pose of the artifact, add the ArtifactSettings script to the prefab and enter the desired pose from the list into the HandPoseId field.

    1. Microphone_Wearable

    2. ChampagneNarrow

    3. SpeakerCorner

    4. ChampagneWide

    5. ContentGlobe

    6. Glove

    7. Beer

    8. MagnetDot

    9. Tumbler

    10. Brandy

    11. Coffee

    12. Latte

    13. Corner

    14. Microphone

    15. Martini

  6. To set an offset relative to the grip point, you need to adjust the position and rotation parameters of the prefab itself.

  7. Add the prefab to Addressables, checking the checkbox next to it.

  8. Build the bundle for all necessary platforms.

  9. Pack all the resulting folders into a zip archive.

Uploading to the Admin Panel

  1. Uploading the geometry data to the admin panel happens on the Geometry data tab. Here, click the "Create new" button.

  2. Next, enter the name of the geometry data and select "Artifact" in the Kind field.

  3. Then, load the version.

  4. Provide a description of the version and select the zip archive.

IMPORTANT:

If you plan to create multiple different artifacts from this model or export multiple different models from your project, you need to:

  • Go to the Adressables Groups window and select the group into which you're adding objects (by default, this is the Default Local Group).

  • Click on it and in the inspector, find the parameter "Internal Bundle Id Mode" and select "Group Guid Project Id Entries Hash."

Otherwise, they will be built with the same internal ID, and you won't be able to load them into one world.

Creating of Config and Adding to world

To create the config, you need to determine which prefab you will inherit from, and in this case, we chose Blank Grounded (available IDs can be found in the MXR Registry).

assetId: asset.morpheusxr.blank.grounded

Next, we override the name in the artifact menu.

name: Ford GT 2006

If we want to replace the icon, we upload the artifact's icon to some cloud storage and copy the link into the preview parameters.

meta:
  preview: <https://storage.googleapis.com/xmorpheus-public-assets/artifacts/previews/fordIcon.png>

To replace the geometry, we need to know the geometry data ID from the admin panel, the version ID of that geometry data, and the artifact's ID from the manifest.

contents:
  - artifact:
      id: blank.grounded
      data: data.azNXZVB5l6XtEIUEcDX7p.6MK18W8_F2eCu5ndVXx9l

Complete config

Ford_config.yaml

assetId: asset.morpheusxr.blank.grounded
name: Ford GT 2006
meta:
  preview: <https://storage.googleapis.com/xmorpheus-public-assets/artifacts/previews/fordIcon.png>
contents:
  - artifact:
      id: blank.grounded
      data: data.azNXZVB5l6XtEIUEcDX7p.6MK18W8_F2eCu5ndVXx9l

After that, save it as a file with the extension .yaml and add it to the media folder of your world (the place where we add music and pictures). If everything went well, your config will appear in the list with a green icon.

If you have a red icon, then there was an error in your file: the link to the preview is incorrect, and it cannot fetch the image, the specified geometry data does not exist, etc.

After this, the next time you enter the world, your artifact will appear in the menu (if everything went smoothly), and you don't even need to reload the world :)

Last updated