When I add Dome Light from the code, on windows build I see no difference. On macOS build I suddenly see a dome spherical background (see below). Is there a difference between windows and macOS in this area? Or am I missing something?
Hi,
Has the texture applied been set by you ? As I recall to work properly the domelight always needs to have a texture applied, maybe that is for Windows only, nbot sure.
Regards,
David
I haven’t added any textures to the dome light, but as you can see in the screenshot, on macos there’s some texture - no idea where it’s coming from. Perhaps it’s a default env texture in the USD?
On windows the same code doesn’t do anything (no texture and no difference in the render).
I would say the texture comes from someone’s vacation
But more seriously, try to add a texture with GlfSimpleLight::SetDomeLightTextureFile to see if it makes a difference on Windows, I think it should.
Regards,
David
Yes, I can load a file on both macOS and Windows and see the effect of it on the model, but the difference is that on macOS the dome “sphere” is rendered in the background and on Windows it isn’t.
This is probably not it, but make sure that this checkbox is set (see attached image). Usdview store its settings on close, so might be that you just have during your testing accidentaly disabled that checkbox on windows?
Yes, this is my impression that there’s a different default for the OpenGL/Windows and Metal/macOS. Just looking for a way to change that default, which is not so obvious…
I’m only building on macOS so I cannot test its impact on Windows but I am able to toggle display of the dome light texture using the following snippet of code when rendering with Storm. This is with v24.08.
One thing that gives me pause though is that the associated group of UsdImagingGLEngine functions (GetRendererSettingsList(), GetRendererSetting(), SetRendererSetting()) has a comment in the header describing them as legacy. I’ve also observed that this setting has no effect when rendering with Intel’s OSPRay via their Hydra delegate. However, I’m not sure if that’s just a limitation of their implementation or if it’s because there is a different, non-legacy setting that hdOSPRay is using instead.
@denglesson, thank you for pointing out the self._renderParams.domeLightCameraVisibility = self._dataModel.viewSettings.domeLightTexturesVisible statement in usdviewq/stageView.py. I had not found that when searching around before.
But a weird thing about self._renderParams.domeLightCameraVisibility is that I cannot find a corresponding C++ class member in UsdImagingGLRenderParams. And I’m not familiar enough with the Python to C++ bindings to know if it could be handled specially somewhere.
That’s unfortunate that this is not working on Windows. I wonder if it functions properly with OpenGL on Linux (not a platform I can test myself right now unfortunately).
I’ve also noticed that this setting does not appear to have any effect in Intel’s hdOSPRay render delegate (only tested macOS). I assume that is unrelated to these issues with Storm though.