LoginSignup
1
3

More than 5 years have passed since last update.

SceneKitのSCNMaterialのpropertyを動的に変えて確認してみる

Last updated at Posted at 2018-12-24

AppEngineというブログで、materialについて詳しく解説されていてとても分かりやすいです。

ですが、実際にどこをどう変えたら、どういう見た目になるのか、よくイメージできなかったので、サンプルを作ってみました。

作ったもの

Lightning Model調整 Material Property調整 Intesity調整

https://github.com/kboy-silvergym/ARKit-Emperor のMaterial

それぞれ紹介していきます。

Lightning Model調整

ライティングモデルを変更すると、光の処理の仕方が変わるので、反射の様子などが変わります。

種類は、

  • Constant
  • Lambert
  • Blinn
  • Phong
  • Physically Based

があります。

Material Property調整

物体の質感を変更するためのPropertyが色々あります。

  • Diffuse
  • Specular(Constant以外にある)
  • Normal(ConstantとLambert以外にある)
  • Reflective
  • Transparent
  • AmbientOcclusion
  • SelfIllumination
  • Emission
  • Multiply
  • Ambient
  • Displacement
  • Metalness(Physically Basedだけある)
  • Roughness(Physically Basedだけある)

Intesity調整

それぞれのPropertyの強度を0~1で調節できます。ただし、NormalとEmissionには強度の概念はないようなので、変更しても何も変わりません。

まとめ

  • 色を変えるためのpropertyはdiffuseだけじゃない
  • Lightning Model, Material Property, Intensityなどを調整して質感が変えられる
1
3
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
1
3