About the problems and solutions encountered when importing GLB animation into Cesium 1.0

A previous company took over a project of a state-owned enterprise to do equipment animation, export glb format files and import cesium control equipment to start up, and cooperate with the problems and solutions encountered by state-owned enterprise developers (my personal level is limited, I am just throwing ideas, and I hope that more people will develop it. Can you share some of this kind of information? It’s still a headache when you encounter a problem suddenly).

Because animation is a temporary learning, many problems may be simple, but I also have a hard time dealing with them (personal ability and remote handover).

use tools:

3dsmax2016+babylon plug-in. Export is set to

If multiple devices need to be transferred to development individually in a scene, you can check Export only selected (only export the selected), set gltf or glb as needed, set the path model path, and the path folder location has changed/moved to If it is in another folder or disk, you need to reset it when exporting, otherwise an error will occur.

You can click export&run when exporting and it will open in the default browser at the same time to check the status of the model in the exported animation file: whether the animation is playing normally and whether the material is normal; you can also watch the glb animation effect on the gltf viewer website and drag the glb model Just go in;

Problems and solutions:

 1. For coordinate issues, it is best to use Party A's model, select the equipment model to be delivered separately, and use Save As - Save the selected object or Export - Export the selected object to prevent the coordinates from moving.

1.2. Units. If the exported animation development side displays the imported device but does not display it, either the coordinates have been moved or the units are wrong. Check that units are consistent, including system units;

2. Pay attention to the normal direction of the model. If it is single-sided, you can add a shell modifier to prevent the surface from disappearing and showing through in cesium.

3. Material, when exporting glb or gltf, you must use the default material of the scanline renderer. You can modify it to the default in the rendering settings before importing the model [here for higher versions such as version 20, the arnold renderer is built-in, and the default material is physical Material], of course it is not impossible to use materials from other renderers. I have had problems here, and the default material is better.

3.1 When using a translucent material, lower the opacity of the material and change the Transparency Mode of Babylon Attributes to Blend;

3.2 Errors caused by missing max file textures;

 After importing the scene, first use Shift+T to check whether the scene textures are missing. Otherwise, the exported gltf will carry textures that cannot be searched by the system, and an error will be reported. [Just a reminder, it is best to use the fbx format when transferring files to each other]

4. Animation, export the animation built by the modifier. I asked someone and said that I need to bake the animation frames, but I couldn't figure it out. I searched online for a long time and it was ambiguous. My level is not high. I currently use collapse, and then export fbx. , check the baking animation [not yet resolved]. However, after confirming it, I just lay flat; I exported it with babylon,  but there is no animation; it is now completed. At the same time, I changed jobs and worked on scenes, so I don’t have time to study this. I wonder if anyone can come and give me some advice. Thank you very much. If this article can be of some use, it won't be in vain.

 Finally: If you still have problems and are pressed for time, don’t hold back. You can check the units, textures, and positions and then do it again via fbx. Hopefully I'm the only one making these careless mistakes.

Guess you like

Origin blog.csdn.net/weixin_64625272/article/details/131884520
Recommended