Three.js Cameras Explained | Tutorial for Beginners! (JavaScript)

  Рет қаралды 34,513

SimonDev

SimonDev

3 жыл бұрын

Follow me on:
Patreon: / simondevyt
Twitter: / iced_coffee_dev
Instagram: / beer_and_code
Github: github.com/simondevyoutube/
Three JS cameras are quite simple to use, but require an understanding of the underlying 3d mechanics like perspective and orthographic projections in order to fully comprehend. In this project we'll explore both types of cameras that are offered in three js, we'll look at the PerspectiveCamera and OrthographicCamera classes, understand how the projections work by looking at the viewing frustums and how the parameters modify the furstum. We'll also step through the code in JavaScript to instantiate and manipulate the camera's position and orientation.
This is part in a series of tutorials on Three.js, aimed at helping beginners understand everything from the ground up. This is a beginners course, aimed at people with no background in the subject. We've covered simple setup and basic 3d worlds, and this project should give you a solid understanding of three.js camera setups.
The three.js library is available in JavaScript for cross-browser 3d graphics, wrapping webgl and making high level functionality available in the web browser. It’s an extremely mature and well maintained library that I use for many of these videos.
In the video, we cover:
* How to instantiate and use the three js camera classes.
* What are the differences between the camera types.
* Viewing frustums and how to understand camera parameters, how they relate to perspective and orthographic projections.
* How to manipulate cameras from code, changing position and orientation.

