Lumberyardの新バージョン1.18をインストールしました。
前回/前々回同様にMicrosoft Visual C++ 2017 Redistributable (x64)をアンインストールしてからインストールしましたが、今回は起動で引っ掛かったので、HDDのLumberyardの各バージョンを全てアンインストールしてから再度インストールしました。
リリースノートによるとフィジックスとしてNVIDIA PhysXが使える様になったのですが、使用には"Visual Studio 2017 version 15.5.1 or later"が必要との事です。残念ながら私は持っていないので使えません… Project Configuratorでの表記はPhysX [PREVIEW]となっているので、正式リリースを待つ事にします。
Monday, March 25, 2019
Tuesday, March 5, 2019
Sunday, January 27, 2019
Amazon Lumberyard学習メモ:天候を変える
今回は天候を変える方法です。
他のアイテムと同じく、天候はEntityに天候のComponentを追加して作ります。
こちらの地形で実験してみます。

まずEntityを一つ新規作成し、それにAdd ComponentでRainコンポーネントを追加します。

これで雨のエンティティが出来ました。

ですがビュー上ではまだ雨が表示されていません。雨を表示するにはAI/Physicsボタン(下図参照)をクリックします。(あるいはいつも通りPlay Gameでゲームに入っても表示されます。)

雨が表示されました。地面には水たまりが出来、雨の波紋が表示されます。

元に戻る場合はもう一度AI/Physicsボタンをクリックします。
空が晴れたままに見えるので、曇りにしてみます。
Tools - Other - Time Of Dayを実行します。

Time Of Dayが表示されます。矢印の辺りのパラメータを変更して空の見た目を調整します。

曇り空になりました。
(説明は省略しますが海もパラメータを調整しています。)

今度は雪を降らせます。
雨のエンティティからRainコンポーネントを削除し、代わりにSnowコンポーネントを追加します。

雪が降り、エンティティが配置してある付近に雪が積もりました。

雪が積もっている範囲を拡大してみます。
SnowコンポーネントのRadiusの値を大きくします。

雪が積もっている範囲が広くなりました。

ちなみに、複数個の雪エンティティを使って複数箇所に積雪させる事は出来ない様です。
Snowコンポーネントの他のパラメータを調整してみます。

降っている雪の量を多めに、積雪を少なめにしてみました。

海の下には影響が出ず、波打ち際には凍結が表示されます。

(ただし前回実験したRiverの場合はこの様にはならず、水面下にも積雪します。)
他のアイテムと同じく、天候はEntityに天候のComponentを追加して作ります。
こちらの地形で実験してみます。

まずEntityを一つ新規作成し、それにAdd ComponentでRainコンポーネントを追加します。

これで雨のエンティティが出来ました。

ですがビュー上ではまだ雨が表示されていません。雨を表示するにはAI/Physicsボタン(下図参照)をクリックします。(あるいはいつも通りPlay Gameでゲームに入っても表示されます。)

雨が表示されました。地面には水たまりが出来、雨の波紋が表示されます。

元に戻る場合はもう一度AI/Physicsボタンをクリックします。
空が晴れたままに見えるので、曇りにしてみます。
Tools - Other - Time Of Dayを実行します。

Time Of Dayが表示されます。矢印の辺りのパラメータを変更して空の見た目を調整します。

曇り空になりました。
(説明は省略しますが海もパラメータを調整しています。)

今度は雪を降らせます。
雨のエンティティからRainコンポーネントを削除し、代わりにSnowコンポーネントを追加します。

雪が降り、エンティティが配置してある付近に雪が積もりました。

雪が積もっている範囲を拡大してみます。
SnowコンポーネントのRadiusの値を大きくします。

雪が積もっている範囲が広くなりました。

ちなみに、複数個の雪エンティティを使って複数箇所に積雪させる事は出来ない様です。
Snowコンポーネントの他のパラメータを調整してみます。

降っている雪の量を多めに、積雪を少なめにしてみました。

海の下には影響が出ず、波打ち際には凍結が表示されます。

(ただし前回実験したRiverの場合はこの様にはならず、水面下にも積雪します。)
Saturday, January 26, 2019
Amazon Lumberyard学習メモ:地形に要素を追加する
LumberyardにはTerrainで使える要素が幾つか用意されています。他のアイテムと同様にEntityにComponentを追加して作成します。
まずは川を作ってみましょう。
前々回の手順で作ったこちらの地形で実験してみます。

Entityを一つ作り、Add ComponentでSplineコンポーネントを追加します。

ビューに4個の赤い球体が表示されました。これはスプラインの制御点です。

ビュー右上の「?」アイコンをクリックするとスプライン本体が黄色で表示されます。

制御点(赤い球体)を選択しMoveツールで移動させるとスプラインが変形します。

現在はスプラインが上図の様に直線なので、これを曲線にします。
Entity InspectorでSpline TypeをBezierに変更します。

スプラインが曲線になりました。

制御点を増やして、川っぽいラインにしてみます。
Ctrl+スプラインクリックで制御点を追加、Alt+制御点クリックで制御点を削除出来ます。(編集方法の詳細はユーザーガイドのスプラインの項目をご覧ください。)

次に、このEntityにRiverコンポーネントを追加します。

スプラインに沿って川が生成されました。

スプラインの各制御点を移動させて、川っぽいサイズにします。

川に合わせて地形をへこませてみます。
Entity InspectorのRiverのDepth of the river bedを1.0にし、Carve River Bedをクリックします。

地形がへこみました。

アップにするとこんな感じです。

DensityとColorを調整して、やや濁らせてみました。

これで川の完成です。
続いて、道を作ってみます。
新規にEntityを作り、川の時と同じ手順でスプラインを作成します。

EntityにRoadコンポーネントを追加します。

道になりました。

道のマテリアルを変更します。
Entity InspectorでRoad materialの横の「...」アイコンをクリックします。

リストから、StarterGame/Materials/Natural/Road/の下にあるam_road_dust_rocks.mtlを選びます。

道のマテリアルが変更されました。

ところで、この道はスプラインの高度に関わらず地形上に表示されます。つまり、スプラインが空中に浮いていても地中に埋まっていても関係なく地面に道が投影表示されます。実際、上図のスプラインは一部が地面にめりこみ気味になっています。
ここで、逆に地形をスプラインの高さに合わせてみる事にします。
スプラインを地面の下になる様に移動させてから、Entity InspectorでAlign heightmapをクリックします。

地形がスプラインの位置にあわせてへこみました。

もしスプラインが空中にある場合は、逆に地形が盛り上がります。
これで完成でも良いのですが、せっかくなので道のテクスチャーをオリジナルの物に変更してみました。マテリアルは先ほどのam_road_dust_rocks.mtlをコピーして使っています。テクスチャーは32-bitのTGA、サイズは2048*2048、道の両側の透明度はアルファチャンネルで設定しています。テクスチャーサイズが元のマテリアルの物より小さくなったので、マテリアル上でのテクスチャーのタイリング設定をU方向(道の進行方向)に2に変更しています。

ゲーム中だとこんな感じです。

最後に海を作ってみます。
Lumberyardの昔のバージョンではレベルに最初から海が存在していたのですが、現在は他と同様にEntityにComponentを追加して作る様になっています。
新規にEntityを作成し、Infinite Oceanコンポーネントを追加します。

海が生成されます。谷の様な地形に配置してみました。

Entityの高さを変えると水面の高さも変わります。

パラメータとライティングを調整してみました。
まずは川を作ってみましょう。
前々回の手順で作ったこちらの地形で実験してみます。

Entityを一つ作り、Add ComponentでSplineコンポーネントを追加します。

ビューに4個の赤い球体が表示されました。これはスプラインの制御点です。

ビュー右上の「?」アイコンをクリックするとスプライン本体が黄色で表示されます。

