-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Solved issue] Black objects and/or material when using aframe box or 3D files #494
Comments
If this is solved, we should probably close the issue. But perhaps let's first add to FAQ/README about this issue? |
@andreyrd Yeah. I can create a FAQ about this issue. |
@commentatorboy @andreyrd I also encountered this issue with a Wiko View device, can't see the colours of simple meshes, adding |
@kalwalt Yeah. Unfortunately I do not have time right now to do it. I am trying to find a job. |
@commentatorboy Good luck for the job research! i will look if i have time for this FAQ.... |
A related issue is here:
#325
The problem
Multiple problems. When adding an a-frame object (like a-box) or using gltf, obj, or similar 3D filetypes the objects become black.
This occurs only on some smartphones like my moto e5.
In depth about the problem
Kind of hard to reproduce the problem since it only occurs on some smartphones.
The problem is related to rendering and how three.js handles it.
More about the issue here: mrdoob/three.js#14137
A demonstration for the problem:
mrdoob/three.js#14137 (comment)
People have also this issue with it in aframe.
Here is a related issue: aframevr/aframe#3523
The solution
The solution is using another precision renderer as described below:
https://aframe.io/docs/0.9.0/components/renderer.html#precision
Go to this website to see it working:
https://www.internet-guiden.dk/nomarker
Here is the source code:
https://jsfiddle.net/gwo2y4dn/
Notice
Make sure that when using a-box set the following property:
material='color: green';
. (green is just an example).Make sure that you color 3D object in blender or similar software. If you just created a 3d cube object in blender and then export it, the 3D object will not show colors.
Results/Examples
These are some examples of when it does not work and when you apply the precision to lowp or mediump. Please refer to the images below.
Any feedback and/or question is appreciated.
The text was updated successfully, but these errors were encountered: