Problems when export babylon by 3dmax exporter

When I want to export babylon file with skeleton aniamtion from 3dmax 2018, I found 2 questions.

  1. the material of some meshes like hair and eye seems uncorrect.

  2. some meshes seems broken.

cc @PatrickRyan

@xiaopangoo, what is happening is that the materials you are exporting are not exporting in the right alphaMode. The Babylon custom parameters on the material to export parameters like blend mode or unlit seem to not be respected when exporting to .babylon format. I know these custom parameters were added for glTF support, but I don’t remember if they influence .babylon export. There are two things you can do here.

One is to set alpha mode on your materials when exporting into the scene which will fix this rendering issue. Right now alpha mode is undefined so meshes are not sorting correctly which is why you see them rendering on top of each other in the wrong order depending on view angle.

The other would be to export to .gltf or .glb formats which will respect the alpha mode parameter set on the material. The issue with the glTF format and your file is that the standard uses PBR materials, so your phong materials will be converted. You will need to rebalance your specularity and glossiness for PBR because the addition of IBL environments in with your specularity levels is creating a plastic look in your materials:

The original materials in the .babylon file were also a bit too specular for skin and textiles, but the standard material used for the Phong replacement does not use IBL, so the lower light levels of the single light in the scene were not showing how specular all of your materials are authored at.

There were also some validation issues exporting your file to glTF. So you will have to go back to your original mesh and look at what may be out of scope for the glTF format. I saw a lot of warnings about too many bone influences per vertex as well as nearly 200 morph targets. Going over the limit of bone influences will affect how your animation looks. And having that many morph targets will cause bloat in your file that increases your package size for download.

The .babylon file you shared was 255MB without textures. Exporting to .glb brings us to 100MB, but that is still about 35mb for the mesh binary and just over 1MB for the glTF json file. Those are really big files. You have a lot of room to optimize for texture size, but the glTF and mesh binary can’t be optimized without simplifying the file a bit by reducing things like the number of morph targets.

I hope this helps point you in a direction to unblock you, but feel free to ping back with more questions.

1 Like