まだ検証中なのだけど、ShadedMaterialをMaterialsListで個別の面に割り当てるとエラーになる。
“all”の場合は問題ない。なんだ?(ちなみに元マテリアルはMovieAssetMaterial)
>とりあえず他のshaderをはずして、他のマテリアルで検証。
簡単なところでBitmapFileMaterialあたりから。
まだ検証中なのだけど、ShadedMaterialをMaterialsListで個別の面に割り当てるとエラーになる。
“all”の場合は問題ない。なんだ?(ちなみに元マテリアルはMovieAssetMaterial)
>とりあえず他のshaderをはずして、他のマテリアルで検証。
簡単なところでBitmapFileMaterialあたりから。
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
Google reCAPTCHA helps protect websites from spam and abuse by verifying user interactions through challenges.
Google Tag Manager simplifies the management of marketing tags on your website without code changes.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
Marketing cookies are used to follow visitors to websites. The intention is to show ads that are relevant and engaging to the individual user.
A video-sharing platform for users to upload, view, and share videos across various genres and topics.
Service URL: www.youtube.com (opens in a new window)
You can find more information in our Cookie Policy and Privacy policy.
「ShadedMaterialメモ」への8件の返信
var materials:MaterialsList = new MaterialsList();
materials.addMaterial(new BitmapFileMaterial( “../left.png” ), ‘left’);
materials.addMaterial(new BitmapFileMaterial( “../front.png” ), ‘front’);
materials.addMaterial(new BitmapFileMaterial( “../top.png” ), ‘top’);
materials.addMaterial(new BitmapFileMaterial( “../bottom.png” ), ‘bottom’);
materials.addMaterial(new BitmapFileMaterial( “../back.png” ), ‘back’);
materials.addMaterial(new BitmapFileMaterial( “../right.png” ), ‘right’);
logo = new Cube( materials, len, len, len, seg, seg, seg);
これは問題なし。
materials.addMaterial(new BitmapMaterial( new front(0, 0) ), ‘left’);
materials.addMaterial(new BitmapMaterial( new left(0, 0) ), ‘front’);
materials.addMaterial(new BitmapMaterial( new top(0, 0) ), ‘top’);
materials.addMaterial(new BitmapMaterial( new bottom(0, 0) ), ‘bottom’);
materials.addMaterial(new BitmapMaterial( new back(0, 0) ), ‘back’);
materials.addMaterial(new BitmapMaterial( new right(0, 0) ), ‘right’);
これもOK-.
var _shader:FlatShader = new FlatShader( light, LIGHT_COLOR, AMBIENT_COLOR );
var mat_front: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new front(0, 0) ), _shader, 1.2);
var mat_back: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new back(0, 0) ), _shader, 1.2);
var mat_right: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new right(0, 0) ), _shader, 1.2);
var mat_left: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new left(0, 0) ), _shader, 1.2);
var mat_top: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new top(0, 0) ), _shader, 1.2);
var mat_bottom: ShadedMaterial = new ShadedMaterial( new BitmapMaterial( new bottom(0, 0) ), _shader, 1.2);
var materials:MaterialsList = new MaterialsList();
materials.addMaterial(mat_front, “all”);
これもOK.
materials.addMaterial(mat_front, “all”);
materials.addMaterial(mat_front, “back”);
これもOK.
materials.addMaterial(mat_front, “all”);
materials.addMaterial(mat_back, “back”);
これNG.
どーもShadedMaterialにすると各面に異なるマテリアルを貼り付けられないのか?(昔のPV3Dの仕様?)
それともなんか設定が間違っているのか・・・?
ちょっと同じような現象で悩んでいるときに、
ネットで検索して記事読ませていただきました。
異なるマテリアル、こちらでもやっぱりだめでした・・・。
すいません、私も未だ解決策を見出せておりませぬ・・・。