0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[ARKit] Occulustion

Posted at

Occulustionとは

手前にある物体が後ろの物体を隠すことをいう。普通のことに思えるが、ARではこれをしっかり考えていないと手前にある物体が後ろの物体を隠さずに不自然にレンダリングされることになってしまう。

Occulustionにするには

下記のOcuulusionMaterialをmodelEntityのMaterialとして設定する。

スクリーンショット 2022-05-04 17.47.11.png

下記コード

let model = ModelEntity(mesh: .generateBox(size: 1.0))
let material = OcculusionMaterial()
model.material = material 

これでOcculusionMaterialを設定したモデルはOcculusionが有効になる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?