Пікірлер: 43
@simondev758
@simondev758 2 жыл бұрын
If you enjyoed this, check out my GLSL course: simondev.teachable.com/p/glsl-shaders-from-scratch Or support me on patreon!: www.patreon.com/simondevyt
@notevoyadarminombre156
@notevoyadarminombre156 3 жыл бұрын
I've just seen your set of videos for the first time and I want to thank you for putting out this content, great work!
@mortkebab2849
@mortkebab2849 3 жыл бұрын
Your tutorials are always very clear and easy to digest and contain just enough to convey the essentials.
@culpritdesign
@culpritdesign 2 жыл бұрын
Your videos contain information that is dense yet approachable without anything unnecessary.
@techrurallivining9417
@techrurallivining9417 2 жыл бұрын
Excuse me? Best explanation I've ever heard. Straight to the fundamentals and easy to understand. Made some awesome notes.
@ngocatnguyen5771
@ngocatnguyen5771 2 жыл бұрын
nice, i'm a game developer start from scratch as well, and not many video tutorial explain clearly about both orthographic and perspective camera in only 8 mins like you
@makl-the-oracle
@makl-the-oracle 3 жыл бұрын
What a GOAT, you're clearly very competent on the subject, very refreshing! Subbed instantly
@abexoxo
@abexoxo 9 ай бұрын
Clear, logical, demonstrative and comprehensive. Thanks Simon!
@asdakuhi8h
@asdakuhi8h Жыл бұрын
Your explanation of orthographics cameras blew my mind
@evanparrish4329
@evanparrish4329 2 жыл бұрын
This video is outstanding!! Thank you so much for making this 😁
@swoorp
@swoorp 3 жыл бұрын
I know you will soon reach a huge milestone
@Mohanad_mmn
@Mohanad_mmn Жыл бұрын
You are a legend. Thank you!
@dorianmac3389
@dorianmac3389 2 жыл бұрын
This explanation is so incredibly well done. Everything from how it is displayed to the way it is explained. This taught me exactly what I needed in a way that met me EXACTLY where I was at. Instant subscribe from me. Thanks for the great content
@lorenzodossi
@lorenzodossi 3 жыл бұрын
Love this kind of videos!
@simondev758
@simondev758 3 жыл бұрын
Great to hear! Tomorrow there's a semi follow up building on this to make a robust third person camera, and fixing some often overlooked framerate independence issues.
@granthawkins88
@granthawkins88 3 жыл бұрын
Awesome videos, I'm starting a 3D browser game and this is just what I need! Anyone ever say your voice sounds like Archer? I keep expecting to hear ice clinking in a glass..
@simondev758
@simondev758 3 жыл бұрын
lol, wife says she hears it now too
@kanpekiken2481
@kanpekiken2481 3 жыл бұрын
Thanks!!! You explain these concepts so well. Did you learn all this mostly in academics or in your professional career or just on the side?
@simondev758
@simondev758 3 жыл бұрын
Welcome! Professional career, used to work on xbox/playstation/pc games as graphics/optimization specialist.
@kanpekiken2481
@kanpekiken2481 3 жыл бұрын
@@simondev758 those are my exact goals ! You lived my dream.
@simondev758
@simondev758 3 жыл бұрын
Let me know if there's something you want to know about my experience. How to get into game development, etc. I've worked for several studios, and I was the architect for a big studio overseeing technical decisions from all the teams, if you have any questions let me know.
@kanpekiken2481
@kanpekiken2481 3 жыл бұрын
@@simondev758 that’s amazing. I know the gaming industry gets a bad rep but as someone incredibly passionate about it, I would love to code creating games. My question to you is how should ones portfolio look like when applying to the industry? I currently have many mini games that I’ve created from scratch that took me 2-8 days to create nothing over a thousand lines of code though. I fear it’s not enough to impress recruiters.
@simondev758
@simondev758 3 жыл бұрын
It does get a bad rap, and it's not totally unwarranted. But as someone who's worked both in games and at Google, games was the most fun I've ever had in my career. Both the work and the people. As for what should your portfolio look like? What kind of places are you trying to apply to? Most big places are going to use Unreal or internal tech, almost certainly c++ based. Think about what the hiring person wants to see, what kind of experience they value. What *I* did was to build out a single, semi large project. I wanted to be a graphics specialist, so I wrote a small 3d engine from scratch in C++. Took about 3 weeks but I had offers from major studios like EA and others pretty soon after.
@surakshamotilal2412
@surakshamotilal2412 3 жыл бұрын
Thank you for these videos! I tried to make the other tutorials work with the recent versions but there are conflicts, so I used the older versions. Will there be any issue with using the older 2020 versions now?
@joimeecajandab1438
@joimeecajandab1438 2 жыл бұрын
I LOVE THREEJS
@ultratuya2324
@ultratuya2324 Жыл бұрын
thanks
@thinginthenorth
@thinginthenorth Жыл бұрын
How do you switch between the two cameras? Lets say im making a ingame map with a perspective but also orthographic view from above. Switch cameras in the update function? Thanks for the clear introduction.
@LucaDeCaprio
@LucaDeCaprio 3 жыл бұрын
Great video. Could you do a video going into more depth on your thoughts on JS and three.js? I'd like to know your opinion on building a full game in the browser using it. I know JS is single threaded so it worries me for performance.
@kanpekiken2481
@kanpekiken2481 3 жыл бұрын
I don’t think it would be wise to build a “full game” on browser but something small like a mini game is entirely possible. I’m not as experienced as Simon but those are my two cents.
@simondev758
@simondev758 3 жыл бұрын
Great suggestion, might be good to branch out into some more topics like that.
@breakdancerQ
@breakdancerQ Жыл бұрын
This is really good, because even an idiot like me could understand it
@diffuusio4852
@diffuusio4852 2 жыл бұрын
I just wanted to do a water drop wave and now I'm knee deep in three.js.
@Pixel_Entriment24
@Pixel_Entriment24 2 жыл бұрын
it's really similar to unity
@thesejo.6691
@thesejo.6691 3 жыл бұрын
where is code in git hub
@simondev758
@simondev758 3 жыл бұрын
Look for the one with camera in the name.
@CaffeineInjected
@CaffeineInjected 3 жыл бұрын
This would be so great if it was in say.. Unreal Engine or perhaps your own custom engine. JavaScript just gives me the willies.
@simondev758
@simondev758 3 жыл бұрын
Hah, the concepts are easy to port.
@CaffeineInjected
@CaffeineInjected 3 жыл бұрын
@@simondev758 Let us hope so. :)
Simple Third Person Camera (using Three.js/JavaScript)
13:00
SimonDev
Рет қаралды 63 М.
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
تجربة أغرب توصيلة شحن ضد القطع تماما
00:56
صدام العزي
Рет қаралды 50 МЛН
THEY made a RAINBOW M&M 🤩😳 LeoNata family #shorts
00:49
LeoNata Family
Рет қаралды 36 МЛН
Create JavaScript 3D World in 5 Minutes (or less)
3:49
SimonDev
Рет қаралды 71 М.
FFTOcean
6:28
Liao Akilar
Рет қаралды 44
I Tried Making an FPS Game in JavaScript
8:19
SimonDev
Рет қаралды 127 М.
What is CONSISTENT HASHING and Where is it used?
10:50
Gaurav Sen
Рет қаралды 768 М.
How Big Budget AAA Games Render Clouds
10:45
SimonDev
Рет қаралды 264 М.
How Big Budget AAA Games Render Bloom
13:23
SimonDev
Рет қаралды 107 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 1,8 МЛН
Как распознать поддельный iPhone
0:44
PEREKUPILO
Рет қаралды 1,5 МЛН
КРУТОЙ ТЕЛЕФОН
0:16
KINO KAIF
Рет қаралды 5 МЛН
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 5 МЛН
Зачем ЭТО электрику? #секрет #прибор #энерголикбез
0:56
Александр Мальков
Рет қаралды 272 М.
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,6 МЛН