habitat-lab
habitat-lab copied to clipboard
HITL: Limit amount of float decimals in JSON transmissions.
Motivation and Context
This uses the gfx_replay_manager API introduced here to limit the amount of floating point decimals used in HITL JSON serialization.
How Has This Been Tested
Tested locally. Verified that this doesn't introduce z-fighting.
Types of changes
- [Development]
Checklist
- [x] My code follows the code style of this project.
- [x] I have updated the documentation if required.
- [x] I have read the CONTRIBUTING document.
- [x] I have completed my CLA (see CONTRIBUTING)
- [x] I have added tests to cover my changes if required.
Are you sure about 3 places? GPT says a quaternion error could be as high as 3.6 degrees.
Great question. I've been running exclusively from this code for a while now. Axis-aligned quaternions don't show precision issues, and animations are smooth (testing with skinned mesh animations).
That aside, I believe that we don't have calculations that strictly depend on having normalized quaternions. As a rule of thumb, we should never trust serialized quaternions to be normalized.
Initially, I was mostly concerned with Z-fighting as HSSD has lots of co-planar geometry (carpets, wall art, ...). This also works fine after decreasing prevision.
Changed to 4 decimal places.