You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can get your developer API key from the Cognitive3D web dashboard. Look for the "Manage developer key" option in the settings (gear icon) menu.
43
+
#### Parameters
53
44
54
-
> Note: We strongly recommend you _do not_ store your developer API key in version control.
45
+
*`--scene_dir <scene_directory>` (required): Path to a folder containing:
46
+
*`scene.bin`
47
+
*`scene.gltf`
48
+
*`screenshot.png`
49
+
*`settings.json`
50
+
*`[--env <prod/dev>]` (optional): Either `prod` (default) or `dev`
51
+
*`[--scene_id <scene_id_from_dashboard>]` (optional): Scene ID to append to the API endpoint to upload a new version of an existing scene
55
52
56
53
### Example
57
54
58
55
For the first time you upload your scene you won't have a scene ID, so we don't pass that parameter. The first time you run this script, without a scene ID, it creates the scene and returns the new scene ID (output to the console at the end of the script.)
For subsequent (new) versions of the same scene, pass in your scene ID as the third parameter to the script. This will upload the scene assets again and the platform will auto-increment the scene version.
66
63
67
64
You can find the scene ID on the Cognitive3D dashboard on the Scenes page. Look for the "information" icon (letter 'i' in a circle) and hover over it.
This Bash script uploads dynamic 3D object assets to the Cognitive3D platform, supporting GLTF + BIN files, optional textures, and thumbnail metadata. It supports both development and production environments.
92
89
93
-
### Dynamic object uploader requirements
94
-
95
-
* Bash 4+
96
-
*`curl`
97
-
* A Cognitive3D Developer API key (set as an environment variable)
90
+
Uploading a scene to the platform is required before you can upload any dynamic object models. The scene_id is a required parameter.
98
91
99
92
### Dynamic object uploader usage
100
93
101
94
```bash
102
-
./upload-dynamic-object.sh \
95
+
./upload-object.sh \
103
96
--scene_id <scene-uuid> \
104
97
--object_filename <object-name> \
105
98
--object_dir <path-to-object-directory> \
@@ -114,10 +107,10 @@ This Bash script uploads dynamic 3D object assets to the Cognitive3D platform, s
114
107
*`--scene_id`: The Scene ID UUID where the object will be uploaded.
115
108
*`--object_filename`: The base filename (no extension) of the object, used to find `.gltf` and `.bin` files.
116
109
*`--object_dir`: The directory containing the object files.
117
-
*`--object_id`: If specified, uploads as a new version of an existing object.
118
110
119
111
#### Optional Parameters
120
112
113
+
*`--object_id`: If specified, uploads as a new version of an existing object.
121
114
*`--env`: Target environment (`prod` or `dev`). Defaults to `prod`.
122
115
*`--verbose`: Enables detailed logging.
123
116
*`--dry_run`: Prints the constructed `curl` command but skips execution.
@@ -132,16 +125,16 @@ The following files must exist in the `--object_dir`:
*`--dry_run` shows the `curl` command without executing it
162
155
* Colored output highlights info, warnings, errors, and debug details
163
156
164
-
### Examples
157
+
### Uploading the object manifest
158
+
159
+
After uploading the dynamic object asset files (mesh, textures) you must upload the dynamic object manifest file to display the objects on the Cognitive3D dashboard for your project and scene.
160
+
161
+
### Dynamic object manifest uploader usage
162
+
163
+
The dynamic object manifest for your scene and object is created automatically after successfully uploading the dynamic object assets. It will be in a file named `<scene_id>_object_manifest.json`.
The following files must exist in the same directory where you are calling the script from:
190
+
191
+
*`<scene_id>_object_manifest.json`, which is automatically created after successfully uploading your dynamic object meshes
192
+
193
+
### Dynamic object manifest uploader example
194
+
195
+
```bash
196
+
export C3D_DEVELOPER_API_KEY=<your-api-key>
197
+
198
+
./upload-object-manifest.sh \
199
+
--scene_id <scene_id_goes_here> \
200
+
--env prod \
201
+
--verbose
202
+
```
203
+
204
+
The reason we don't automatically upload the manifest after uploading the object assets is to allow you to modify the manifest JSON before uploading.
205
+
206
+
If you have any questions or problems using these scripts contact our customer support team using the Intercom button (public circle) on any Cognitive3D web page.
0 commit comments