Advanced - Assembling

1. Getting a token

Getting a token

2. Get data for model construction

Note: This service only works with parameters from the 3D Face Reconstruction Service

Need to have:

  • JSON with parameters (head_config.json in example)

  • UV face texture (my_unique_image_name_texture.png in example)

4. Create models config

Models config is the JSON file with the pairs of model IDs for the model types from the scheme that you want to add to the finished GLB file.

For example, if you want to add body_02 from the schema (and don't add hair), models config should look like this:

models_config.json
{
	"body": [
		"body_02"
	]
}

3. Make a request

Make a request by sending the files above.

token="ENTER_YOUR_TOKEN"
head_uv="ENTER_UV_PATH"
head_config="ENTER_HEAD_CONFIG_PATH"
model_config="ENTER_MODEL_CONFIG_PATH"

 curl -X POST\
    'https://api.metahumansdk.io/glb_const/assemble' \
   -H 'accept: application/json' \
   -H 'Content-Type: multipart/form-data' \
   -F "token=$token" \
   -F "head_uv=@$head_uv;type=image/png" \
   -F "head_config=@$head_config;type=application/json" \
   -F "models_config=@$model_config;type=application/json" \
   -F 'add_facs=true' > model.glb

4. Check response

Open the GLB file in the GLB viewer. For example, you can import the GLB file in Blender.

Rendering in Maya:

Last updated