Immersive 3D Audio and Visualization (three.js & javascript)

Поділитися
Вставка
  • Опубліковано 8 бер 2022
  • I'll show you how to integrate 3d positional sound in JavaScript and build an audio visualizer.
    Support me on:
    Patreon: / simondevyt
    Follow me on:
    Twitter: / iced_coffee_dev
    Instagram: / beer_and_code
    Github: github.com/simondevyoutube/
    I'll step through getting audio and 3d positional audio working in JavaScript using three.js, and we'll build out a couple simple audio visualizers using the AudioAnalyzer class.
    Full source code for the project is available, so if you're interested in fiddling with the code, screwing around with it, or improving it.
    Inigo Quilez's Site:
    iquilezles.org/
    Music: www.bensound.com
  • Наука та технологія

КОМЕНТАРІ • 61

  • @simondev758
    @simondev758  2 роки тому +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

    • @tomiwaibrahim6198
      @tomiwaibrahim6198 3 місяці тому

      @simondev758 Really nice video! I can't find the code for some reason, could you send the link to the code? I am currently working on a project and have no idea how to replicate that. Thank you!

  • @tonymasse3887
    @tonymasse3887 2 роки тому +35

    Totally useless to me (i'm not coding 3d worlds), but absolutely awesome! :)
    Your series about ThreeJS is brilliant. Please do keep going!

    • @simondev758
      @simondev758  2 роки тому +11

      Hah I saw the first part, and was disappointed for a second until I read the rest of your message :)

    • @tonymasse3887
      @tonymasse3887 2 роки тому +9

      @@simondev758 Usefulness is not a top criteria for me.
      I love watching great craftmanship, virtually no matter the craft. It just happens that on this one (JS) I have experience and can actually grasp the extent of the greatness :)

  • @phoenixxofficial
    @phoenixxofficial 4 місяці тому +1

    As a creative and aspiring dev, watching your videos is a breath of fresh air in this oversaturated "11 things you shou..." UA-cam meta
    Gonna pick up some extra shifts at my job so I can buy your courses and support 🙏🏾
    Thank you for the awesome content 💜 (and for showing people that JavaScript really isn't that bad 😂)

  • @kephas-media
    @kephas-media 2 роки тому +7

    Three has an analyzer class? Nice, really helps those who don't have the time to fully embrace Web Audio API

  • @SuperPicolin0
    @SuperPicolin0 2 роки тому +6

    Please keep the three.js videos coming, I love to see how something mindblowing to me is a child game to others, very inspiring!

  • @robertwallace5498
    @robertwallace5498 2 роки тому +5

    It is amazing how much sound impacts the feel of the world, great video as always

  •  2 роки тому +2

    Thanks for sharing, Simon. I really like the way you transform the Three.js docs in understandable concepts.
    Please keep the good work. 🙏🏻

  • @TheMisieq93
    @TheMisieq93 2 роки тому +1

    This is simply amazing... Thanks for sharing!

  • @covenantersoldier9165
    @covenantersoldier9165 Рік тому +1

    ahh oh my days, i used to work with babylon. truly do thank you simon.

  • @samuelkahunga5987
    @samuelkahunga5987 2 роки тому +1

    great content, you are on the way up bro 👍

  • @swoorp
    @swoorp 2 роки тому +1

    This was much needed!!!! Thank you!

  • @spaceymen
    @spaceymen 2 роки тому +1

    Wow! Pretty easy and intuitive.

  • @__gustavonovaes
    @__gustavonovaes 2 роки тому +1

    Awesome! Three.js is really handy!

  • @RaulikiDJ
    @RaulikiDJ 2 роки тому +1

    Many thanks for publish the code!

  • @user-fu8pd4cf6v
    @user-fu8pd4cf6v 2 роки тому +1

    Awesome stuff!

  • @yangnc8416
    @yangnc8416 2 роки тому +1

    awesome work

  • @glowiever
    @glowiever 2 роки тому +4

    wow threejs got 3d audio. meanwhile in c++ there's no hassle free and truly free 3d audio library

    • @benebene9525
      @benebene9525 2 роки тому +1

      Three.js is an external library. There are plenty of external and cross-platform libraries for c++ that can add audio (for example openAL)

  • @aayushjamuar9900
    @aayushjamuar9900 Рік тому

    DUDE This is what I was looking for

  • @vomaxHELLnO
    @vomaxHELLnO 2 роки тому +1

    Awesome, thanks!

  • @robksawyer
    @robksawyer 2 роки тому +1

    It'd be great to see some of your tutorials use React Three Fiber. Thanks again, rad stuff!

    • @howl2339
      @howl2339 Рік тому

      Sure it'd be great!

  • @TitanNanoDE
    @TitanNanoDE 2 роки тому +1

    I'm really enjoying your videos, they are very informative and neatly condensed without any unnecessary fluff. Have you ever looked at the Godot engine? I'm asking because I really enjoy working with it and was wondering what you think about it.

    • @simondev758
      @simondev758  2 роки тому

      Nah never tried it out. I might go fiddle with it, or Unity/Unreal one of these days.

  • @bibekbhusansahoo9412
    @bibekbhusansahoo9412 Рік тому

    Bro can you make a video on how to export modifier animation from blender for threejs. I tried exporting but got rigid mesh without any animation

  • @petebaron
    @petebaron 2 роки тому +1

    so many applications for the (coming soon) metaverse

  • @tomerhertz8502
    @tomerhertz8502 Рік тому

    firstly i absolutely love your tutorials ...some of the best i have encounter in the field (i come from ai / python)
    if i can ask you to review your code, since when i try to run it, it gives just a black screen,
    also you have a great voice, very relaxing to hear

    • @simondev758
      @simondev758  Рік тому

      How are you running it? Also, I don't guarantee that it continues running forever. It works when I upload it, but after that, who knows. Chrome changes frequently, and once this is a year or 2 old, it may need tweaking to get back into a working state.

  • @findjonmoses
    @findjonmoses 2 роки тому +1

    Wow!

  • @ilyaskuru9055
    @ilyaskuru9055 2 роки тому +4

    Beta Noobs: No! You can’t just make every big game on a web browser, you have to use C++ and Engine!
    SimonDev: Javascript And HTML go brr

  • @yilu7734
    @yilu7734 2 роки тому +1

    excellent,is three have immersive skybox,such as cloud system。。。

  • @slow5oh523
    @slow5oh523 2 роки тому

    I hate how calming your voice is.... Can you just.... make audiobooks............... Like I find myself staying up till 3am watching your videos anyway... lmao

  • @finalproject8821
    @finalproject8821 2 роки тому +1

    This is so good! Keep it up man! What's the name of the repo for the source code btw?

    • @simondev758
      @simondev758  2 роки тому

      github.com/simondevyoutube/ThreeJS_Tutorial_3DSound

  • @guialmachado
    @guialmachado 2 роки тому +1

    Can you make a video showing the same content but with a moving object, like an online player walking and making the sound move through the scene? Gun fires would be amazing

  • @thechallenge293
    @thechallenge293 2 роки тому +1

    Hi can you make a tutorial about text? What if one have to create a game with a lot of textual elements?
    Another thing i would like to know is how would you create the in-game gui? Animated buttons maybe with gifs or other moving parts?

    • @simondev758
      @simondev758  2 роки тому

      Creating in-world text? Or UI text & gui?

    • @thechallenge293
      @thechallenge293 2 роки тому

      @@simondev758 All of that but mostly 3d GUI. What should i use to create 3d buttons? PlaneGeometry? What is the best way to make in-game gui (hud, menus, items names etc..)?

  • @JazzFanss
    @JazzFanss 2 роки тому +1

    Space Odyssey!

  • @uiunicorn2018
    @uiunicorn2018 2 роки тому

    Can I ask what the setTimeout is for ?

    • @simondev758
      @simondev758  2 роки тому +1

      So that it give me a bit of time to wander around before the music starts. Mostly so I could record the video.

    • @uiunicorn2018
      @uiunicorn2018 2 роки тому

      @@simondev758 can't wait to try this with my "friendly" npc ua-cam.com/video/tDHzJlc1JfM/v-deo.html

  • @nutzeeer
    @nutzeeer Рік тому

    Can this also create binaural audio? Sounds are changed by the shape of your ears. Special microphones are available. Check out the virtual barber on youtube. Its like you are not even wearing headphones. Is this possible to calculate on the fly?
    I remember from my windows xp days that my soundcard supported EAX for virtual surround. Maybe that was something like that.

    • @nutzeeer
      @nutzeeer Рік тому

      My guess as a leading industry expert is that binaural audio can be calculated by audio raytracing with a virtual ear. Though ears are soft and sound moves through them. As well as the head. But i guess each sound can be processed just once and then saved as a binaural version. This could turn immersiveness up to 11.
      hm i bet the ear and head influence can be calculated just once for each frequency and then pressed into a mathemathical function. Distance also has an effect. And of course the angle.

    • @nutzeeer
      @nutzeeer Рік тому

      Maybe there is an easier solution than slapping raytracing on it. Also since its soundwaves, not rays.
      I bet its possible to have a 96 kHz audio simulation using fluid dynamics or something similar. Corners can be cut. I bet math can save a lot of processing time.

    • @nutzeeer
      @nutzeeer Рік тому

      One thing of importance is that even if a sound comes directly from the left the right ear tends to also hear it, since we are usually in a reflective environment. Going in the worlds most silent room creates the feeling of pressure since no sound is reflected. This has to be calculated in real time though, depending on wall or object distance

  • @spaceymen
    @spaceymen 2 роки тому +1

    Try BabylonJS too sometime in a future video.

    • @simondev758
      @simondev758  2 роки тому +2

      I keep meaning to, maybe a Three.js vs BabylonJS video is in order.

  • @alexshel8578
    @alexshel8578 2 роки тому

    can unreal engine 5 do something that Three.js can't do?
    This is a very serious question.)

    • @simondev758
      @simondev758  2 роки тому +1

      These days you can do a lot in JS, but still doesn't hold a candle to UE5.

  • @kian7032
    @kian7032 2 роки тому +1

    Can you a 3D game with support of mobile

  • @schmeezy3464
    @schmeezy3464 Рік тому

    Where did you learn programming?

    • @simondev758
      @simondev758  Рік тому

      Learned in University, degree in computer science, then just work/hobby to improve.

  • @br-zhou
    @br-zhou 2 роки тому

    imagine you add proximity voice chat...

  • @scottonanski4173
    @scottonanski4173 2 роки тому +1

    You should make a video on how to interpret the ThreeJs documentation because it's really, really bad...

    • @simondev758
      @simondev758  2 роки тому +1

      Heh, it's funny I never give that any thought, I've always found their docs had exactly what I was looking for. But there's definitely a gulf between "absolute basics" and "professional with years of experience". In a way, these videos are attempting to bridge that gap.

    • @scottonanski4173
      @scottonanski4173 2 роки тому

      ​@@simondev758 Your videos are far beyond beginner level! lol
      I mainly watch them for inspiration; knowing what is one day possible if I keep smashing my face against JavaScript.
      On a good day I catch something I sort of understand.
      btw, the lighting in your scene looks absolutely amazing.
      And the 'bob' movement is very convincing!

  • @qxb348
    @qxb348 2 роки тому +2

    first