-
Notifications
You must be signed in to change notification settings - Fork 53
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
Use selection buffer in ray queries (ogre2) #378
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-rendering4 #378 +/- ##
==================================================
+ Coverage 55.91% 56.32% +0.40%
==================================================
Files 147 147
Lines 13983 14119 +136
==================================================
+ Hits 7819 7952 +133
- Misses 6164 6167 +3
Continue to review full report at Codecov.
|
the |
* extend selection buffer to return depth Signed-off-by: Ian Chen <[email protected]> * selection buffer depth working Signed-off-by: Ian Chen <[email protected]> * cleanup Signed-off-by: Ian Chen <[email protected]> * style Signed-off-by: Ian Chen <[email protected]> * add check for mac Signed-off-by: Ian Chen <[email protected]> * Add shaders Signed-off-by: Ian Chen <[email protected]> * enable mac test Signed-off-by: Ian Chen <[email protected]> * style Signed-off-by: Ian Chen <[email protected]> * fix bad merge Signed-off-by: Ian Chen <[email protected]> * fix drag and drop Signed-off-by: Ian Chen <[email protected]> * fix utils test Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
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.
just a minor comment
Signed-off-by: Ian Chen <[email protected]>
This PR does 3 things: Adds Ogre2LensFlare Adds tests to test this new pass to INTEGRATION_render_pass Works for both normal Camera and WideAngleCamera. Significantly optimizes Ogre2RayQuery The original CPU implementation is ridiculously slow PR Use selection buffer in ray queries (ogre2) #378 used a GPU implementation to address these issues. However the GPU version can't be easily used (without bigger refactors to how gz-rendering operates) because we need to render (for ray queries) while we are about to render (for lens flares). We cannot use the GPU version. This PR adds an option to force CPU method. LensFlare heavily relies on a lot of raycasts for occlusion (depends on the value passed to SetOcclusionSteps). Signed-off-by: Matias N. Goldberg <[email protected]>
🎉 New feature
Replaces part of ray query logic with the use of selection buffer (mouse picking) for performance improvement.
The current ray query implementation has 2 stages:
These 2 stages are all done on the CPU and they can be slow if the user clicks on a region with multiple overlapping bounding boxes. This PR replaces stage 1 with the use of selection buffer which can efficiently return the first object that the user clicks on. So that in stage 2 we would only need to do ray intersection test with 1 mesh.
Stage 2 can also be improved. That'll come later. Update: see #383
Test it
Use ign-gazebo, insert multiple overlapping complex meshes, and try panning with the mouse by left clicking on a mesh in the scene and dragging the mouse. The movement should be less laggy with these changes. See gazebosim/gz-sim#969
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge