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

R3F doesn't handle transparency correctly. #3487

Open
deen24id opened this issue Mar 7, 2025 · 2 comments
Open

R3F doesn't handle transparency correctly. #3487

deen24id opened this issue Mar 7, 2025 · 2 comments

Comments

@deen24id
Copy link

deen24id commented Mar 7, 2025

I have a 3D model that has transparent vertices. When I use 3D Viewer app in Windows, the model is displayed correctly. As you can see from the image below, the head is transparent with mask on its face:

Image

However, when I try to display it on R3F, the display is kinda broken. As you can see from the image below, many parts are not supposed to be transparent:
Image

Here is a sandbox to reproduce the transparency problem: https://codesandbox.io/p/sandbox/objloader-forked-74fq8g. I also attached the relavant .obj files in the sandbox, so that you can view it in other apps.

Besides, in another web app: https://www.roblox.com/users/84743203/profile?friendshipSourceType=PlayerSearch, if you take a look at the 3D currently viewing section, they do not experience the same transparency issue.

Let me know how to fix this problem . Cheers!😄

@krispya
Copy link
Member

krispya commented Mar 8, 2025

Hello! I can see the problem clearly, but I don't think it is something we have control over. This looks to do with how the OBJLoader works with transparent materials. It appears to be setting all materials to transparent! You should take this issue over the Three's Github and ask there.

@deen24id
Copy link
Author

deen24id commented Mar 8, 2025

Sure, I made another issue in the threejs repo: mrdoob/three.js#30684.

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

2 participants