đē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:
Grabbable - an object with physics (affected by gravity) that can be picked up by hand or a pointer.
Placeable - an object without physics that can only be moved as a decorator.
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
Download/Create the model.
Import the model into the project.
Place the model in the scene, configure it, and create a prefab.
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.
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.
Microphone_Wearable
ChampagneNarrow
SpeakerCorner
ChampagneWide
ContentGlobe
Glove
Beer
MagnetDot
Tumbler
Brandy
Coffee
Latte
Corner
Microphone
Martini
To set an offset relative to the grip point, you need to adjust the position and rotation parameters of the prefab itself.
Add the prefab to Addressables, checking the checkbox next to it.
Build the bundle for all necessary platforms.
Pack all the resulting folders into a zip archive.
Uploading to the Admin Panel
Uploading the geometry data to the admin panel happens on the Geometry data tab. Here, click the "Create new" button.
Next, enter the name of the geometry data and select "Artifact" in the Kind field.
Then, load the version.
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).
Next, we override the name in the artifact menu.
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.
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.
Complete config
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