制御点(赤い球体)を選択しMoveツールで移動させるとスプラインが変形します。

現在はスプラインが上図の様に直線なので、これを曲線にします。
Entity InspectorでSpline TypeをBezierに変更します。

スプラインが曲線になりました。

制御点を増やして、川っぽいラインにしてみます。
Ctrl+スプラインクリックで制御点を追加、Alt+制御点クリックで制御点を削除出来ます。(編集方法の詳細はユーザーガイドのスプラインの項目をご覧ください。)

次に、このEntityにRiverコンポーネントを追加します。

スプラインに沿って川が生成されました。

スプラインの各制御点を移動させて、川っぽいサイズにします。

川に合わせて地形をへこませてみます。
Entity InspectorのRiverのDepth of the river bedを1.0にし、Carve River Bedをクリックします。

地形がへこみました。

アップにするとこんな感じです。

DensityとColorを調整して、やや濁らせてみました。

これで川の完成です。
続いて、道を作ってみます。
新規にEntityを作り、川の時と同じ手順でスプラインを作成します。

EntityにRoadコンポーネントを追加します。

道になりました。

道のマテリアルを変更します。
Entity InspectorでRoad materialの横の「...」アイコンをクリックします。

リストから、StarterGame/Materials/Natural/Road/の下にあるam_road_dust_rocks.mtlを選びます。

道のマテリアルが変更されました。

ところで、この道はスプラインの高度に関わらず地形上に表示されます。つまり、スプラインが空中に浮いていても地中に埋まっていても関係なく地面に道が投影表示されます。実際、上図のスプラインは一部が地面にめりこみ気味になっています。
ここで、逆に地形をスプラインの高さに合わせてみる事にします。
スプラインを地面の下になる様に移動させてから、Entity InspectorでAlign heightmapをクリックします。

地形がスプラインの位置にあわせてへこみました。

もしスプラインが空中にある場合は、逆に地形が盛り上がります。
これで完成でも良いのですが、せっかくなので道のテクスチャーをオリジナルの物に変更してみました。マテリアルは先ほどのam_road_dust_rocks.mtlをコピーして使っています。テクスチャーは32-bitのTGA、サイズは2048*2048、道の両側の透明度はアルファチャンネルで設定しています。テクスチャーサイズが元のマテリアルの物より小さくなったので、マテリアル上でのテクスチャーのタイリング設定をU方向(道の進行方向)に2に変更しています。

ゲーム中だとこんな感じです。

最後に海を作ってみます。
Lumberyardの昔のバージョンではレベルに最初から海が存在していたのですが、現在は他と同様にEntityにComponentを追加して作る様になっています。
新規にEntityを作成し、Infinite Oceanコンポーネントを追加します。

海が生成されます。谷の様な地形に配置してみました。

Entityの高さを変えると水面の高さも変わります。

パラメータとライティングを調整してみました。

Sunday, January 20, 2019
大昔のテクスチャーをMaterializeでPBRテクスチャーにしてみる
ハードディスクの中身を見て回っていたら、十何年か前に作ったテクスチャーファイルが出て来ました。写真素材ではなくPhotoshopやペイントソフトで作ったDiffuseテクスチャーなのですが、これMaterializeを使えばPBR用テクスチャーに出来るんじゃないの?という事で試してみました。
(Materializeは一枚の画像からPBR用の各テクスチャーを作れる高性能なソフトウェアです。前回の記事のテクスチャーもMaterializeで作成しました。)
ブロックの壁:


歩道:


地面:


ドラム缶:


やっぱり写真素材でないと手描きっぽさが出るか…でも用途によっては有りか?
(Materializeは一枚の画像からPBR用の各テクスチャーを作れる高性能なソフトウェアです。前回の記事のテクスチャーもMaterializeで作成しました。)
ブロックの壁:


歩道:


地面:


ドラム缶:


やっぱり写真素材でないと手描きっぽさが出るか…でも用途によっては有りか?
Subscribe to:
Posts (Atom)