Hi, I’m new to programming and need help rendering from a camera into a glTF file exported from Blender. I would appreciate any help.
Hi @Yohigo
To get started you need to know at least javascript … and also to continue.
The more you know javascript the better.
In order to have a correct gltf export from Blender I suggest blender official documentation
https://docs.blender.org/manual/en/2.80/addons/io_scene_gltf2.html
You need to know the fundamentals, just to get started with threejs
https://threejs.org/manual/#en/fundamentals
And here you find the answer to your question
https://threejs.org/manual/#en/load-gltf
and to use a blender camera
var loader = new GLTFLoader();
loader.load('file.gltf',
function ( gltf ) {
camera = gltf.cameras[ '0' ]; //if you have one camera or you need the first
//your other code
gltf.animations; // Array<THREE.AnimationClip>
gltf.scene; // THREE.Group
gltf.scenes; // Array<THREE.Group>
gltf.cameras; // Array<THREE.Camera>
gltf.asset; // Object
}
Then there are the examples, and many use gltf files
https://threejs.org/examples/
Surely by starting with these links you will find on your own many ideas on where to further deepen.
in addition @hofk collected many examples, all very useful.
https://hofk.de/main/discourse.threejs/
good job
Hi Alessandro, yes, I still need to go a long way and I appreciate the guidance and the answer to my question.