From 6d08ef36c577f1a44eef79855a624bc12d9eb2a5 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Wed, 29 Sep 2021 16:30:46 -0700 Subject: [PATCH 1/9] Fix occasional flickering issue when skybox and directional light shadows are enabled. (#440) Signed-off-by: Ian Chen --- ogre2/src/Ogre2DepthCamera.cc | 45 +++++++++++++++++++++++----------- ogre2/src/Ogre2RenderTarget.cc | 34 +++++++++++++++++-------- 2 files changed, 55 insertions(+), 24 deletions(-) diff --git a/ogre2/src/Ogre2DepthCamera.cc b/ogre2/src/Ogre2DepthCamera.cc index b69525fa3..8efec74b2 100644 --- a/ogre2/src/Ogre2DepthCamera.cc +++ b/ogre2/src/Ogre2DepthCamera.cc @@ -153,6 +153,9 @@ class ignition::rendering::Ogre2DepthCameraPrivate /// \brief Name of sky box material public: const std::string kSkyboxMaterialName = "SkyBox"; + + /// \brief Name of shadow compositor node + public: const std::string kShadowNodeName = "PbsMaterialsShadowNode"; }; using namespace ignition; @@ -696,6 +699,25 @@ void Ogre2DepthCamera::CreateDepthTexture() else colorTargetDef->setNumPasses(1); { + // scene pass - opaque + { + Ogre::CompositorPassSceneDef *passScene = + static_cast( + colorTargetDef->addPass(Ogre::PASS_SCENE)); + passScene->mShadowNode = this->dataPtr->kShadowNodeName; + passScene->mVisibilityMask = IGN_VISIBILITY_ALL; + passScene->mIncludeOverlays = false; + passScene->mFirstRQ = 0u; + passScene->mLastRQ = 2u; + if (!validBackground) + { + passScene->setAllLoadActions(Ogre::LoadAction::Clear); + passScene->setAllClearColours(Ogre::ColourValue( + Ogre2Conversions::Convert(this->Scene()->BackgroundColor()))); + } + } + + // render background, e.g. sky, after opaque stuff if (validBackground) { // quad pass @@ -712,21 +734,16 @@ void Ogre2DepthCamera::CreateDepthTexture() Ogre2Conversions::Convert(this->Scene()->BackgroundColor()))); } - // scene pass - Ogre::CompositorPassSceneDef *passScene = - static_cast( - colorTargetDef->addPass(Ogre::PASS_SCENE)); - passScene->mVisibilityMask = IGN_VISIBILITY_ALL; - - // todo(anyone) PbsMaterialsShadowNode is hardcoded. - // Although this may be just fine - passScene->mShadowNode = "PbsMaterialsShadowNode"; - - if (!validBackground) + // scene pass - transparent stuff { - passScene->setAllLoadActions(Ogre::LoadAction::Clear); - passScene->setAllClearColours(Ogre::ColourValue( - Ogre2Conversions::Convert(this->Scene()->BackgroundColor()))); + Ogre::CompositorPassSceneDef *passScene = + static_cast( + colorTargetDef->addPass(Ogre::PASS_SCENE)); + passScene->mVisibilityMask = IGN_VISIBILITY_ALL; + // todo(anyone) PbsMaterialsShadowNode is hardcoded. + // Although this may be just fine + passScene->mShadowNode = this->dataPtr->kShadowNodeName; + passScene->mFirstRQ = 2u; } } diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index 867544d3a..88b4679f2 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -189,6 +189,23 @@ void Ogre2RenderTarget::BuildCompositor() else rt0TargetDef->setNumPasses(1); { + // scene pass - opaque + { + Ogre::CompositorPassSceneDef *passScene = + static_cast( + rt0TargetDef->addPass(Ogre::PASS_SCENE)); + passScene->mShadowNode = this->dataPtr->kShadowNodeName; + passScene->mIncludeOverlays = false; + passScene->mFirstRQ = 0u; + passScene->mLastRQ = 2u; + if (!validBackground) + { + passScene->setAllLoadActions(Ogre::LoadAction::Clear); + passScene->setAllClearColours(this->ogreBackgroundColor); + } + } + + // render background, e.g. sky, after opaque stuff if (validBackground) { // quad pass @@ -204,17 +221,14 @@ void Ogre2RenderTarget::BuildCompositor() passQuad->setAllClearColours(this->ogreBackgroundColor); } - // scene pass - Ogre::CompositorPassSceneDef *passScene = - static_cast( - rt0TargetDef->addPass(Ogre::PASS_SCENE)); - passScene->mShadowNode = this->dataPtr->kShadowNodeName; - passScene->mIncludeOverlays = true; - - if (!validBackground) + // scene pass - transparent stuff { - passScene->setAllLoadActions(Ogre::LoadAction::Clear); - passScene->setAllClearColours(this->ogreBackgroundColor); + Ogre::CompositorPassSceneDef *passScene = + static_cast( + rt0TargetDef->addPass(Ogre::PASS_SCENE)); + passScene->mIncludeOverlays = true; + passScene->mShadowNode = this->dataPtr->kShadowNodeName; + passScene->mFirstRQ = 2u; } } From eb7d6eaa5c6129fd76acbe222f6ca8655599342a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Thu, 30 Sep 2021 20:44:58 +0200 Subject: [PATCH 2/9] Non desired window opening alongside ignition GUI (#436) Signed-off-by: ahcorde --- include/ignition/rendering/base/BaseRenderEngine.hh | 3 +++ ogre2/src/Ogre2RenderEngine.cc | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/include/ignition/rendering/base/BaseRenderEngine.hh b/include/ignition/rendering/base/BaseRenderEngine.hh index 36f0f9ef5..3d99ef085 100644 --- a/include/ignition/rendering/base/BaseRenderEngine.hh +++ b/include/ignition/rendering/base/BaseRenderEngine.hh @@ -119,6 +119,9 @@ namespace ignition protected: bool isHeadless = false; + /// \brief ID from a external window + protected: std::string winID = ""; + protected: unsigned int nextSceneId; IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index d7f4695a5..cda537ea7 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -294,6 +294,10 @@ bool Ogre2RenderEngine::LoadImpl( if (it != _params.end()) std::istringstream(it->second) >> this->isHeadless; + it = _params.find("winID"); + if (it != _params.end()) + std::istringstream(it->second) >> this->winID; + try { this->LoadAttempt(); @@ -880,6 +884,13 @@ std::string Ogre2RenderEngine::CreateRenderWindow(const std::string &_handle, params["currentGLContext"] = "true"; } +#if !defined(__APPLE__) && !defined(_MSC_VER) + if (!this->winID.empty()) + { + params["parentWindowHandle"] = this->winID; + } +#endif + int attempts = 0; while (window == nullptr && (attempts++) < 10) { From 084516a13dd72a974cb9c43f447a206493e3065a Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 30 Sep 2021 13:59:24 -0700 Subject: [PATCH 3/9] Merge pull request #443 from ignitionrobotics/iche033/heightmap_segmentation_patch Hide heightmaps in segmentation camera --- .../ignition/rendering/ogre2/Ogre2Scene.hh | 5 +++++ ogre2/src/Ogre2Heightmap.cc | 1 + ogre2/src/Ogre2Scene.cc | 6 +++++ .../src/Ogre2SegmentationMaterialSwitcher.cc | 22 +++++++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh b/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh index 4339159d2..48c0e85f9 100644 --- a/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh +++ b/ogre2/include/ignition/rendering/ogre2/Ogre2Scene.hh @@ -350,6 +350,11 @@ namespace ignition /// \param[in] _camera Camera about to be used for rendering public: void UpdateAllHeightmaps(Ogre::Camera *_camera); + /// \internal + /// \brief Return all heightmaps in the scene + public: const std::vector> &Heightmaps() + const; + /// \brief Create a compositor shadow node with the same number of shadow /// textures as the number of shadow casting lights protected: void UpdateShadowNode(); diff --git a/ogre2/src/Ogre2Heightmap.cc b/ogre2/src/Ogre2Heightmap.cc index 0252fc2ed..04273b12b 100644 --- a/ogre2/src/Ogre2Heightmap.cc +++ b/ogre2/src/Ogre2Heightmap.cc @@ -60,6 +60,7 @@ class ignition::rendering::Ogre2HeightmapPrivate /// \brief Size of the heightmap data. public: unsigned int dataSize{0u}; + /// \brief Pointer to ogre terra object public: std::unique_ptr terra{nullptr}; }; diff --git a/ogre2/src/Ogre2Scene.cc b/ogre2/src/Ogre2Scene.cc index 7571c57e4..c0d0ab8a3 100644 --- a/ogre2/src/Ogre2Scene.cc +++ b/ogre2/src/Ogre2Scene.cc @@ -923,6 +923,12 @@ MaterialMapPtr Ogre2Scene::Materials() const return this->materials; } +////////////////////////////////////////////////// +const std::vector> &Ogre2Scene::Heightmaps() const +{ + return this->heightmaps; +} + ////////////////////////////////////////////////// DirectionalLightPtr Ogre2Scene::CreateDirectionalLightImpl(unsigned int _id, const std::string &_name) diff --git a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc index ef266252a..04e2438d1 100644 --- a/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc +++ b/ogre2/src/Ogre2SegmentationMaterialSwitcher.cc @@ -23,6 +23,7 @@ #include +#include "ignition/rendering/ogre2/Ogre2Heightmap.hh" #include "ignition/rendering/ogre2/Ogre2Scene.hh" #include "ignition/rendering/ogre2/Ogre2Visual.hh" #include "ignition/rendering/RenderTypes.hh" @@ -317,6 +318,18 @@ void Ogre2SegmentationMaterialSwitcher::cameraPreRenderScene( this->instancesCount.clear(); this->takenColors.clear(); this->coloredLabel.clear(); + + // disable heightmaps in segmentation camera sensor + // until we support changing its material based on input label + // TODO(anyone) add support for heightmaps with the segmentation camera + // https://github.com/ignitionrobotics/ign-rendering/issues/444 + auto heightmaps = this->scene->Heightmaps(); + for (auto h : heightmaps) + { + auto heightmap = h.lock(); + if (heightmap) + heightmap->Parent()->SetVisible(false); + } } //////////////////////////////////////////////// @@ -326,6 +339,15 @@ void Ogre2SegmentationMaterialSwitcher::cameraPostRenderScene( // restore item to use pbs hlms material for (const auto &[subItem, dataBlock] : this->datablockMap) subItem->setDatablock(dataBlock); + + // re-enable heightmaps + auto heightmaps = this->scene->Heightmaps(); + for (auto h : heightmaps) + { + auto heightmap = h.lock(); + if (heightmap) + heightmap->Parent()->SetVisible(true); + } } //////////////////////////////////////////////// From dc2f1a487f907a6ddaebaa2b83cce17b410b23aa Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Thu, 30 Sep 2021 15:19:21 -0700 Subject: [PATCH 4/9] =?UTF-8?q?=F0=9F=8E=88=206.0.0=20(#445)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel --- CMakeLists.txt | 2 +- Changelog.md | 56 +++++++++++++++++++++++++++++--------------------- README.md | 8 ++++---- 3 files changed, 38 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f84ba440..38ebb612a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR}) #============================================================================ # Set up the project #============================================================================ -ign_configure_project(VERSION_SUFFIX pre2) +ign_configure_project(VERSION_SUFFIX) #============================================================================ # Set project-specific options diff --git a/Changelog.md b/Changelog.md index 5c6ea524c..4283d6527 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,15 +4,24 @@ ### Ignition Rendering 6.0.0 (20XX-XX-XX) +1. Avoid configure warning when checking ogre-1.10 + * [Pull request #411](https://github.com/ignitionrobotics/ign-rendering/pull/411) + * [Pull request #413](https://github.com/ignitionrobotics/ign-rendering/pull/413) + +1. Use selection buffer in ray queries (ogre2) + * [Pull request #378](https://github.com/ignitionrobotics/ign-rendering/pull/378) + +1. Fix particle effect randomness + * [Pull request #388](https://github.com/ignitionrobotics/ign-rendering/pull/388) + 1. Update test config to run ogre 1.x tests in ign-rendering6 on macOS * [Pull request #407](https://github.com/ignitionrobotics/ign-rendering/pull/407) * [Pull request #409](https://github.com/ignitionrobotics/ign-rendering/pull/409) - -1. Check if key exists in gpu lidar's user data - * [Pull request #396](https://github.com/ignitionrobotics/ign-rendering/pull/396) + * [Pull request #409](https://github.com/ignitionrobotics/ign-rendering/pull/409) 1. Clone visuals and geometries * [Pull request #397](https://github.com/ignitionrobotics/ign-rendering/pull/397) + * [Pull request #434](https://github.com/ignitionrobotics/ign-rendering/pull/434) 1. Add SetSize API for LidarVisual and markers * [Pull request #392](https://github.com/ignitionrobotics/ign-rendering/pull/392) @@ -23,16 +32,21 @@ 1. Prevent default-constructed variants from holding a type * [Pull request #371](https://github.com/ignitionrobotics/ign-rendering/pull/371) + * [Pull request #396](https://github.com/ignitionrobotics/ign-rendering/pull/396) 1. Temporarily set number of camera pass count per flush to 0 in ogre2 to prevent downstream build failures * [Pull request #367](https://github.com/ignitionrobotics/ign-rendering/pull/367) -1. Joint visual - * [Pull request #366](https://github.com/ignitionrobotics/ign-rendering/pull/366) - * [Pull request #387](https://github.com/ignitionrobotics/ign-rendering/pull/387) +1. New visuals + 1. Joint visual + * [Pull request #366](https://github.com/ignitionrobotics/ign-rendering/pull/366) + * [Pull request #387](https://github.com/ignitionrobotics/ign-rendering/pull/387) -1. Fixing camera projection type test - * [Pull request #361](https://github.com/ignitionrobotics/ign-rendering/pull/361) + 1. Center of mass visual + * [Pull request #345](https://github.com/ignitionrobotics/ign-rendering/pull/345) + + 1. Inertia visual + * [Pull request #326](https://github.com/ignitionrobotics/ign-rendering/pull/326) 1. UserData methods moved from Visual to Node * [Pull request #358](https://github.com/ignitionrobotics/ign-rendering/pull/358) @@ -40,19 +54,14 @@ 1. Replace renderOneFrame for per-workspace update calls * [Pull request #353](https://github.com/ignitionrobotics/ign-rendering/pull/353) -1. Center of mass visual - * [Pull request #345](https://github.com/ignitionrobotics/ign-rendering/pull/345) - 1. Segmentation Camera * [Pull request #329](https://github.com/ignitionrobotics/ign-rendering/pull/329) * [Pull request #419](https://github.com/ignitionrobotics/ign-rendering/pull/419) + * [Pull request #443](https://github.com/ignitionrobotics/ign-rendering/pull/443) 1. Stub bounding box camera APIs * [Pull request #420](https://github.com/ignitionrobotics/ign-rendering/pull/420) -1. Inertia visual - * [Pull request #326](https://github.com/ignitionrobotics/ign-rendering/pull/326) - 1. Changed calculation for range clipping * [Pull request #325](https://github.com/ignitionrobotics/ign-rendering/pull/325) @@ -61,9 +70,7 @@ 1. Add orthographic view controller * [Pull request #322](https://github.com/ignitionrobotics/ign-rendering/pull/322) - -1. Port codecov to new configuration - * [Pull request #318](https://github.com/ignitionrobotics/ign-rendering/pull/318) + * [Pull request #361](https://github.com/ignitionrobotics/ign-rendering/pull/361) 1. Visualize wireframes * [Pull request #314](https://github.com/ignitionrobotics/ign-rendering/pull/314) @@ -74,13 +81,16 @@ 1. From Ogre 2.1 to Ogre 2.2 * [Pull request #272](https://github.com/ignitionrobotics/ign-rendering/pull/272) * [Pull request #393](https://github.com/ignitionrobotics/ign-rendering/pull/393) + * [Pull request #436](https://github.com/ignitionrobotics/ign-rendering/pull/436) + * [Pull request #426](https://github.com/ignitionrobotics/ign-rendering/pull/426) + * [Pull request #440](https://github.com/ignitionrobotics/ign-rendering/pull/440) -1. All changes merged forward from ign-rendering5 - * [Pull request #310](https://github.com/ignitionrobotics/ign-rendering/pull/310) - * [Pull request #331](https://github.com/ignitionrobotics/ign-rendering/pull/331) - * [Pull request #350](https://github.com/ignitionrobotics/ign-rendering/pull/350) - * [Pull request #401](https://github.com/ignitionrobotics/ign-rendering/pull/401) - * [Pull request #406](https://github.com/ignitionrobotics/ign-rendering/pull/406) +1. Documentation updates + * [Pull request #425](https://github.com/ignitionrobotics/ign-rendering/pull/425) + * [Pull request #431](https://github.com/ignitionrobotics/ign-rendering/pull/431) + +1. Infrastructure + * [Pull request #318](https://github.com/ignitionrobotics/ign-rendering/pull/318) ### Ignition Rendering 5.X diff --git a/README.md b/README.md index e6e6cfed3..f3be7f0bb 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Build | Status -- | -- -Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-rendering/branch/main/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-rendering/branch/default) -Ubuntu Bionic | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_rendering-ci-main-bionic-amd64)](https://build.osrfoundation.org/job/ignition_rendering-ci-main-bionic-amd64) -Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_rendering-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_rendering-ci-main-homebrew-amd64) -Windows | [![Build Status](https://build.osrfoundation.org/job/ign_rendering-ci-win/badge/icon)](https://build.osrfoundation.org/job/ign_rendering-ci-win/) +Test coverage | [![codecov](https://codecov.io/gh/ignitionrobotics/ign-rendering/branch/ign-rendering6/graph/badge.svg)](https://codecov.io/gh/ignitionrobotics/ign-rendering/branch/ign-rendering6) +Ubuntu Bionic | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_rendering-ci-ign-rendering6-bionic-amd64)](https://build.osrfoundation.org/job/ignition_rendering-ci-ign-rendering6-bionic-amd64) +Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_rendering-ci-ign-rendering6-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_rendering-ci-ign-rendering6-homebrew-amd64) +Windows | [![Build Status](https://build.osrfoundation.org/job/ign_rendering-ign-6-win/badge/icon)](https://build.osrfoundation.org/job/ign_rendering-ign-6-win/) Ignition Rendering is a C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating From dd4b5206db102fb7830fd852daedf10680b2bf7d Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Fri, 1 Oct 2021 10:02:40 -0700 Subject: [PATCH 5/9] use ray triangle intersection for ray query (#447) Signed-off-by: Ian Chen --- ogre2/src/Ogre2RayQuery.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ogre2/src/Ogre2RayQuery.cc b/ogre2/src/Ogre2RayQuery.cc index ea2468004..fd9f1d1cc 100644 --- a/ogre2/src/Ogre2RayQuery.cc +++ b/ogre2/src/Ogre2RayQuery.cc @@ -95,6 +95,11 @@ RayQueryResult Ogre2RayQuery::ClosestPoint() { RayQueryResult result; + // ray query using selection buffer does not seem to work on some machines + // using cpu based ray-triangle intersection method + // \todo remove this line if selection buffer is working again + return this->ClosestPointByIntersection(); + #ifdef __APPLE__ return this->ClosestPointByIntersection(); #else From f93c796abffbfd979d2eebbfc7fb3e8b2d75ae75 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Fri, 1 Oct 2021 11:00:12 -0700 Subject: [PATCH 6/9] prepare for 6.0.1 patch release (#449) Signed-off-by: Ian Chen --- CMakeLists.txt | 2 +- Changelog.md | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38ebb612a..51328f1e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) #============================================================================ # Initialize the project #============================================================================ -project(ignition-rendering6 VERSION 6.0.0) +project(ignition-rendering6 VERSION 6.0.1) #============================================================================ # Find ignition-cmake diff --git a/Changelog.md b/Changelog.md index 4283d6527..ef411bde3 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,7 +2,12 @@ ### Ignition Rendering 6.X -### Ignition Rendering 6.0.0 (20XX-XX-XX) +### Ignition Rendering 6.0.1 (2021-10-01) + +1. Disable using selection buffer for ray queries + * [Pull request #447](https://github.com/ignitionrobotics/ign-rendering/pull/447) + +### Ignition Rendering 6.0.0 (2021-09-30) 1. Avoid configure warning when checking ogre-1.10 * [Pull request #411](https://github.com/ignitionrobotics/ign-rendering/pull/411) From e17fafd2d4b856c7f02d5b5905ac097476dc4faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 6 Oct 2021 18:57:11 +0200 Subject: [PATCH 7/9] Added macos instructions (#448) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added macos instructions Signed-off-by: Alejandro Hernández * Fix Signed-off-by: Alejandro Hernández Co-authored-by: Ian Chen --- tutorials/02_install.md | 49 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/tutorials/02_install.md b/tutorials/02_install.md index 9fc5fbf7e..ac799ed39 100644 --- a/tutorials/02_install.md +++ b/tutorials/02_install.md @@ -196,6 +196,54 @@ This assumes you have created and activated a Conda environment while installing cmake --install . --config Release ``` +# macOS + +## Binary Installation + +On macOS, add OSRF packages: + ``` + ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + brew tap osrf/simulation + ``` + +Install Ignition Rendering: + ``` + brew install ignition-rendering<#> + ``` + +Be sure to replace `<#>` with a number value, such as 5 or 6, depending on +which version you need. + +## Source Installation + +1. Clone the repository + ``` + git clone https://github.com/ignitionrobotics/ign-rendering -b ign-rendering<#> + ``` + Be sure to replace `<#>` with a number value, such as 5 or 6, depending on + which version you need. + +2. Install dependencies + ``` + brew install --only-dependencies ignition-rendering<#> + ``` + Be sure to replace `<#>` with a number value, such as 5 or 6, depending on + which version you need. + +3. Configure and build + ``` + cd ign-rendering + mkdir build + cd build + cmake .. + make + ``` + +4. Optionally, install + ``` + sudo make install + ``` + # Documentation API documentation can be generated using Doxygen @@ -226,4 +274,3 @@ To run tests specific to a render engine, set the `RENDER_ENGINE_VALUES` environ ``` RENDER_ENGINE_VALUES=ogre2 make test ``` - From c9e76e988768829f923a944b31c1739e65e0a5dc Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Thu, 7 Oct 2021 03:02:28 -0300 Subject: [PATCH 8/9] Fix heightmap crash if only shadow casting spotlights are one scene (#451) Fixes ignitionrobotics/ign-rendering#439 Signed-off-by: Matias N. Goldberg Co-authored-by: Ian Chen --- .../GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl | 2 +- .../PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl | 2 +- .../HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl | 2 +- .../PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.metal | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ogre2/src/media/Hlms/Terra/GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl b/ogre2/src/media/Hlms/Terra/GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl index 9162c3617..4f5449b1c 100644 --- a/ogre2/src/media/Hlms/Terra/GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl +++ b/ogre2/src/media/Hlms/Terra/GLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl @@ -34,7 +34,7 @@ outVs.terrainShadow = mix( terraShadowData.x, 1.0, clamp( terraHeightWeight, 0.0, 1.0 ) ); @end -@property( hlms_num_shadow_map_lights ) +@property( hlms_lights_directional ) @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end @else @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end diff --git a/ogre2/src/media/Hlms/Terra/GLSLES/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl b/ogre2/src/media/Hlms/Terra/GLSLES/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl index f0436a884..0a13d01d6 100644 --- a/ogre2/src/media/Hlms/Terra/GLSLES/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl +++ b/ogre2/src/media/Hlms/Terra/GLSLES/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.glsl @@ -28,7 +28,7 @@ outVs.terrainShadow = mix( terraShadowData.x, 1.0, clamp( terraHeightWeight, 0.0, 1.0 ) ); @end -@property( hlms_num_shadow_map_lights ) +@property( hlms_lights_directional ) @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end @end @property( !hlms_num_shadow_map_lights ) @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end diff --git a/ogre2/src/media/Hlms/Terra/HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl b/ogre2/src/media/Hlms/Terra/HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl index 3e26c06e4..b267fa8a0 100644 --- a/ogre2/src/media/Hlms/Terra/HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl +++ b/ogre2/src/media/Hlms/Terra/HLSL/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.hlsl @@ -36,7 +36,7 @@ outVs.terrainShadow = lerp( terraShadowData.x, 1.0, saturate( terraHeightWeight ) ); @end -@property( hlms_num_shadow_map_lights ) +@property( hlms_lights_directional ) @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end @else @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end diff --git a/ogre2/src/media/Hlms/Terra/Metal/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.metal b/ogre2/src/media/Hlms/Terra/Metal/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.metal index 28c99327d..09ff43e5f 100644 --- a/ogre2/src/media/Hlms/Terra/Metal/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.metal +++ b/ogre2/src/media/Hlms/Terra/Metal/PbsTerraShadows/PbsTerraShadows_piece_vs_piece_ps.metal @@ -36,7 +36,7 @@ outVs.terrainShadow = lerp( terraShadowData.x, 1.0, saturate( terraHeightWeight ) ); @end -@property( hlms_num_shadow_map_lights ) +@property( hlms_lights_directional ) @piece( custom_ps_preLights )fShadow *= inPs.terrainShadow;@end @else @piece( custom_ps_preLights )float fShadow = inPs.terrainShadow;@end From 50e1e5fa936176a570b6b4cccbbe081334af6057 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 7 Oct 2021 00:16:53 -0700 Subject: [PATCH 9/9] run ogre2 particles by default (#430) Signed-off-by: Ian Chen --- examples/particles_demo/Main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/particles_demo/Main.cc b/examples/particles_demo/Main.cc index 049bc736c..0652ccbb1 100644 --- a/examples/particles_demo/Main.cc +++ b/examples/particles_demo/Main.cc @@ -161,7 +161,7 @@ int main(int _argc, char** _argv) // Expose engine name to command line because we can't instantiate both // ogre and ogre2 at the same time - std::string ogreEngineName("ogre"); + std::string ogreEngineName("ogre2"); if (_argc > 1) { ogreEngineName = _argv[1];