草庐IT

SCNLight

全部标签

ARKIT在相机所在的位置提出了一个scnlight点?

所以我可以访问sceneView.pointOfView而且我想让AR体验感觉就像我在我指向的物体前面闪闪发光的闪光灯闪闪发光。我试图创造出这样的聚光灯:letspotLight=SCNLight()spotLight.type=.spotspotLight.spotInnerAngle=60spotLight.spotOuterAngle=60letspotNode=SCNNode()spotNode.light=spotLightspotNode.position=position然后,我认为将灯添加到PointOfifiew节点会使它变成它,以便使用相机移动,这意味着它总是会向前照射光线

iOS 10 : SCNLight of type Omni ignoring attenuation values?

我有一个简单的SceneKit场景,只有两个光源(环境光源和全向光源)和一个模型。我注意到,在iOS10上运行时,我的场景显得完全黑暗(甚至在我使用iOS10SDK重新编译我的应用程序之前)。经过调查,我意识到我的环境光是影响我的模型的唯一因素。让我的全光影响我的模型的唯一方法是让它非常接近它,或者增加它的强度(使用新的setIntensity:选择器)5000000.改变attenuationStartDistance、attenuationEndDistance和attenuationFalloffExponent的值并没有改变结果,这真的很奇怪,考虑到如果我对两个距离都使用0.0

ios - 在 SceneKit 中,SCNLightTypeAmbient 类型的 SCNLight 是否会忽略 categoryBitMask 参数?

好像是!这里忽略了categoryBitMask:ambientLight=[SCNLightlight];ambientLight.color=[UIColorcolorWithRed:0.994green:0.715blue:0.179alpha:1.000];ambientLight.type=SCNLightTypeAmbient;ambientLight.categoryBitMask=1;这里有效!ambientLight=[SCNLightlight];ambientLight.color=[UIColorcolorWithRed:0.994green:0.715blue

ios - ARKit 使 SCNLight 指向相机正在看的地方?

因此,我可以访问sceneView.pointOfView,并且我想让AR体验感觉就像我在我正前方用手电筒照亮我所看到的物体,当我指向它时,它会变亮在他们身上。我试着像这样创建一个聚光灯:letspotLight=SCNLight()spotLight.type=.spotspotLight.spotInnerAngle=60spotLight.spotOuterAngle=60letspotNode=SCNNode()spotNode.light=spotLightspotNode.position=position然后我认为将灯光添加到pointOfView节点将使灯光随相机移动,

ios - 使用 SCNAction 移动 SCNLight

我有一个聚光灯,用下面的代码创建,在我所有的节点上转换阴影:spotLight.type=SCNLightTypeSpotspotLight.spotInnerAngle=50.0spotLight.spotOuterAngle=150.0spotLight.castsShadow=truespotLight.shadowMode=SCNShadowMode.DeferredspotlightNode.light=spotLightspotlightNode.eulerAngles=SCNVector3(x:GLKMathDegreesToRadians(-90),y:0,z:0)sp

ios - 在所有节点 SCNLight 上转换阴影

我正在尝试从场景的左侧转换一个短的暗影。我的灯光设置如下:funcsetupLights(){//CreateshadowletspotLight=SCNLight()spotLight.type=SCNLightTypeSpotspotLight.spotInnerAngle=30.0spotLight.spotOuterAngle=80.0spotLight.castsShadow=trueletspotLightNode=SCNNode()spotLightNode.light=spotLightspotLightNode.position=SCNVector3(1.5,1.5,