Open marc-wittwer opened 2 years ago
When I built the GARDEN version from source the flickering did disappear on the ogre version. However, the black screen remained when I used the ogre2 configuration.
ign gazebo lights.sdf -v 3 --render-engine ogre
Hi @marc-wittwer, I suspect this is similar to https://github.com/gazebosim/gz-sim/issues/1116.
It has to do with the level of OpenGL support offered by the hypervisor running the VM (rather than what Ubuntu tells you it has when running glxinfo or similar). You can switch to software rendering (v. slow), and for ogre (1) there are some MESA settings you can adjust to remove the flickering, and it's a bit of trial and error depending upon your machine / OS etc.
@srmainwaring Thanks for your reply.
This might be worth a try.
I had a similar problem and I got it solved after disabling Anti-Aliasing, as suggested on https://github.com/gazebosim/gz-sim/issues/1116#issuecomment-1142388038
Disabling accelereted 3D graphics in the VMWare settings, solved the flickering.
I still have to run the ign gazebo
with the --render-engine ogre
argument.
ign gazebo lights.sdf -v 4 --render-engine ogre
According to your output VMWare supports GL 4.1
Although Ogre2 only requires OGL >= 3.3 we do depend on a couple of extensions that were introduced later on and backported to those drivers.
does ...
# Required
glxinfo | grep GL_ARB_shading_language_420pack
glxinfo | grep GL_ARB_texture_storage
# Optional but really good to have
glxinfo | grep GL_ARB_buffer_storage
glxinfo | grep GL_ARB_texture_buffer_range
glxinfo | grep GL_ARB_base_instance
# misc, just in case. In fact it may be better if this one returns nothing
glxinfo | grep GL_ARB_multi_draw_indirect
get hits in all of them for the required ones? And what does the rest get?
If the required are not supported, the VMWare can't run ogre2 with acceleration (use LIBGL_ALWAYS_SOFTWARE
environment variable to use SW emulation, though it's slow).
If the optional have some missing functions, it is possible you hit a bug; since we don't often hit those paths.
Appreciate this issue had been inactive for a while but as it's still open, and gz-harmonic has been released for Ubuntu 24.04, here is an update on rendering in VM.
Host System: macOS Sonoma 14.4.1, arm64 VM: Parallels Desktop 19.3.1 VM System: Ubuntu 24.04, arm64
ogre
is working.ogre2
is not working.The required extensions listed above are present:
# Required
glxinfo | grep GL_ARB_shading_language_420pack
glxinfo | grep GL_ARB_texture_storage
The optional extensions are not:
glxinfo | grep GL_ARB_buffer_storage
glxinfo | grep GL_ARB_texture_buffer_range
glxinfo | grep GL_ARB_base_instance
There are some errors in the Hlms/Common/GLSL/CrossPlatformSettings_piece_all.glsl
script concerning the handling of texelFetch
. Any use of texelFetch
should be aliased to bufferFetch
as there are fallback definitions for this when GL_ARB_texture_buffer_range
, however not all cases are aliased. This causes a script compilation error.
```bash
$ simple_demo ogre2
terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): OGRE EXCEPTION(3:RenderingAPIException): Fragment Program 100000003PixelShader_ps failed to compile. See compile log above for details. in GLSLShader::compile at ./RenderSystems/GL3Plus/src/GLSL/OgreGLSLShader.cpp (line 361)
Aborted (core dumped)
Once this is fixed, running the gz-rendering/examples/simple_demo
with the ogre2
stops crashing, but there is no scene rendered (black screen).
Similarly running the gz-sim
GUI will render a black screen with the command:
QT_QPA_PLATFORM=xcb gz sim -v4 -g --render-engine ogre2 --render-engine-gui-api-backend opengl
I can confirm that ogre
works, but ogre2
does not, failing with the fragment shader compilation failure exception.
Environment
OS Version: Ubuntu 20.04 in VM (Host-Machine is running Windows)
Binary build: Ignition Gazebo, version 6.9.0
If this is a GUI or sensor rendering bug, describe your GPU and rendering system. Otherwise delete this section.
Rendering system info:
On Linux, provide the outputs of the following commands:
dxdiag
and report the GPU-related information.system_profiler SPDisplaysDataType
. Copy the output here.~/.ignition/rendering
Description
Steps to reproduce
ign gazebo -v 4 lights.sdf
Output
Black scene window using ogre2:![image](https://user-images.githubusercontent.com/71826111/168766770-e1a43e4d-e5ac-4771-92f9-ad6aa278061f.png)
ign gazebo -v 4 lights.sdf --render-engine ogre2
Flickering scene window using ogre:![image](https://user-images.githubusercontent.com/71826111/168766866-b86b0a48-e80c-4d9f-b62c-033db01fd0fc.png)
ign gazebo -v 3 lights.sdf --render-engine ogre