-
Notifications
You must be signed in to change notification settings - Fork 419
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
Physics usability improvements #231
Conversation
This allows absolute filenames to be used inside the JSON configs.
…e a lot. Now you can't *see* it runs 60 FPS but you can *feel* it.
* Use an absolute default path so it doesn't depend on current working directory. * Instead of dying on an assert inside rapidjson, check file existence and fail gracefully with a clear message. * Use consistent naming scheme for the options.
So warn on that. People *might* still want to do this, so not making this a hard error.
When all files fail to load, it would crash because of a modulo with zero. When physics is not enabled, the O key would silently do nothing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, mosra. LGTM :)
<< ":\n---\nPhysics was enabled and Bullet physics engine was " | ||
"specified, but the project is built without Bullet support. " | ||
"Objects added to the scene will be restricted to kinematic updates " | ||
"only. Reinstall with --bullet to enable Bullet dynamics.\n---"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with --with-bullet
? :)
Looking again, this error was actually there, but so buried among the others that I didn't see it. Now it is nicely loud and clear.
* Name the Bullet-enabling var consistently, turn it into a CMake option. * assets: use proper directory joining for physics object filenames. * This allows absolute filenames to be used inside the JSON configs. * viewer: printing this every frame actually slows everything down quite a lot. Now you can't *see* it runs 60 FPS but you can *feel* it. * viewer: improve the physics config file passing. * Use an absolute default path so it doesn't depend on current working directory. * Instead of dying on an assert inside rapidjson, check file existence and fail gracefully with a clear message. * Use consistent naming scheme for the options. * viewer: exiting after an error shouldn't use a success return code. * viewer: improve usability of the banana throwing. When all files fail to load, it would crash because of a modulo with zero. When physics is not enabled, the O key would silently do nothing. * viewer: enable at least a bit of MSAA for prettier screenshots. * Changed no Bullet WARNING in ResourceManager to be more helpful.
Motivation and Context
Sweeps away a bunch of roadblocks I ran into when crafting screenshots for #152.
setup.py
at all (i.e., me). Not a user-facing change as the publicsetup.py
variable is still named the same./home/mosra/Data/fair/1199943_collision.glb
) without those being turned into./data//home/mosra/Data/fair/1199943_collision.glb
.--enable-physics
w/o Bullet enabled is most probably an error, so warn on that. People might still want to do this, so not making this a hard error. (Alternatively,--enable-physics
could be compiled out when Bullet is not enabled, if that makes more sense for you.)How Has This Been Tested
Creating those screenshots was quite a soak test for all the viewer functionality, and it survived.