英文:
How do we create an Object as source of light in React Three Fiber?
问题
使用定向/点光会生成来自对象外部而不是内部的光。
示例:太阳应该是周围物体的光源。
请查看以下图像以了解问题陈述:
我试图在React-Three-Fiber中将太阳对象作为光源。
英文:
Using directional/ point light will generate light from outside but not from inside the Object.
Example: Sun should be the source of light to the Objects around.
Please find the images below to understand the problem statement
Directional Light Example
Point Light Example
I'm trying to make the Sun object as the source of light in React-Three-Fiber
答案1
得分: 2
如果您使太阳网格不与阴影交互,PointLight
将穿透它的光照,即使放置在中心位置。
sun.castShadow = false;
sun.receiveShadow = false;
英文:
If you make the sun mesh not interact with shadows, the PointLight
will illuminate right through it, even when placed in the center.
sun.castShadow = false;
sun.receiveShadow = false;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论