Sceneekit–来自相机节点的UV投影
我正在尝试将360图像从相机投射到网格喜欢这个。
如果有人知道如何做到这一点,将会有所帮助。
I am trying to project 360 image from camera to mesh like this.
If anyone has idea on how to do this will be helpful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
与Unity,Autodesk Maya或Foundry Nuke不同,在Scenekit中,相机不能成为投影仪。即使可以将SCNCAMERA用作360个项目,它也需要每台摄像机的6个摄像机的钻机 square https://stackoverflow.com/questions/50769722/50769722/how-to-use-environment-map-in-arkit/50772728#50772728"> like this ),不是矩形的远剪辑平面,就像您一样使用。
解决方案1 - GOBO
创建一个360个项目,使用 6个点灯 (带有 North-south-West-west-west-up-ind-down 方向)带有
Gobo
效果。 Gobo据说是“在光学之间”的首字母缩写词。这是一个单点的示例代码(将每个点作为孩子节点添加到相机中)。
另外,还有三个有用的属性可以控制光的衰减:
解决方案2
有时,您需要程序氛围和环境照明带有立方图像图。
解决方案3
要从头开始生成球形,立方或圆柱形投影,请使用苹果金属。
Unlike Unity, Autodesk Maya or The Foundry NUKE, in SceneKit a camera cannot be a projector. Even if the SCNCamera could be used as a 360-projector, it would require a rig of 6 cameras with a square far clipping plane for each camera (like this), not a rectangular far clipping plane, like you're using.
Solution 1 – Gobo
To create a 360-projector, use 6 spot lights (with north-south-east-west-up-down directions) with
gobo
effect. Gobo is supposedly an acronym for "goes between optics".Here's a sample code for a single spot (add each spot as a child node to your camera).
Also, there are three useful properties to control light's attenuation:
Solution 2
Sometimes, you need a Procedural Ambience and an Environmental Lighting with a cubic image map.
Solution 3
To generate a spherical, cubic or cylindrical projection from scratch, use Apple Metal.