Exporters: Max2Babylon: rotated AO causes index failure

Created on 17 Jan 2020  路  5Comments  路  Source: BabylonJS/Exporters

When I use Export & Run on this file, the output GLB has an UNRESOLVED_REFERENCE issue, which prevents it from loading in the Sandbox
/materials/1/occlusionTexture/index: Failed to find index (1)

I'm using the same 512x4 PNG texture for both Albedo and Occlusion, except I'm using KHR_texture_transform to rotate the Occlusion 90 degrees.

It works fine if I reset the rotation to zero.

3ds Max 2020.3
Max2Babylon v20191220.1

The material setup. Red box causes the error. Green box exports and runs fine.
2020-01-17 10_53_35-

Zip contains Max file, texture, and two GLBs ("Rotated" is the erroreous one).
AQ_rotated_3dsmax.zip

glTF Validator:
{ "uri": "ball_grid_occlusion_albedo_Rotated.glb", "mimeType": "model/gltf-binary", "validatorVersion": "2.0.0-dev.3.1", "validatedAt": "2020-01-17T15:57:23.642Z", "issues": { "numErrors": 1, "numWarnings": 0, "numInfos": 0, "numHints": 0, "messages": [ { "code": "UNRESOLVED_REFERENCE", "message": "Unresolved reference: 1.", "severity": 0, "pointer": "/materials/1/occlusionTexture/index" } ], "truncated": false }, "info": { "version": "2.0", "generator": "babylon.js glTF exporter for 3dsmax 2020 v20191220.1", "extensionsUsed": [ "KHR_texture_transform" ], "extensionsRequired": [ "KHR_texture_transform" ], "resources": [ { "pointer": "/buffers/0", "mimeType": "application/gltf-buffer", "storage": "glb", "byteLength": 967580 }, { "pointer": "/images/0", "mimeType": "image/png", "storage": "buffer-view", "image": { "width": 512, "height": 4, "format": "luminance", "primaries": "srgb", "transfer": "srgb", "bits": 8 } } ], "animationCount": 0, "materialCount": 2, "hasMorphTargets": false, "hasSkins": false, "hasTextures": true, "hasDefaultScene": true, "drawCallCount": 4, "totalVertexCount": 23099, "totalTriangleCount": 37557, "maxUVs": 1, "maxInfluences": 0, "maxAttributes": 3 } }

bug 3dsmax maya

All 5 comments

Interestingly, I am able to switch the bitmap from occlusion to metalness, or to roughness, both of which export & load correctly.

Rotating the emissive also causes it.

Ok, I think I have a proper fix, we missed updating a reference when exporting an texture that's referenced multiple times in the scene, but with different properties, such as rotation.

I imagine if it was me working on it, I'd want to know. Sorry to keep reporting all these little issues. Probably edge cases. But probably valuable nonetheless. I really appreciate all the effort you put into this!

No worries, every bug helps us make this as reliable as possible 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Drigax picture Drigax  路  7Comments

vpenades picture vpenades  路  9Comments

cptSwing picture cptSwing  路  6Comments

Mudoglu picture Mudoglu  路  4Comments

MaximeOrlandi picture MaximeOrlandi  路  7Comments