-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native BVH Os Incompability #254
Comments
What is bullet's stance on this? How can they recommend persisting the data structure if it is not portable across platforms? |
From docu: "Concave Triangle Meshes I made a thread in their forum |
Just saying, I'm still on this. Writing that way should work according to https://code.google.com/p/bullet/source/browse/trunk/Extras/Serialize/makesdna/makesdna.cpp#153 |
Ok, after some more time with this, I say lets axe this for the time being. |
@empirephoenix |
Yes I did, but I failed to get it to work. Actually the writing part seems to work fine with that approach. However the reading part, I did not manage to get btBulletWorldImporter. This might be due to a combination of my missing c++ knowledge combined with gradle based compiling. I did not manage to get that part to work. The importer lies in the extras subproject. It appears this extra part is not at all compiled at the moment, and also not included into the include path. |
Since native Bullet was removed from the Engine on 26 February 2021, this issue is now moot. |
Native Bullet:
Generate a Meshcollisionshape on 64bit Windows 7.
Write it out with the native bvh tree.
Load on same Windows works flawless.
Load on linux creates native crashes as apparently the native structure between different OS is not guranteed to be stable.
Proposed Solution:
Upon writing the MeshCollisionShape save the os.name and os.architecture properties into the j3o. When loading check if the architecture matches, if not emit warning to Logger and call createShape(true);
If the j3o is an older one with no saved os.name default to emit a warning and rebuilding always the shape.
Expected Result:
If the j3o does not contain the right native data, the application can continue to work, at an increased loading time for the j3o
Additional Notes:
Removing the native bvh save is in my opinon no options, as it can increase loading time by a factor of roughly 10x while reducing the memory print. This is especially noticeable for large geometries like whole levels. The bullet documentation specifically says to consider saving this native structure.
@normen
Any objection to this approach? If not i will create a pull request.
The text was updated successfully, but these errors were encountered: