Skip to content
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

Configure Background of model (transparency?) #53

Open
marcoscaceres opened this issue Aug 16, 2022 · 4 comments
Open

Configure Background of model (transparency?) #53

marcoscaceres opened this issue Aug 16, 2022 · 4 comments

Comments

@marcoscaceres
Copy link
Contributor

Need to investigate setting the background color (or transparency) of model. Can the formats specify the background color (without using geometry)? Would it use a CSS background color?

@donmccurdy
Copy link
Contributor

donmccurdy commented Aug 19, 2022

I'm not aware that any 3D file formats specify background colors (other than the inverted geometry trick) to be used in a 2D viewport environment. Being able to specify a color or even a texture background on the model element sounds helpful. I am assuming that the color or image background would be visible through any semi-transparent areas of the model, ideally including refraction and physically-based transmission. I would not necessarily require or expect the 3D geometry to refract DOM content behind the element. For example, see the bottom of the page here: https://www.donmccurdy.com/2021/11/11/writing-volumetric-refraction-gltf/

@DR-xR
Copy link

DR-xR commented Aug 23, 2022

If a CSS background is available but not processed in the scene, you could end up with a situation similar to the one illustrated here for : google/model-viewer#3627

@hybridherbst
Copy link

hybridherbst commented Feb 4, 2024

I'd like to bump this issue; currently, <model> implementations (Safari, visionOS) always render with a white background, which in most cases does not fit the design requirements of a website.

Additionally, it seems to be not defined how <model> reacts to compositing; my expectation would be that the same things that work with videos (e.g. layering other elements on top of it; round corners; borders) work with <model> as well (but they currently don't). I understand this might be a bug in Apple's implementation, but the spec leaves compositing behaviour open.

Screenshot 2024-02-04 at 01 21 36

Current behaviour of the model element (top) inside a div with blue rounded borders and overflow:hidden. video element (bottom) for comparison.

@zachernuk
Copy link
Collaborator

/tpac to discuss whether people would desire a transparent background (which could be useful, but will also be weird)

@probot-label probot-label bot added the TPAC For discussion at TPAC label Sep 24, 2024
@zachernuk zachernuk changed the title Background color of model Configure Background of model (transparency?) Sep 24, 2024
@Yonet Yonet removed the TPAC For discussion at TPAC label Sep 24, 2024
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

No branches or pull requests

6 participants