The object gets rendered on the screen with the correct shape, but is completely black. #566
Replies: 4 comments 2 replies
-
you need light for materials to show. |
Beta Was this translation helpful? Give feedback.
-
another thing is, you are using useLoader outside of canvas, that cannot work. see: https://github.com/react-spring/react-three-fiber/blob/master/api.md#hooks all hooks are context based, canvas is the context provider. https://codesandbox.io/s/r3f-ibl-envmap-simple-y541h?file=/src/App.js it should be like this: function Logo() {
useLoader(...)
...
...
<Canvas>
<ambientLight />
<pointLight position={[10, 10, 10]} />
<Suspense fallback={null}>
<Logo /> |
Beta Was this translation helpful? Give feedback.
-
I faced the same problem and HERE IS THE SOLUTION
|
Beta Was this translation helpful? Give feedback.
-
add light doesn't solve the problem, what is wrong? |
Beta Was this translation helpful? Give feedback.
-
Hello, for some reason, the object gets rendered completely black, without any details, but the shape is correct. I checked my model in the gltf viewer and it gets rendered fine. Not entirely sure what can be the issue here, but I'm quite new to Three.js, so might be some noob mistake. Help would be greatly appreciated. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions