gdamoreira / google-ar-asset-converter

Sceneform SDK command to generate SFB files
83 stars 19 forks source link

Seg fault when converting glTF asset without normals #13

Closed treyenelson closed 5 years ago

treyenelson commented 5 years ago

Regardless of model complexity, converting a glTF to sfb always fails when it has no normals. Example glTF:

{
    "accessors": [
        {
            "bufferView": 0,
            "componentType": 5123,
            "count": 36,
            "max": [
                23.0
            ],
            "min": [
                0.0
            ],
            "type": "SCALAR"
        },
        {
            "bufferView": 1,
            "componentType": 5126,
            "count": 24,
            "max": [
                0.5,
                0.5,
                0.5
            ],
            "min": [
                -0.5,
                -0.5,
                -0.5
            ],
            "type": "VEC3"
        }
    ],
    "asset": {
        "extras": {},
        "version": "2.0"
    },
    "bufferViews": [
        {
            "buffer": 0,
            "byteLength": 72,
            "target": 34963
        },
        {
            "buffer": 0,
            "byteLength": 288,
            "byteOffset": 72,
            "byteStride": 12,
            "target": 34962
        }
    ],
    "buffers": [
        {
            "byteLength": 360,
            "uri": "data:application/octet-stream;base64,AAABAAIAAwACAAEABAAFAAYABwAGAAUACAAJAAoACwAKAAkADAANAA4ADwAOAA0AEAARABIAEwASABEAFAAVABYAFwAWABUAAAAAvwAAAD8AAAA/AAAAPwAAAD8AAAA/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAC/AAAAPwAAAD8AAAA/AAAAvwAAAD8AAAA/AAAAPwAAAL8AAAA/AAAAvwAAAL8AAAA/AAAAPwAAAD8AAAC/AAAAPwAAAD8AAAA/AAAAPwAAAL8AAAC/AAAAPwAAAL8AAAA/AAAAvwAAAD8AAAC/AAAAPwAAAD8AAAC/AAAAvwAAAL8AAAC/AAAAPwAAAL8AAAC/AAAAvwAAAD8AAAA/AAAAvwAAAD8AAAC/AAAAvwAAAL8AAAA/AAAAvwAAAL8AAAC/AAAAvwAAAL8AAAA/AAAAvwAAAL8AAAC/AAAAPwAAAL8AAAA/AAAAPwAAAL8AAAC/"
        }
    ],
    "meshes": [
        {
            "name": "Mesh",
            "primitives": [
                {
                    "attributes": {
                        "POSITION": 1
                    },
                    "indices": 0,
                    "mode": 4
                }
            ]
        }
    ],
    "nodes": [
        {
            "mesh": 0
        }
    ],
    "scene": 0,
    "scenes": [
        {
            "nodes": [
                0
            ]
        }
    ]
}

Conversion command:

~/Code/google-ar-asset-converter/sceneform_sdk/linux/converter -b no_norms.gltf

Result:

Segmentation fault (core dumped)
BharathBunty commented 5 years ago

can you help me.. how to run this command in windows .. to get .sfa and .sfb files..

gdamoreira commented 5 years ago

Hi @treyenelson you must redirect your request to Google Sceneform repo.

This repository only helps to use the binaries extracted from sceneform plugin for android studio.

Hi @BharathBunty, for use the command in windows, you can use the same command in the README, changing the binary to use the windows version.