The initial goal is simple. Integrate bullet and ogre to find a modeling tool that can generate. Scene and. Bullet files.
Tossing bullet and ogre related things for one night, basically like Edison invented the bullet and learned n lessons of failure. The following is a summary, so don't take a detour.
1. I have high hopes for blender and open-source products, but the result is a big disappointment. The weak ogre plug-in of blender ..... Mesh export is still available, but it cannot be exported at one time. If you want to export multiple mesh export files, you can vomit blood. The scene export plug-in is an international joke. You can only export scene files. You need to use the mesh plug-in to export all models, you need to export the mesh one by one, and then use the scene export plug-in to export scene. (Though tested, it is indeed available.) Even so, blender has built-in bullet physical support, which is very convenient for editing, and the simulation in its own game engine is almost perfect. It also supports constraints, i'm amazed .... The result is that the. Bullet file cannot be exported. The blender version provided by Erwin is used and no menu is found. Therefore, Google has the following script:
Import physicsconstraints
Physicsconstraints. exportbullet ("testfile. Bullet ")
After running the program, the physicsconstraints module is not found. Google then runs the game engine (which is equivalent to dynamically loading this module) and then runs the script. (Press 'P' to run the script, and then press space to run the script)
It's hard to generate a bullet file and try to load it. A bunch of wrong outputs, some objects are created, but the gravity direction may be wrong due to coordinate axis problems, A little messy ...........
Temporarily abandon the mesh sent to the blender and scene Export (this process is complicated) +. Bullet File Export, then use blender's own package file. blender to start to try gamekit.
2. gamekit, although I have tried it before and know that it is not yet mature, now I feel that I want to use blender, so I have to use gamekit (for the above reason). This time I tried my best to get SVN code, directly use cmake to generate the iPhone Project (as described in the official documentation). xcode cannot be used to open the project. You can use the revised cmake source code provided in the gamekit project to compile a set of cmake and then generate the project, download the officially released source code and generate it again. You can open it (obviously, the latest source code cmake script on SVN has a bug ). There are countless compilation errors. I can see someone's similar experiences. He has successfully compiled and run the program, but the post-run error is also terrible. Then give up .....
3. the Maya version of the Maya and ogremax plug-ins is equally outstanding, while the Maya bullet plug-ins were originally made by Disney, which is also good and supports Simple constraints. I tried to load a complicated scenario and exported the bullet, and the result crashed during loading. Try to make a simple scenario by yourself and load it normally through the bullet demo. That is to say, it is estimated that there is still a problem, but at least it is still available. Then try to export the Max file created with the Bullet plug-in to scene and load it with ogre. Nothing is displayed ..... This is a tragedy. In Maya, you can use the bullet plug-in to edit bullet stuff everywhere. the bullet file cannot be displayed. On the contrary, models edited by Maya cannot be physically created and exported. bullet file, this is the biggest tragedy. It can be split and available, and cannot be used together ..... ,
4. 3DS MAX,
My most familiar tool is very powerful in modeling, and the scene export of ogremax ogre is also very good (except stupid models that do not know how to copy can use the same mesh ),
You can export the mesh files and scene files of all models in a scenario at a time. At first, A. Bullet file was exported from the max plug-in of bullet, which was unusable. I thought this plug-in was useless and almost gave up. However, because there are not many other solutions, I later compiled the plug-in through the plug-in source code. I hope the new version of the plug-in can fix some bugs and finally find that, the core of the problem is that the static objects I created through plane cannot be used (it should be converted to the triangle mesh in bullet, and the loading will fail, however, other sphere and box functions can be used normally, including common static objects. Suddenly let me see the light in the dark ........ God .............
However, there are still several problems: first, the correlation between physical and display. Second, the bullet coordinate axis is different from the max coordinate axis, and the physical export will be a bit messy. However, there is already a way to go ...........