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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Support for wide-angle cameras in ogre2 #733
Add Support for wide-angle cameras in ogre2 #733
Conversation
Codecov Report
@@ Coverage Diff @@
## main #733 +/- ##
==========================================
+ Coverage 74.07% 74.40% +0.33%
==========================================
Files 159 160 +1
Lines 14408 14684 +276
==========================================
+ Hits 10673 10926 +253
- Misses 3735 3758 +23
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I enabled the INTEGRATION_wide_angle_camera test for diff --git a/test/integration/wide_angle_camera.cc b/test/integration/wide_angle_camera.cc
index 31481a72..2b604376 100644
--- a/test/integration/wide_angle_camera.cc
+++ b/test/integration/wide_angle_camera.cc
@@ -68,7 +68,7 @@ void OnNewWideAngleFrame(const unsigned char *_data,
//////////////////////////////////////////////////
TEST_F(WideAngleCameraTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(WideAngleCamera))
{
- CHECK_SUPPORTED_ENGINE("ogre");
+ CHECK_UNSUPPORTED_ENGINE("optix");
gz::rendering::ScenePtr scene = engine->CreateScene("scene");
ASSERT_NE(nullptr, scene);
@@ -205,7 +205,7 @@ TEST_F(WideAngleCameraTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(WideAngleCamera))
//////////////////////////////////////////////////
TEST_F(WideAngleCameraTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(Projection))
{
- CHECK_SUPPORTED_ENGINE("ogre");
+ CHECK_UNSUPPORTED_ENGINE("optix");
gz::rendering::ScenePtr scene = engine->CreateScene("scene");
ASSERT_NE(nullptr, scene); The first test passed but a few checks are failing in the |
Perfect! I'll take a look after-tomorrow at those test failures. |
I've enabled the Ogre2WideAngleCamera test for ogre2 and fixed its failures. It's now passing. |
Nevermind, ignition_rendering-ci-pr_any-ubuntu_auto-amd64 CI says INTEGRATION_wide_angle_camera_ogre2_gl3plus fails with:
I can repro it. Looking into it. |
Silly last-minute bug had crawled into the code; that's why the test failed. It should be working now. Edit: I see the CI tests Metal as well! I managed to find a clever way to test whether the Metal shaders were valid without having to compile gazebo on a Mac; so I fixed all the shader compiler errors. Now let's cross fingers the CI passes on Metal too! |
3cee257
to
db59b71
Compare
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 few notes on a quick review. Will give more feedback once I have a chance to run it.
This doesn't have anything to do with your changes (unless something is really wrong), but it popped here: No action required, just posting for posterity, because it probably needs to be addressed.
|
Ogre2WideAngleCamera is working! Add missing MSAA & Shadows to Ogre2WideAngleCamera Add Metal shaders to Ogre2WideAngleCamera Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Fix Ogre2WideAngleCamera::Project3d which was failing tests Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Ogre::Camera::getProjectionMatrix returns a matrix with Z [-1; 1] without reverse Z (regardless of reverse Z setting). We must check z is in range [-1; 1] and not just pos.z >= -1 because otherwise pos.z = 1.02 is a possible outcome and gets picked by the wrong face; thus failing the tests. Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
39c1ed7
to
372a256
Compare
馃帀 New feature
Closes #729
Summary
This PR ports OgreWideAngleCamera to Ogre2 engine.
Includes Vulkan, OpenGL & Metal shaders (Metal support not tested)
Test it
Edit
wide_angle_camera.sdf
so that:No longer says ogre and run:
gz sim wide_angle_camera.sdf
Can it be backported to Garden?
The only major/blocking issue I see is that
Ogre2Scene::CreateWideAngleCameraImpl
was added (and is obviously necessary) but adding it breaks the ABI.Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.