Skip to content

Conversation

AlbertoCasasOrtiz
Copy link
Collaborator

I think these changes should be safe to merge into dev-gui too later.

const SkySphere = ({ texturePath }: SkySphereProps) => {
const viewerState = useModelContext().viewerState;
const skyTexture = useLoader(TextureLoader, viewerState.defaultSkyTextures[viewerState.skyTextureIndex]);
const skySphereRef = useRef<Mesh>(null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this handle the case where there's no texture and there's a background color or is that guarded against upstream?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this moment the SkySphere does not have an option to have a background color, only a texture.

I see two options here:

  1. Allowing selecting a plain color forthe skysphere instead of textures, this would be a new option for the skysphere in the tree, compiling all options for background into the same space. In this case, the skysphere will always be visible.
  2. Allowing making the skysphere not visible (basically removing it), and using scene/renderer background color propierties. But I am not sure where this option could live.

I think option 1 would be easier to implement and more clear, as everything related to backgrounds would be located in this class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that option 1 would be easier but I don't know if it will allow us to create images with transparent background. If yes then I'd go for it, if not we'd need two separate options as in 4.5 where scene has a color background that would be used unless a skysphere/skybox is visible.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest commit should take care of it. Now when you select skysphere on the tree, you can select if you want to use a texture of a color, and a selector appears accordingly.

For a transparent background in videos, you can now set the skybox as not visible in the tree. In the viewer this is shown as white, but in the video it will appear black. I am not sure if we want a more specific "transparent video" option for this, or if setting the visibility of the skysphere to not visible is enough.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Alberto, the issue was reported by Carmichael as what the user sees in the app is not what they get. If we add a note somewhere about expected behavior that could do the trick, or possibly disable transparency of background for videos altogether but hard for me to assess how common these are used. Thoughts?

@aymanhab
Copy link
Member

Tested in GUI and merged into it. Merging accordingly. Thanks @AlbertoCasasOrtiz 👍 Will leave open to address leftover discussion.

@aymanhab aymanhab merged commit 0e87201 into dev Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants