■
colorTexture.magFilter = THREE.NearestFilter;
three.jsでtexture、normalMap、roughnessMapを貼ってみた
webpackでexrファイルの読み込みは
file-loaderにexrと記述するだけ
{
use: [
{
loader: 'file-loader',
options: {
outputPath: 'assets/images/',
},
},
],
}
nomalmapを使う時はEXRLoaderを使う
this.exrloader = new EXRLoader();
const geometry = new THREE.SphereGeometry(30, 30, 30);
const texture = new THREE.TextureLoader().load(textures[i], (texture) => {
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1, 1);
});
const nomal = this.exrloader.load(leathernormal, (texture) => {
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set(1, 1);
}
~
const material = new THREE.MeshStandardMaterial({
map: texture,
normalMap: normal,
roughnessMap: rough,
});
gltfで出した時のエラー[THREE.Object3D.add: object not an instance of THREE.Object3D.]
THREE.Object3D.add: object not an instance of THREE.Object3D.
const loader = new GLTFLoader();
loader.load(glbmodel, (gltf) => {
scene.add(gltf);
});
上のコードでエラーが出たので、
調べてみたら
const loader = new GLTFLoader();
let example = new THREE.Object3D();
loader.load(glbmodel, (gltf) => {
example = gltf.scene;
const radian = (i / this.index) * Math.PI * 2;
scene.add(example);
});
この2行を追加するらしい〜
let example = new THREE.Object3D();
example = gltf.scene;
以上。
参考
【Blender初心者】ノードラングラーをmacで動かす方法
【Blender初心者】ノードラングラーをmacで動かす方法
Splineの使い方
はじめまして、@jdfGRm2XW3IBhXU です。
Splineのチュートリアル紹介です。
チュートリアルとして自分が学んだYoutuberの動画を貼っておきます。
EASILY Create Awesome 3D for the Web with Spline!
main
こちらはSplineの開始画面です。
Tab bar
・ユーザー名
・ファイル名(今見ているファイル)
・ファイル名
・新しいファイル作成
・無料プランの人はアップグレード
Tool bar
オブジェクト
・オブジェクトの一覧が表示されます
・プレート
・丸いプレート
・テキスト
・キューブ
・立体のボール
変形
・移動
・スケール
・回転
Side bar
左のサイドバーには、あなたのシーンのレイヤーまたはオブジェクトを示しています。
右のサイドバーには示してプロパティパネルを。各パネルでは、シーン全体または選択したオブジェクトからプロパティを変更できます。