-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Transparent model does not render on some machines #26167
Comments
Notable material properties:
A non-zero IOR is probably intended here, perhaps between 1.0 and 1.33. Based on the MeshPhysicalMaterial documentation, I'm not sure if three.js supports |
What is ior = 0 supposed to mean? With refractive indices it's common to work with ratios between the external and inner medium light is being transmitted through. So you'll have to do things like 1 / ior in some cases - such as here:
I wouldn't be surprised if this gives undefined or inconsistent results. I do see in the spec that the valid value ranges are >= 1.0 or 0 explicitly. It's possible our shader needs a special case to handle a 0 ior - though it's not immediately clear to me from the spec what the behavior is supposed to be. |
From the spec —
The Fresnel term also evaluates to 1 for very large IOR values. However, |
Those specs are quite obfuscated (I don't want to say bad designed). |
@elalish Do you know the reasoning behind that 0? |
I re-exported the model with an IOR of 1 and verified that it renders on one of the machines where it was previously not rendering. |
That's because ThreeJS does not support |
That glTF allows |
FWIW
It also says,
|
The implication above is that ior=0 or ior=Infinity can be used to losslessly convert from the spec/gloss PBR workflow (KHR_materials_pbrSpecularGlossiness) to a standard metal/rough PBR workflow. The conversion tools recommended in #24950 assign ior=1000. Longer discussion in KhronosGroup/glTF#1719 (comment). None of those concerns appear relevant to transmissive transparency, however. |
As a test, I've modified the TransmissionRoughnessTest sample to include ior=0 and ior=1000. The last row, unlabeled, is opaque with default IOR.
If we don't want to support ior=0 as an input to MeshPhysicalMaterial (which is fine with me), then perhaps we should just have GLTFLoader map ior=0 to ior=[large value] instead. The effect is the same. |
Description
I have a GLB of some transparent cloud shapes. On some computers (Intel macbook), they render fine:
On other devices (Macbook w/ M2 chip, debian laptop, 10th gen ipad), they do not seem to render at all:
Reproduction steps
Code
N/A
Live example
See steps above
Screenshots
No response
Version
r151
Device
Desktop, Mobile
Browser
Chrome, Safari
OS
MacOS, Linux, iOS
The text was updated successfully, but these errors were encountered: