-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add ogre2 skybox support #168
Conversation
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
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 @@
## main #168 +/- ##
==========================================
+ Coverage 52.10% 52.52% +0.42%
==========================================
Files 144 143 -1
Lines 13120 13274 +154
==========================================
+ Hits 6836 6972 +136
- Misses 6284 6302 +18
Continue to review full report at Codecov.
|
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.
Works for me! I just have some smaller comments and questions.
ogre2/src/Ogre2DepthCamera.cc
Outdated
if (validBackground) | ||
{ | ||
Ogre::MaterialManager &matManager = Ogre::MaterialManager::getSingleton(); | ||
std::string skyMatName = "SkyBox_" + this->Name(); |
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.
The SkyBox
string is repeated in a few places. How about storing it somewhere as a constant?
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.
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.
Thanks. Does the SkyBox
string in RenderTarget
need to match the one in DepthCamera
? Keeping both in the same place could help future readers understanding how everything fits together, and prevent errors in case one is changed but not the other.
I'll leave it up to you if you think it's worth it.
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.
🌥️
The |
Add new functions in Scene for setting background material (
SetBackgroundMaterial
) and also enabling skybox (SetSkyEnabled
). TheSetSkyEnabled
function is just a convenient function to set the background material to the default skybox cubemap texture supplied by ign-rendering.Currently only working in ogre2 with regular RGB
Ogre2Camera
. There has been some changes inOgre2DepthCamera
compositor setup in ign-rendering2 that has not merged intomain
yet so I'm planning to merge the changes forward first before updatingOgre2DepthCamera
to support skybox, e.g. so that it's also visible in an ign-sensors'RgbdCameraSensor
see screenshot from
ogre2_demo