Create the Earth with THREE.js

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2023
  • Let's create a lovely multi-layered model of the earth using THREE.js
    Live demo here: bobbyroe.github.io/threejs-ea...
    Code on Github: github.com/bobbyroe/threejs-e...
    Note that in the video the model is mapped with nice, 4K textures, which I purchased from PlanetaryPixelEmporium for $8. The code repo uses the free textures (which are only 1K)

ความคิดเห็น • 103

  • @yarumolabs
    @yarumolabs 5 หลายเดือนก่อน +2

    I'm subscriber number 1000, it was super cool to see the change from 999 to 1000 haha, thanks a lot for this content, always amazing to find three.js tutos. Kepp it up

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Thanks for the 1,000th sub @yarumolabs!

  • @mason9913
    @mason9913 5 หลายเดือนก่อน +3

    Great video! The simplicity with which you explain every step, encourages me to try this out myself and learn more. Thank you.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Awesome! I'd love to see what you create!

  • @manaspaul
    @manaspaul 5 หลายเดือนก่อน +7

    Feels like seeing github's homepage. Would love to see the coordinates interaction

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Noted! Thank you

  • @EasyShowGallery
    @EasyShowGallery 4 หลายเดือนก่อน

    That's impressive, thank you for sharing this

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      My pleasure!

  • @easyingles_
    @easyingles_ 3 หลายเดือนก่อน

    Great video Dr. House!!

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Thank you kindly

  • @irfansaeedkhan7242
    @irfansaeedkhan7242 5 หลายเดือนก่อน +1

    its amazing thank you for that. award winning website effects would be great, like on scroll we go inside things and text apears then we scroll and it goes downward and we we things, something practical we see in award winning websites, that can be whole series and in market it has demand

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      That would be cool! I might create a video like that, stay tuned!

  • @JunebugPresents
    @JunebugPresents 5 หลายเดือนก่อน +6

    Good stuff, Bobby. I'm sending this to my son.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Thanks, Clay!

  • @user-hd3pz2ow1b
    @user-hd3pz2ow1b 2 หลายเดือนก่อน +1

    thank u for the code -- import method in html for three and orbital controls !! thank you again !!

    • @robotbobby9
      @robotbobby9  2 หลายเดือนก่อน +1

      You are welcome!

  • @DoctorSoulis
    @DoctorSoulis 5 หลายเดือนก่อน

    This content is gold!
    New sub.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Awesome, thank you!

    • @DoctorSoulis
      @DoctorSoulis 5 หลายเดือนก่อน

      @@robotbobby9 I'm new to 3D web.
      Could you share some tips to become a creative developer?

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Yes.
      - start tinkering and creating today - don't wait.
      - try different tools and techniques - you will find a system that works for you
      - be patient and go easy on yourself - no one's a artistic genius overnight.
      - create /something/ EVERY DAY, even if it's only a small thing. Stick to it!

    • @DoctorSoulis
      @DoctorSoulis 5 หลายเดือนก่อน

      @@robotbobby9 Ty and happy new year!

  • @tagsoftware
    @tagsoftware 5 หลายเดือนก่อน +2

    Nice work. i hope that in the future you will do something with geographic coordinates.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Thank you! I will look into geo coords!

    • @_timestamp
      @_timestamp 5 หลายเดือนก่อน

      Yes please! 😊

  • @antonio-arts
    @antonio-arts 4 หลายเดือนก่อน

    Great walkthrough on the creating the quite realistic earth, thanks for sharing! I’m wondering which approach can be used to eliminate the lights on the day part of the earth

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน +1

      Good question! A custom shader might work, one that is transparent in direct light, and fully opaque on the shaded side

  • @emilylemonly
    @emilylemonly 3 หลายเดือนก่อน +1

    cool tut

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Thanks @emilylemonly

  • @chriscalver8595
    @chriscalver8595 4 หลายเดือนก่อน +1

    great video...tks

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      Thanks for watching!

  • @joseph_meyers
    @joseph_meyers 4 หลายเดือนก่อน

    amazing more videos please!!!

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      More coming!

  • @private4438
    @private4438 3 หลายเดือนก่อน +1

    Awesome! Thank you! Maybe you could do one in which when a user clicks a continent a pop-up appears?

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Great suggestion!
      This demo is similar:
      vasturiano.github.io/three-globe/example/html-markers/

  • @JackLeiLing
    @JackLeiLing 5 หลายเดือนก่อน

    Thanks! Super cool! Like to see how to add interactive markers

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Thanks for the idea!

  • @Ryguy12543
    @Ryguy12543 5 หลายเดือนก่อน

    thanks for the video btw awesome content :)

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Thank you, @Ryguy12543 !

  • @SystemCTRL
    @SystemCTRL 3 หลายเดือนก่อน

    Awesome!

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Thank you! Cheers!

  • @brianpatrick7619
    @brianpatrick7619 หลายเดือนก่อน

    This is AWESOME, thank you! Could you make a follow on video showing how to add an animate a satellite moving in orbit with ECI coordinates?

    • @robotbobby9
      @robotbobby9  หลายเดือนก่อน

      Great suggestion! I’ll add it to the list ☝🏼

  • @tvwithtiffani
    @tvwithtiffani 2 หลายเดือนก่อน

    Cute!

  • @NomNomDiscoveries
    @NomNomDiscoveries 3 หลายเดือนก่อน +1

    Why am I getting such different results when using r161 ThreeJS instead of r131 ? Do you know how I can fix it ?

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Great question! Turns out a change to colorManagement in version 152 is the reason it looks so different:
      github.com/mrdoob/three.js/releases/tag/r152
      add these lines (around line 16 or so)
      renderer.toneMapping = THREE.ACESFilmicToneMapping;
      renderer.outputColorSpace = THREE.LinearSRGBColorSpace;
      (You may need to boost the `sunLight` intensity)
      Hope this helps!

  • @txmw4464
    @txmw4464 3 หลายเดือนก่อน +1

    Great video really well explained! Im not sure if I've made a mistake but im having an issue with the lightmap and bump map. even using the code from github there is no bumps and the lightmap changes the shade of the entire object. Not sure it it's a change in the three.js version.

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Not sure why that's happening, could you share a codepen @txmw4464 ?

  • @javifontalva7752
    @javifontalva7752 5 หลายเดือนก่อน

    Terrific video!!

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Thank you, @javifontalva7752!

  • @TheBayExpresss
    @TheBayExpresss 25 วันที่ผ่านมา

    Very informative video, thanks a lot!!! Dropped a sub :)

    • @robotbobby9
      @robotbobby9  25 วันที่ผ่านมา

      Thanks for the sub!

  • @pietro5856
    @pietro5856 4 หลายเดือนก่อน

    Amazing video!!!!
    But I have a problem, if I create a function where I move the earth with the stars the rendering will lag a lot ( I have enough power in my pc ), if I don’t apply the images mesh is smooth.
    Maybe I can’t use image mesh and move the object ? Is to much to handle by three is ?

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      🤔 Could you share a codepen example?

  • @DotnetistEnterprise
    @DotnetistEnterprise 5 หลายเดือนก่อน +1

    Nayshhh

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      🙏🏼😎

  • @Kirkpettinga
    @Kirkpettinga 18 วันที่ผ่านมา

    Thanks for the content! Would love to see your solution for only showing the night lights on the dark side of the earth

    • @robotbobby9
      @robotbobby9  18 วันที่ผ่านมา +1

      I need to have a go at that!
      Just like it's implemented here:
      eyes.nasa.gov/apps/solar-system/#/earth

    • @Kirkpettinga
      @Kirkpettinga 17 วันที่ผ่านมา +1

      @@robotbobby9 OMG this site is amazing!

  • @bazc_
    @bazc_ 4 หลายเดือนก่อน

    Great

  • @TheBayExpresss
    @TheBayExpresss 25 วันที่ผ่านมา

    I also added the bump for the Mountains etc, this is the code for the ones who want it:
    let bmap = loader.load('./assets/earth/8k_earth_normal_map.jpg');
    bmap.wrapS = THREE.RepeatWrapping;
    bmap.wrapT = THREE.RepeatWrapping;
    bmap.repeat.set(5, 5);
    earthMesh.material.bumpMap = bmap;
    earthMesh.material.bumpScale = 0.004;
    looks very good!

    • @robotbobby9
      @robotbobby9  24 วันที่ผ่านมา

      Nice! works for me too, without the repeat and a bumpScale of 4.0

  • @pbitsurf
    @pbitsurf 4 หลายเดือนก่อน

    nice

  • @MrRamanPP
    @MrRamanPP 4 หลายเดือนก่อน +1

    The clouds dont show up on the dark side of the earth. You can get around this by adding a very faint ambient light.

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      Nice solution.

  • @doaamarshal1835
    @doaamarshal1835 หลายเดือนก่อน

    amazing! i want to do the same with a-frame , any advices?

    • @robotbobby9
      @robotbobby9  หลายเดือนก่อน

      I'm not familiar with A-Frame, but it looks like it's built on Three,js! Maybe build a custom *Earth* component?
      aframe.io/docs/1.5.0/introduction/writing-a-component.html

  • @Nutkani
    @Nutkani 5 หลายเดือนก่อน

    Hey small question, in case we want to add flags on specific coordinates (on world map) how can we achieve that? What I was thinking to add an extra geometry which holds the specific Icons and palce them randomly.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Hey @Nutkani - good question!
      I hope to explore that in a future video. Meanwhile, this looks interesting:
      github.blog/2020-12-21-how-we-built-the-github-globe/

    • @Nutkani
      @Nutkani 5 หลายเดือนก่อน

      Thanks mate I have already implemented it. I can share my github link if any one is intrested.@@robotbobby9

    • @robotbobby9
      @robotbobby9  4 หลายเดือนก่อน

      I'm interested!

  • @zhaobangxue6306
    @zhaobangxue6306 3 หลายเดือนก่อน +1

    Hi, i have downloaded your code package, could you tell me how to run your project on vscode?thanks

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน

      Please watch this tutorial:
      Getting Started with Three.js: A Beginner's Tutorial
      th-cam.com/video/XPhAR1YdD6o/w-d-xo.html

  • @chillouthere4056
    @chillouthere4056 3 หลายเดือนก่อน +1

    I'm 805 like :) I would like to ask is it something that I can depend on to generate my vectors and graphics into animation such as lottie!?
    Share if you have any ideas!
    Much thanks,

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน +1

      @chillouthere4056 - Although I haven't tried it myself, looks like there's a discussion about this here:
      discourse.threejs.org/t/convert-3d-model-in-threejs-scene-to-svg/31088

  • @miguelcosta4450
    @miguelcosta4450 5 หลายเดือนก่อน +1

    It's possible to copy the github globe in the mainpage? Inspect element have everything in the code? I see one guy showing the exact globe in a localhost.. You can make a exact copy of github globe?

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      Unlikely. Here's an interesting repo:
      github.com/vasturiano/three-globe
      I hope to create a Github Globe tutorial soon!

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      This looks cool too:
      github.blog/2020-12-21-how-we-built-the-github-globe/

    • @miguelcosta4450
      @miguelcosta4450 5 หลายเดือนก่อน +1

      @@robotbobby9 yah but i see a video of a guy how have a exact copy of github globe! if you search github globe here on yt you will find

  • @SajithRanatunga-pm5zl
    @SajithRanatunga-pm5zl 17 วันที่ผ่านมา

    Hi, Thank you sharing this awesome tutorial. Please if you can give us a landscape topology (terrain/lake) visualization on Three JS

    • @robotbobby9
      @robotbobby9  17 วันที่ผ่านมา +1

      Great suggestion! I'm adding it to my list of video ideas!

    • @SajithRanatunga-pm5zl
      @SajithRanatunga-pm5zl 17 วันที่ผ่านมา +1

      @@robotbobby9 Thank you.

  • @AndreOlive
    @AndreOlive 5 หลายเดือนก่อน

    why DiretionalLights does not work in some cases?

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Could be that it wasn't added to the scene? Or it's intensity is low or 0, or that the materials do not respond to lights ... lots of cases. You can also check
      discourse.threejs.org/search?q=directional%20light%20not%20working

  • @maxim87
    @maxim87 5 หลายเดือนก่อน

    where can i get the code that you started with ?

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน

      github.com/bobbyroe/getting-started-threejs - check out the *start* branch

  • @RameshBSahoo
    @RameshBSahoo 2 หลายเดือนก่อน +1

    Hello Sir!! Would be kind of you, if you please help us to understand, how to set-up the project please? Would be a nice kick-start to newbies like me. Thank you sir!!

    • @robotbobby9
      @robotbobby9  2 หลายเดือนก่อน

      I was just about to link you to my Getting Started tutorial, but you found it already!

  • @joshdee7639
    @joshdee7639 3 หลายเดือนก่อน

    Could Smesh!

  • @hitmeup4918
    @hitmeup4918 3 หลายเดือนก่อน

    Is there any other way to create the stars !?

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน +1

      Yes, @hitmeup4918, there are many other ways. Depends on what you need. You could, for example, texture a sphere with an image of stars, place your scene inside the star sphere. Or you could use a background image in your scene.

  • @Ryguy12543
    @Ryguy12543 5 หลายเดือนก่อน

    is this code on github somewhere? I would love to read through.

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Yes! github.com/bobbyroe/threejs-earth

  • @parassharma7041
    @parassharma7041 3 หลายเดือนก่อน

    I'm subscribing your channel please upload more 3js content

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน +1

      More coming every week! Meanwhile, check out this playlist:
      th-cam.com/play/PLb9_Nx5huIwmH7vu8eaDnr6fw2c9AOXvw.html&si=eAAkNYHlO8iYX_9k

    • @parassharma7041
      @parassharma7041 3 หลายเดือนก่อน +1

      @@robotbobby9 Thanks friend

  • @wLiwa
    @wLiwa 3 หลายเดือนก่อน

    • @robotbobby9
      @robotbobby9  3 หลายเดือนก่อน +1

      Thank you!

  • @realitydesigners
    @realitydesigners 5 หลายเดือนก่อน +1

    the matrix is made with threejs

    • @robotbobby9
      @robotbobby9  5 หลายเดือนก่อน +1

      Is that a suggestion? Make the Matrix effect in WebGL?
      😎

    • @realitydesigners
      @realitydesigners 5 หลายเดือนก่อน

      @@robotbobby9 yes and holograms too