BabylonJS / Exporters

Exporters for Babylon.js and gltf file formats
Other
606 stars 313 forks source link

Object reference not set to an instance of an object #1092

Closed toadstorm closed 11 months ago

toadstorm commented 1 year ago

I'm trying to export a GLB from Maya 2022, Babylon exporter v20230608.5. After the log entry saying "Exporting materials", the following error is thrown:

Export cancelled: Object reference not set to an instance of an object.
    System.NullReferenceException: Object reference not set to an instance of an object.
   at Babylon2GLTF.GLTFExporter.ExportMaterial(BabylonMaterial babylonMaterial, GLTF gltf)
   at Babylon2GLTF.GLTFExporter.ExportGltf(ExportParameters exportParameters, BabylonScene babylonScene, String outputDirectory, String outputFileName, Boolean generateBinary, ILoggingProvider logger)
   at Maya2Babylon.BabylonExporter.Export(ExportParameters exportParameters)
   at Maya2Babylon.Forms.ExporterForm.<DoExport>d__32.MoveNext()

There are no lights or cameras or animation or skinned meshes in the scene. All materials are aiStandardSurface. This error also appears on older versions of the plugin.

bghgary commented 1 year ago

Can you attach a copy of the .ma file so we can repro? Thanks.

toadstorm commented 1 year ago

I can't; unfortunately the model is proprietary. Is there any way to narrow down what object or objects might be triggering the error?

toadstorm commented 1 year ago

The error only seems to occur if I'm using Arnold standard shaders... Stingray doesn't throw this error.

bghgary commented 1 year ago

I can't; unfortunately the model is proprietary. Is there any way to narrow down what object or objects might be triggering the error?

Can you reduce the model until you have smaller repro we can use without issues?

bghgary commented 11 months ago

Without a repro, it will be difficult to diagnose what the issue is. We're closing this for now since it has no activity. Please let us know if you have a repro we can debug.