Take Measurements And Share Them. Not Just The Spreadsheet, But In Full 3D

You would expect a 3D Measurement API to be a simple bland affair – you pass the avatar and get the measurements in an array or a spreadsheet which in turn you pass it on to your customer. Well, it doesn’t have to be. You can make it very very interesting. The 3D Measure Up Web API now has an option to return a full 3D view of the avatar with annotated measurements. This is returned as a normal HTML (.html) file which can be viewed in any browser or embedded in any web page and does not require internet connection. Yes, it does not require any internet connection because none of the data including the avatar and the measurements are on our server – it’s all included in the HTML file itself which you have full control over.

This feature extends the current measure API by adding an additional parameter “exportHTML” to the request body. The expor tHTML is false by default. When set true, the metrics response contains an attribute “downloadHTMLURL”. The download URL is a signed URL. It is valid for 1 hour. The application can download the self contained HTML file and load it in the browser. Since the HTML is self sufficient, it can be loaded from a local drive without the need of a web server.

A sample request sequence will be as below.

a Request to start extraction of measurements

URL: https://api.3dmu.prototechsolutions.com/v3/models/measure

Request Method: POST

Authorization Header: x-api-key: API key

Request body:

{

    “type”: “all”,

    “fileurl”: https://3dmu-app.prototechsolutions.com/resources/models/bernard.obj,

    “auto_align”: true,

    “filesource”: “url”,

    “filetype”: “obj”,

    “output”: “json”

“export_HTML”: true,

“ids”: [127, 144, 108, 125, 126, 121, 123, 109, 110, 113, 117]

}

Expected response:

{

    “statusCode”: 200,

    “requestId”: d0f17b30-3529-11eb-98f5-a3ea69d792ff

}

  1. Request to retrieve the measurements

URL: https://api.3dmu.prototechsolutions.com/v3/models/metrics?requestId=<request id value from the /measure API response> 

eg: https://api.3dmu.prototechsolutions.com/v3/models/metrics?requestId=d0f17b30-3529-11eb-98f5-a3ea69d792ff 

Note: The requestId value above will be different with each request to the /measure call.

Request Method: GET

Authorization Header: x-api-key: API key

Expected response:

{

    “statusCode”: 200,

    “body”: {

        “result”: {

            “metrics”: {

                “girths”: [

                    {

                        “id”: 101,

                        “label”: “Head Start”,

                        “girth”: [],

                        “level”: 1898.9337258724686,

                        “confidence”: 0

                    },

}

“bodyType”: “Fullbody”,

“downloadHTMLUrl”: “https://3dmu-development-space.s3.ap-south-1.amazonaws.com/ExportedHTMLs/d384ef60-c9aa-11eb-8223-f5ad6cd811da.html?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA2VKJASSLZJQ6KXM5%2F20210610%2Fap-south-1%2Fs3%2Faws4_request&X-Amz-Date=20210610T051509Z&X-Amz-Expires=3600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOX%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiB6w15DbERms5IAJ5XPNS89WynCf8bIlrKy5ZMosWEjZQIhAJSIrspogJ3wp5RQrUXnpVU7%2BC01A7LU96kdPbn0V0VdKp8CCJ7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMNzMyOTgxOTI1MDE1IgwwE39PFWL4QcLcoo4q8wELYmX%2Fq2IEUFZzzDuhkQXMym%2FNg6SSkxkvAoiQdsfbO4q8rolPX1EoX7agjaEVh2R0EO9kksoOPrAHx1wJyJGoHUFWdJKrChMFBjS95Qvcz91iKr0SKP%2FXrG283F2iLkvlkQEHuM5r%2Bxl3E%2BARGy%2Bvb4ZSfb8hcecsu91lA3BKIU9GgbksRjJ6OIl3xUQrpkVXXZZxBlRC4RJLE%2BolVvDyBFZeQLD8WEh%2FvImHzKCyLG%2FznQyH%2BRBQ3szblr1LgjuT5guzWuBchxa8UN2QEaXr8Nw%2F3toampevHM04iZFKq65x2rUWdVNBm%2FQBwgMvMdAqmYww0r6GhgY6mgE4UdaDMfT6dNwT5pqTn8N4wOahFSsTgiqtMl23GStGSRXvFr4G0AVd3%2F1JOhQjjxRGFRj45ccOuMYCvn2GlyaXV2taZVp2zE2me2Zy3GOpGUr4akQoAYYcAc2HwyQqfffGuOkDr0FI9J4C%2Buf3jGcKuskMZAk5TSxOOs0q1EbfJDNFpH0naBdCLYYmrIPRNDSE3KCbdHGLxJOB&X-Amz-Signature=e2bbb8d2ff2ae1826d21354fb77587443b80fd57cd19c575528f0ed74bc2fb49&X-Amz-SignedHeaders=host”

}

The downloadHTMLURL can be used to download the HTML file locally or on a HTTP endpoint.

Feature constraints

The alpha version of the feature has the following constraints.

  1. The HTML export is supported for avatar size less than or equal to 20mb
  2. The maximum number of measurements exported to the HTML file is 20.
  3. The ids of the measurement can be specified in the request. All ids should be valid. The ids can be referred from the metrics guide application on metrics.3dmeasureup.com If ids are not provided, measurements of the following ids will be returned[105, 106, 107, 108, 113, 114, 115, 116, 117, 118, 121, 122, 123, 124, 125, 126, 140, 141, 142, 144];The typical ids of metrics required for a apparel use case are:[ 127, 301, 302, 329, 303, 144, 315,316, 108, 325, 326, 125, 126, 121,123, 109, 110, 309, 113, 117 ]
  4. HTML download URL is valid for 1 hour
  5. The alpha version exports only girths to the HTML format
  6. To export html the type attribute of the measure request should be  “all”. Ie, “type”: “all”

The export HTML feature is an API that enables the developers and designers to quickly verify the results. The HTML presents a 3D view of the measurements on the avatar and can be used as a preview in applications integrating the 3D Measure Up. 

For more visual, interactive and customizable we recommend using the 3D Measure Up OEM widget.

Contact us:
3dmeasureup@prototechsolutions.com
3D Measure Up

Scroll to Top