This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Simple box-on-plane test. I expected the box sliding smoothly on the plane | |
(both have low friction, etc) but instead the box starts jumping (at 60 Hz). | |
I have to decrease the timestep significantly for this to start working. | |
Any idea how to make this work at 60 Hz ? | |
--> | |
<mujoco model="SlidingBox"> | |
<statistic meansize="1"/> | |
<option timestep="0.016666"/> | |
<!--<option timestep="0.002"/> <!-- even at 500Hz the cube eventually starts jumping --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
See https://github.com/jbikker/tinybvh | |
PhysX is a general purpose library not focused on raycasts and the best setup for raycast performance may not be obvious. | |
Here is the code I used in the tiny BVH benchmark. Results: https://x.com/PierreTerdiman/status/1854629430246748455 | |
Adapted from https://github.com/NVIDIA-Omniverse/PhysX/tree/main/physx/snippets/snippetpathtracing | |
For building: | |
#ifdef PHYSX_BUILD | |
const bool quantized = false; // quantized trees use less memory but are usually slower for raycasts | |
const bool useSAH = false; // SAH build is much slower but can give slightly better perf. Not the PhysX default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ctype.h> | |
#include <chrono> | |
#include <iostream> | |
#include "PxPhysicsAPI.h" | |
#include "../snippetcommon/SnippetPrint.h" | |
#include "../snippetcommon/SnippetPVD.h" | |
#include "../snippetutils/SnippetUtils.h" | |
#ifdef RENDER_SNIPPET | |
#include "../snippetrender/SnippetRender.h" | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef SAFE_VERSION | |
#define SIMD_OVERLAP_TEST (_mm_movemask_ps(_mm_cmpngt_ps(b, _mm_load_ps(box)))==15) | |
#else | |
#define SIMD_OVERLAP_TEST (_mm_movemask_ps(_mm_cmpnle_ps(_mm_load_ps(box), b))==12) | |
#endif | |
bool Meshmerizer::CompleteBoxPruning(udword nb, const AABB* list, Container& pairs) | |
{ | |
// Checkings |