Hi guys! Does anyone have any ideas about what can be causing such artifacts? I got them once while switching between apps on iOS. I can’t reproduce this but wonder what is broken here.
It looks like this model has alpha blending enabled, when it should be opaque. If you’re using Blender to create the file you’d need to set Alpha Mode to “Opaque”. In three.js that’s similar to:
Set the material to MeshBasicMaterial or MeshLambertMaterial. See if the issue still happens.
Set material.side to Three.FrontSide on every material on the model. It is related to an unending war led by the double-sided materials against mobile devices that has been happening from the dawn of time (and also double-sided materials simply have issues on some phones and render super weird.)
The reason for the ior property is not being default is that I need a transmission blur effect (I reach it using a combination of ior, transmission, and roughness properties) and transmission property is dynamic. So transmission changes from 0 to 0.6. That’s why I use MeshPhysicalMaterial.
But currently, I don’t change transmission yet. So this issue happened when transmission was disabled.
I will try a suggestion with material.side, it sounds promising. Don’t think I will be able to check if that helps because it is hard to reproduce the issue.
Wild guess. If this this transmission (just with more roughness / opaqueness), then there seem to be some resolution issues - I haven’t checked the shader source myself, but it seems like the resolution of the transmission shader isn’t adjusting dynamically when you’re resizing the viewport:
Switching apps in iOS does change their viewport size for a split second - which may cause that transmission shader to render at a very tiny resolution - which then, applied to the model, is rendered as a weird artefact.