No More Retake

3DCG屋さん向けTips&Referenceサイト

メニュー

Maya:環境マップの張り方と『mib_lookup_shperical』

今回は、マテリアルの基本「環境マップの張り方」です。
サンプルとして、以前mia_materialのところで使ったシーンを使いました。

まずMentalrayで環境マップを使用する時は、
環境マップをShadingEngineのEnvironmentShaderに繋ぐ、↓のようなコネクトになります。

時々、マテリアルのReflectionカラーに環境マップを繋いであるデータを見かけたりしますが、ShadingEngineのEnvironmenShaderに繋ぐのが正解。
ShadingEngineについてはAREA Japanの説明が分かりやすいのでここでは割愛します。

12_env_03テクスチャはそのまま使用するのではなく、一度”mib_lookup_shperical”ノードや”mib_lookup_cube”ノードなど環境系のノードを介してマップの張り方を定義してあげる必要があります。
12_env_04
環境マップを貼るのに主に使用するのは、↑の赤で囲んだノードあたり。
それぞれのノードの違いは環境マップの張り方です。
四角か円柱か球か。
これら環境系のマップはマテリアル以外にもカメラやなんかに繋いで使用することもあります。
全部のノードの説明は大変ですが、、
一番よく使うであろう”mib_lookup_spherical”ノードだけでも確認してみます。

 

 mib_lookup_shperical

テクスチャと接続すると、そのテクスチャがシーンを囲む無限球体にラップされている感じになる。
12_env_05

Direction

サンプリング方向。難しいのでパス。あまり使わないと思って良いのでは。
“mib_texture_vector”とか、”mib_texture_remap”とかコネクトします。このあたりもいずれ機会があれば。

Rotate

環境マップを回転させることができる。単位はRadian(弧度法)
通常の度(degree)で使用したい場合は変換が必要。
degreeとRadianの変換式は次の通り。

d = r * 180 / Math.PI r = d * Math.PI / 180

Texture

環境マップとして使用したいテクスチャをコネクトする。
“mib_lookup_spherical”ノードについてはこのくらいで。

環境マップについてもう一つ。
カメラベースで環境マップを貼る方法もあります。
カメラのShapeノードにある”EnvironmentShader”。
ここに環境マップをコネクトしても環境マップが適応されます。
この方法の場合、カメラから見えるオブジェクトすべてに環境マップが適応されます。
逆に言えば、別のカメラから見た場合はその環境マップは適応されません。

12_env_07


以上、環境マップについてでした。

Mayaは2012の英語版を使用しています。
最新のバージョンとは異なる可能性がありますのであしからず。

関連記事

  1. 2018.04.09

    Houdiniの本!!

コメントをお待ちしております

このサイトについて

3DCG Tipsサイト。Houdiniの記事が多めです。

RSS

follow us in feedly

Archives

  • 2024 (1)
  • 2023 (2)
  • 2022 (9)
  • 2021 (14)
  • 2020 (46)
  • 2019 (17)
  • 2018 (33)
  • 2017 (29)
  • 2016 (36)
  • 2015 (64)
  • 2014 (54)
  • 2013 (60)
  • 2012 (55)

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

スポンサードリンク

言語切り替え

  • English (United States)
  • 日本語

Houdiniを使えるようになる本


Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.facebook.com/restserver.php?method=links.getStats&urls=http%3A%2F%2Fnomoreretake.net%2F2013%2F02%2F12%2Fmayaenv_mib_lookup_shperical%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(): Failed to enable crypto in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132

Warning: file_get_contents(http://api.b.st-hatena.com/entry.count?url=http%3A%2F%2Fnomoreretake.net%2F2013%2F02%2F12%2Fmayaenv_mib_lookup_shperical%2F): failed to open stream: operation failed in /usr/home/nomorere/nomoreretake.net/wordpress/wp-content/themes/n1-custom/functions/social.php on line 132