I just recently have gotten around to updating my game client to babylon.js 4 from 3, which pretty much entailed only removing workarounds for bugs that are no longer there. Almost everything now works better than ever, except for the following:
We use MakeHuman for modelling NPCs. Our workflow is MakeHuman (set all parameters, add rig “default no toes”) -> mhx2 -> blender (2.79) -> .babylon (using 5.6.4 exporter).
In babylon.js 3 we could use the resulting model and everything worked perfectly, including animations.
In babylon 4 however, we have this problem:
(sorry the lighting isn’t that great, but the wrong vertices should be visible)
Some vertices are simply rendered wrong. The same models are rendered fine in babylon.js 3.
Any ideas what might be going on? This problem only applies to models created with MakeHuman that have a rig set (but of course I need a rig for skeletal animations).
Things I tried:
- Disabling texture storage of bones in the inspector (no difference)
- Using the newest exporter with blender 2.80 beta (I get a python exception saying there is no attribute depsgraph, probably a breaking API change that has not been dealt with yet)
Other possible causes/solutions:
- on my system (not the newest), babylon.js 3 defaulted to WebGL 1, but 4 now uses WebGL 2
- maybe using Tower of Babel might fix it (edit: but I’d have to retool my whole loading code, that’s why I’d like to avoid it)
- or using gltf. With gltf export from blender 2.80, animations and vertices are exported correctly (in fact the animation autoplays, but there is probably a flag somewhere to disable that), but no materials are exported (do you have to change everything to gltf shaders/PBR manually, or is there some automated way to do that?).
I have attached all the relevant files so you can try it for yourself.
makehuman_problem.zip (2.8 MB)