Пікірлер
@ucato6278
@ucato6278 2 күн бұрын
I think this video is a great starting point for whoever wanna try to mess with models in three.js (such as myself), great job my guy!!!
@ivanovichCetys
@ivanovichCetys 7 күн бұрын
Thank u, amazing tutorial bro, however, how can object only limit like a canva and not all the screen?
@mathom633
@mathom633 21 күн бұрын
somehow it doesnt work, i downloaded everything from guithub but it only renders a black screen with the header
@mathom633
@mathom633 21 күн бұрын
somehow it doesnt work for me, i literally downloaded everything on github but the eye still doesnt show up, its just a black screen with the header
@alex.29899
@alex.29899 Ай бұрын
Which font style do you use in your Vs code ?
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
I use Fira Code with ligatures activated
@rolandmaroun2233
@rolandmaroun2233 Ай бұрын
video is so cool but the final index.html file in your repository didn't work once launched on google chrome from my side any idea why?
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
You might either need to change the path of the 3d models or run the index.html file using some king of server software, like VSCode's Live Server Extension
@honeynet
@honeynet Ай бұрын
May I know what's the purpose of "Dino"? The example unable to work properly without this "Dino" thing. Thanks.
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
It's the selector I'm using to choose which file to render, either "dino" or "eye". You may very well just hardcode that on a real project
@cauefernandes5706
@cauefernandes5706 Ай бұрын
Muito top mano, ajudou dms brasil no topo sempre
@hitheshsuvarna2198
@hitheshsuvarna2198 Ай бұрын
ive downloaded other models from sketchfab and included in project directory but when i link them and load they are not coming in the website what may be the reason, i think all model must work, its same format as u mentioned
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
They should all work, but the settings for each model can be wildly different. So make sure you play around with light sources, camera positions, object materials, etc. Once you get something to appear on the screen you can start tweaking the values and hopefully you'll be able to adjust it the way you want it.
@hitheshsuvarna2198
@hitheshsuvarna2198 Ай бұрын
@@GabrielMolterIO yea man understood it thank you for the info
@imasunflowerlilfunny3353
@imasunflowerlilfunny3353 2 ай бұрын
if my project is in react js , how do i add this in my homepage?
@GabrielMolterIO
@GabrielMolterIO 2 ай бұрын
For React projects I'd use @react-three/fiber and maybe "useGLTF" from @react-three/drei to load the GLTF model. I might make a video on that in the near future.
@dhruvsehgal1198
@dhruvsehgal1198 2 ай бұрын
Is it possible if i made a customization box changing color and rendering text. will it reflect on model also with changing color and text???
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
Yeah, I remember seeing something similar to that on the THREE.JS documentation, maybe take a look at the examples there and you can find a path to follow
@codywong4052
@codywong4052 3 ай бұрын
I can't get it to work.
@GabrielMolterIO
@GabrielMolterIO Ай бұрын
Do you get an error message on the console or something like that?
@drdistic
@drdistic 3 ай бұрын
Can I create scroll trigger animations for this 3d model?? Please answer
@GabrielMolterIO
@GabrielMolterIO 3 ай бұрын
Yeah, just set your scroll event listener, save the scroll position into a variable and use that variable on the animation loop to make whatever animation you want
@miiukatt4656
@miiukatt4656 3 ай бұрын
Hello! Thank you very much for this, I've been watching for a tutorial for days and I wasn't able to find it until now! I have a problem and it's that I can see the preview of the webside with the extension 'Live Preview', but when I run it on browser the 3Dmodel doesn't appear. Could someone help me with that, please? 🙏
@GabrielMolterIO
@GabrielMolterIO 3 ай бұрын
Hey, that's probably related to the import path of the model file. It should work if you add ./ before "models/" on the file path. If I remember well, I've given a slightly more detailed explanation in a previous comment here some days ago.
@muhammadyameen4998
@muhammadyameen4998 3 ай бұрын
thanks for it. got lead for a jump start. thanks bud
@kevinland534
@kevinland534 3 ай бұрын
Very awesome job with this video! The only thing is that I can only view the eyeball model. Do I need to create another webpage and change the code so that I can view the dinohead?
@GabrielMolterIO
@GabrielMolterIO 3 ай бұрын
You should be able to switch to the dino by changing line 24: let objToRender = 'eye'; becomes let objToRender = 'dino';
@kevinland534
@kevinland534 3 ай бұрын
Excellent! Thank you very much!
@user-we5gi5rd8r
@user-we5gi5rd8r 3 ай бұрын
Thank you so much, this is a great tutorial!
@Rancha51
@Rancha51 4 ай бұрын
how are running the project ?
@GabrielMolterIO
@GabrielMolterIO 3 ай бұрын
I use a little VSCode Extension called "Live Server", which I highly recommend. You could also simply open the index file with a browser. Keep in mind that, as it is, the code loads the 3D models using paths relative to the root, so to run it without starting a local web-server, you'd have to add a "./" before the file path, to make it relative to the current folder. `models/${objToRender}/scene.gltf` would have to be `./models/${objToRender}/scene.gltf` Again, if you use the extension that change isn't needed.
@angelinepoissonneau
@angelinepoissonneau 2 ай бұрын
@@GabrielMolterIO Hi, I have the same problem, I changed "loader.load( `./models/${objToRender}/scene.gltf`," but I still get a black screen, when I inspect the page in Chrome, it shows the container3D div has a height of 0, but is the same width as the screen
@GabrielMolterIO
@GabrielMolterIO 2 ай бұрын
@@angelinepoissonneau do you get an error on the console or something?
@ebk4683
@ebk4683 4 ай бұрын
On mine the screen is black, I've tried increasing the light, but it doesn't help, and it's showing this code in the console: "SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON at JSON.parse (<anonymous>) at GLTFLoader.parse (GLTFLoader.js:344:17) at Object.onLoad (GLTFLoader.js:239:11) at three.module.js:43638:38"
@quacksonja2147
@quacksonja2147 Ай бұрын
u fixed this?
@user-yo3po1so2j
@user-yo3po1so2j 4 ай бұрын
Amazing tutorial, thanksss
@user-yo3po1so2j
@user-yo3po1so2j 4 ай бұрын
perfect
@user-fu3pe2kq8b
@user-fu3pe2kq8b 4 ай бұрын
when i add the model its not perfectly centred. i even tried setting position and using different models but got same problem. when i add model its not on origin , its at +ive y-axis. anyone know about this problem ?
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
You know when we set camera.position.z on the video? Did you try changing the positions for camera.position.x and camera.position.y as well? I think that might work for you!
@user-fu3pe2kq8b
@user-fu3pe2kq8b 4 ай бұрын
@@GabrielMolterIO yes i know , i had to set values of camera and of position in thousands. another way was to scale down my model. i was wondering if this happens every time for everyone. it would have been great if imported model were just originate from position 0,0,0. (they actually are but the appear at some other position away from origin 🥲).
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
@@user-fu3pe2kq8b I don’t actually know the reason for that, but in my experience it was rare to find a model that was nicely centralized at 0,0,0 by default. 🤷🏻‍♂️
@user-fu3pe2kq8b
@user-fu3pe2kq8b 4 ай бұрын
@@GabrielMolterIO true , it means its the same case everyone. but there is too much hit and trail in threeJs 😮‍💨 beside knowing dimensions
@user-rs9ov6qs7v
@user-rs9ov6qs7v 4 ай бұрын
cooooooollllll, we need more of three.js , keep it up
@tunahanergul9945
@tunahanergul9945 4 ай бұрын
hey um how can I add a background image, in my site I can change colors only
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
If the background doesn't interact with the model you can just add it with CSS in element you want, like: body { background-image: url(path_to_your_img) }
@tunahanergul9945
@tunahanergul9945 4 ай бұрын
@@GabrielMolterIO it isn't working I don't know why, in a few forums they said you have to add new scene and camera
@user-bg3ic6xw2y
@user-bg3ic6xw2y 5 ай бұрын
Hello! Could you please tell me what format of the 3D model is needed to upload it to the site?
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
This video uses GLtf format, but you can use a bunch of others as well, just take a look at the documentation on loaders.
@Psycandy
@Psycandy 5 ай бұрын
right at the end you type some weird sort of arrow. That symbol does not exist in ASCII so it would be useful to know how you managed to get half the special characters you magically paste in, leaving us to type it up wrong, and it won't work. I guess you aren't supposed to type it out, just copy paste from somewhere, which will remain a secret. Super.
@bzsteachings511
@bzsteachings511 4 ай бұрын
If I understood what you meant, what you are talking about are legatured, those are basically more characters combined for a different look. You can enable them in VS in the options, for the arrow is just = and > combined that look like an arrow
@a5ac8m
@a5ac8m 5 ай бұрын
I have downloaded everything and copied the exact folder names but it just shows a black screen with the title
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
I've heard some people are having the same issue. I believe it's related to how the model file path on the code is relative to the root of the project, but if you just open it without using some kind of localhost server, it will look for the root of your computer's file system, which won't work... Try running it with something like the "Live Server" extension for VSCode.
@12alfredjoedevasia59
@12alfredjoedevasia59 3 ай бұрын
i used live server extension but still not working @@GabrielMolterIO
@chamcamtaco6014
@chamcamtaco6014 5 ай бұрын
Sorry, I tried to open your .html file with edge and crhome but the modeling doesn't work and the same thing happens with my files, I don't know if I use a program for local host or not
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
Hey, I missed that on the video, but I believe the issue you're having is related to how the model file path on the code is relative to the root of the project, but if you just open the .html file, without using some kind of localhost server, it will look for the root of your computer's file system, which won't work... Try running it with something like the "Live Server" extension for VSCode.
@msg-1995
@msg-1995 Ай бұрын
​@@GabrielMolterIOok so we have to run it with node or python to create a http socket or else we can make a flask or react app of it ??
@ftmullah
@ftmullah 5 ай бұрын
hey, how do you go about obj files? please help
@GabrielMolterIO
@GabrielMolterIO 5 ай бұрын
You’d have to replace the glTF loader with the OBJ one, just take a look at the ThreeJS docs: threejs.org/docs/#examples/en/loaders/OBJLoader
@guillaumedurant7647
@guillaumedurant7647 5 ай бұрын
Hi. Thank you for your explanations. This is exactly what I was looking for. I'm a newbie in Javascript. I'm still able to understand all you said. I guess I will I to watch your video again and again and again....
@roro4787
@roro4787 5 ай бұрын
Can we create a road in 3D with exact dimensions, where the data such as thickness, measurements and more stored in a database is displayed once I click a point on this road? Thank you soo much
@GabrielMolterIO
@GabrielMolterIO 4 ай бұрын
I haven't done that myself, but I'm sure it is possible! ThreeJS basically just puts your scene together and displays it, but the logic of what's going to be rendered is up to you. In the example you gave, you'd still have to create the code to handle the click on the road, read from db, etc... then, when all of that is done, you just send ThreeJS the correct stuff to render at every frame.
@IrvineMesa
@IrvineMesa 6 ай бұрын
hi where did you get the background music
@GabrielMolterIO
@GabrielMolterIO 5 ай бұрын
I believe that one is from KZbin's free library, if I remember correctly
@bykawali
@bykawali 6 ай бұрын
Do i have to install anything only my computer (Mac) to be able to run it locally via VS Code and debugging in Chrome?
@GabrielMolterIO
@GabrielMolterIO 6 ай бұрын
Not really, just dragging the file to Chrome should open it without issues. I use a VSCode Plugin called "Live Server", which makes it a bit faster.
@sysadmin9396
@sysadmin9396 6 ай бұрын
I think I finally found a way to give my ai home assistant a “face” . Thank you
@GabrielMolterIO
@GabrielMolterIO 6 ай бұрын
Hahaha this sounds pretty cool
@jaqsentanner5386
@jaqsentanner5386 6 ай бұрын
Great and quick breakdown! Thank you.
@user-vt8ho2jl1r
@user-vt8ho2jl1r 7 ай бұрын
Thanks for this video. It would be very helpful if you do this for 3D House model
@GabrielMolterIO
@GabrielMolterIO 7 ай бұрын
No matter what's the model, the code should work as long as it's exported in glTF
@iqrahanif7568
@iqrahanif7568 7 ай бұрын
When i use my models in your project they did not show on website
@GabrielMolterIO
@GabrielMolterIO 7 ай бұрын
I'd start by checking if there are any errors on the console. Also, is the model exported in the correct format? I'd also double check the camera position, it might have to be very different from what I'm using on the video, depending on the model you're using.
@thelearner3962
@thelearner3962 7 ай бұрын
I use this in my React project and it complains "Uncaught SyntaxError: Unexpected token ':' at scene.gltf"
@thelearner3962
@thelearner3962 7 ай бұрын
Okay this is working, thanks Gabriel! For those using React + Vite, need to first configure Vite to load the gltf file properly.
@filipemecenas
@filipemecenas 8 ай бұрын
Thats super cool !!!
@tbrogoit02
@tbrogoit02 8 ай бұрын
I probably wont get an answer but I was wondering what you'd do if you had a scene made in Blender and wanted one specific object within that scene react to mouse movement? To be specific, I want to make a campfire with sparks coming out, but want the sparks to interact with the mouse if it hovers over them and the fire interact differently if the mouse goes over it.
@GabrielMolterIO
@GabrielMolterIO 8 ай бұрын
I don't know how complex your campfire is, but my best guess would be to have two separate 3D models on the same Three.JS scene (one for the environment and one for the campfire) and I'd have the mouse hover emit some particles or something like that.
@user-pc9nq8me8i
@user-pc9nq8me8i 8 ай бұрын
Thank you! It’s very excellent!
@KwameGyanko
@KwameGyanko 9 ай бұрын
I dont understand it now but in a few months it will all make sense 😅. thank you
@vtminhlien8840
@vtminhlien8840 10 ай бұрын
Can't workwith STEP file ?
@GabrielMolterIO
@GabrielMolterIO 8 ай бұрын
Not as far as I know, I'd recommend you read this issue on GitHub: /mrdoob/three.js/issues/7125
@breakingtheinternet9622
@breakingtheinternet9622 10 ай бұрын
I clone your project but it only give me the text
@GabrielMolterIO
@GabrielMolterIO 10 ай бұрын
Not entirely sure what you mean here... The project on GH has all the code AND the 3D models, so it's pretty much ready to run
@Ally-uj3di
@Ally-uj3di 9 ай бұрын
I sadly have the same problem. I cloned your GH Repository, but when I open the index.html file, I only see a black screen with the "A Simple Three.Js"-header, but no 3D Object in sight. I have tried it with "Live Server" and with just dragging the html file to my browser. Both don't work. What did I do wrong? @@GabrielMolterIO
@user-lv3uu6cc8s
@user-lv3uu6cc8s 10 ай бұрын
awesome content bro
@user-hk3gd2fv5s
@user-hk3gd2fv5s 11 ай бұрын
Thank you so much for this tutorial. I have a problem: my 3D model is so small and it is located so far from my current camera position, so i am confused. I repeated all code, which you have done, please, help me sir😇
@GabrielMolterIO
@GabrielMolterIO 10 ай бұрын
Sounds like you should play around with the camera.position.z setting a bit. The values I used on the video worked for the models I used, but you'll have to tweak them to make them work with your models.
@eehm
@eehm Жыл бұрын
Thank you
@benxfpg
@benxfpg Жыл бұрын
Hi! Im curious how to get this working on my wordpress site😁
@GabrielMolterIO
@GabrielMolterIO 10 ай бұрын
I'm fairly certain that if you just upload the models to wp-content/uploads, update the path to the file on the code and then place it all inside an HTML block, it should work. There's probably better ways, like using a custom page template file, etc... I'm going to be testing this in the future and I might make a video about it, as I've gotten that same question a few times now.
@covenantersoldier9165
@covenantersoldier9165 Жыл бұрын
Tip of the hat to you Gabriel, what a breakthrough. after all the videos of trying to host this thing through a server is somewhat hard being somewhat a technical idiot, just decided going blindside, with something no one talks about, skypack. This tutorial was the second most successful and easy to understand tutorials I've come across, simon devs videos are brilliant, a easy chill dev creating some really great projects, well done. [pat on back]
@ahmedgoniboulama8423
@ahmedgoniboulama8423 Жыл бұрын
Nice video, it will be great to see another video in which we can in example learn how to upload 3d objects to our scene from our local storage