Engine Sim: Procedurally Generating Audio Using a Real-time Fluid Simulation (Technical Breakdown)

Поділитися
Вставка
  • Опубліковано 25 лис 2024

КОМЕНТАРІ • 753

  • @AngeTheGreat
    @AngeTheGreat  2 роки тому +450

    Hope you guys enjoyed the video! I don't know if this covers everything that everyone wanted but I think it gets the most important points across. Some people asked what the impulse responses I used in the engines sound like and they don't sound like much, just short clicks. Also, the UA-cam video compression algorithm was not kind to this video which I knew might be an issue. I promise the fluid visualization looks a lot better in the original program lol. Let me know what you guys think!
    Also, some people have criticized the fact that I'm actually responding to "haters" or think that it makes me look unconfident. I don't agree. Giving/taking criticism is a 2-way process and I used their almost purposeful misunderstanding of my program to demonstrate some principles about it which helped the flow of the video. Maybe other UA-camrs ignore or pretend to not be affected by criticism at all. This is not me. I accept all criticism, I don't delete any comments and I actually take *action* if I receive good criticism from my viewers. If I get poorly thought out criticism though, I will respond to it because I am confident in what I've implemented and I think it's a worthwhile conversation to have. I don't think these Reddit experts were simply trolls trying to make me upset. They had a right to criticize or interpret my work, and I am simply correcting and informing them and I would never take away their right to comment on, disagree with, or criticize my work.

    • @iarmycombo5659
      @iarmycombo5659 2 роки тому +10

      When will we see collaboration with Trackmania?

    • @clemdemort9613
      @clemdemort9613 2 роки тому +3

      @@iarmycombo5659 lmao best engine sounds what are you saying ;)

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

      @@clemdemort9613 I've *heard* they aren't that great. (Pun very much intended)

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

      @AngeTheGreat Is it possible to simulate various guns sound that way?

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

      Great work! Could you please add the link to the other video where you discuss the rigid body simulation part to the description?

  • @Teeh0
    @Teeh0 2 роки тому +1665

    "Reddit Experts" I felt that. Nothing more frustrating than having something *you built* incorrectly explained to you by someone who's never even looked at the code.

    • @mathewrudnicki6518
      @mathewrudnicki6518 2 роки тому +94

      They are the ultimate “trust me bro”

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

      When reddit first appeared there actually were experts there. Much like slashdot. But these days, mostly only knuckle draggers walk there as most intellects have long since left. Especially given the sociopolitical environment, large numbers of bo[o]ts, and the crazy moderators who exist for specific sociopolitical reasons.
      There are no experts on Reddit these days. Only those who pretend to be so, bolstered by a corrupt system design to control and manipulate people. Much of which applies to yatub too.

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

      Making my point, yatub sin sored my previous comment which said nothing but truth.

    • @jonsen2k
      @jonsen2k 2 роки тому +55

      I kind of feel like such experts often are the ones who know just enough about the topic to notice the simplifications of it (or even just the deviations from the curriculum), but don't understand the reasons why it might not even matter.
      And I guess most of them also like to throw fancy terms left right and center to scare laymen away and feel superior.

    • @nomekop777
      @nomekop777 2 роки тому +51

      @@jonsen2k it's reddit. It's definitely just for the sake of feeling superior

  • @BrooksMoses
    @BrooksMoses Рік тому +108

    Former Mechanical Engineering grad student here, who got a Ph.D. in fluid mechanics with an advisor who specializes in internal combustion engines, so I may have a little bit of expertise to pass judgement on this. This is, no question, a simulation -- and one that is, IMO, very well done. As my advisor often said, "All models are wrong. Some models are useful." The trick is to choose the level of approximation (i.e., wrongness) that is appropriate for the answers that you want, and while this has a lot more approximation than the full 3-D fluid simulations that an engine company might use, you're also not needing their level of precision in the answers. This is useful for what you need, ergo it is a successful simulation.
    The one "big" thing that I note that would separate this from what some people might judgmentally think of as a "real" simulation is that you haven't tested it against experimental data except in a sort of broad sense of "these numbers are about the right magnitude". It would be interesting to compare the simulated exhaust velocities and such to actual ones to see how close the model actually is in computing those. That would also give you an ability to multiply some of your flow equations by experimentally-derived "correction factors" to account for the fact that the flow doesn't precisely match the simplified model -- for instance, perhaps typical cylinder geometry gets 95% as much scavenging as you calculate or something. But that's a refinement, and IMO there is nothing wrong with an "a priori" model like this.
    For simulating the turbulent noise, random noise is almost certainly the best choice. To be most accurate, you probably want to "color" the noise by having different average amplitudes at different frequencies rather than using plain white noise. I don't think there's a good way to calculate the coloring other than using parameters from an experimental recording -- which is basically what you're doing in a very rough way by a "does this sound about right?" adjustment, and given the small amount of difference it sounds like it makes, that amount of accuracy is entirely sufficient.
    I am also reminded of one of my dad's career successes in his Mechanical Engineering Ph.D. back in the 1960s. He was working on simulations of turbulent flow next to the walls in a nozzle, and the "most advanced" state of the art at the time was complex 2-D computations. He found that, by using a much simpler 1-D approach that used experimental data more heavily, he could produce notably more accurate results than the 2-D computations. So more-detailed does not always mean more accurate!

    • @AngeTheGreat
      @AngeTheGreat  Рік тому +37

      Thanks for sharing your knowledge! I would absolutely love to get some decent equipment and test the simulation against real data. In fact, it's something that I may actually do as the simulator develops. Part of the problem I had while writing the simulator is the lack of experimental data, or at least, experimental data that is easily accessible online. There's also a notable lack of experimental data on the more "non-essential" elements of engines. For instance, finding a research paper on "cam chop" seems to be pretty challenging and I wasn't able to find many satisfactory scientific explanations for that phenomenon. In any case, perhaps as more knowledgeable people such as yourself learn about the simulator and contribute their knowledge, those gaps can be rectified. Thanks for watching!

  • @AJMansfield1
    @AJMansfield1 2 роки тому +729

    13:00 If you want a turbulence noise with more solid theoretical grounding, you could instead calculate the vortex shedding frequency of each vessel from its diameter and bulk velocity. (Then, integrate instantaneous frequency to get phase, and use the phase to calculate the amplitude; OR just apply the frequency as a bandpass filter on your white noise.)

    • @AngeTheGreat
      @AngeTheGreat  2 роки тому +318

      Sounds pretty cool, I'll definitely have to look into that

    • @RamenPoweredShitFactory
      @RamenPoweredShitFactory 2 роки тому +320

      This is one of those comments I read and understand nothing of.

    • @JuniorJunison
      @JuniorJunison 2 роки тому +26

      @@RamenPoweredShitFactory mainly because it requires knowledge in high level math like calculus

    • @evilspoons
      @evilspoons 2 роки тому +78

      @@JuniorJunison Calculus isn't that high level (at least, it shouldn't be, it's not that scary and we should stop treating it as such on a societal level), it's just the foundation that all the engineering concepts start from.

    • @recoverhealth2062
      @recoverhealth2062 2 роки тому +15

      @@JuniorJunison you need math to understand what a vortex is?.
      A fluid getting compressed creates a vortex if it has anywhere to escape while compressed, your kitchen sink makes a vortex, a seringe makes a vortex, toilets make a vortex. This is middleschool physics tier of knowledge.

  • @DefectiveCujo
    @DefectiveCujo 2 роки тому +340

    Honestly as a mechanical engineering student having dealt with and dealing with fluid mechanics your comprehension and use of the formulas and concepts aren’t sacrilegious in any manner. You did what all of us engineers strive to do. Take a complicated concept and simplify and propagate it in a manner best suited for the project you are working on given the complexities of the material.

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

      Yes, it is a very simple model and I would have approached it completely differently, but the results speak for themselves

    • @w花b
      @w花b 2 роки тому +4

      @@fg8557 if it works, It works.

  • @Dr.Observation
    @Dr.Observation 2 роки тому +68

    Clicked to see cool animations...
    ...learned how a refrigerator works, epic!

  • @purplepurplesaurasne
    @purplepurplesaurasne 2 роки тому +250

    I am amazed at how complex yet understandable this all was, thank you for all of this fascinating stuff and glad you are getting some recognition for your work.

    • @AngeTheGreat
      @AngeTheGreat  2 роки тому +26

      Thanks! Glad you liked the video :)

  • @bodanerius
    @bodanerius 2 роки тому +178

    I dont care how accurate this is or how good the engine manufacturers simulations are. This is so freggen cool. I love this project.
    If I picked up one thing from your impossible engine simulation. Its that part of the sound of an engine its that its not perfectly balanced.
    So if you can somehow include minor imperfections and/or insimilarities between cylinders in an engine. It would probably sound more lifelike.
    Keep it up 😎

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

      i had this idea to purposely misalign the crankshaft. Instead of 180 for 4 cylinder, vary between 178 and 182 degrees.

    • @MajatekYT
      @MajatekYT 2 роки тому +17

      Yeah, this is definitely getting into the realm of the physics and gas simulation engine being "too" perfect, whereas in real life there's piston seal leakage, gear teeth backlash, timing belt stretching/slipping, and all sorts of other nasty vibration that causes wear and tear with real-life engines.

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

      @@MajatekYT but it will take long to implement that because consider like the materials that combined to become part of that engine. it can create the simulation engine perfectly like timing, gear, etc, but the rest of them do it in real life

  • @AJMansfield1
    @AJMansfield1 2 роки тому +197

    I really admire how you're able to explain how this works without it feeling dumbed down, and I'd absolutely love to see more. (Perhaps even make a SoME3 entry out of your engine simulator work when that rolls around next summer?)

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

      now that i think about it, i'd be surprised if Grant never came across one of these engine sim videos. they'd for sure make for an interesting submission to SoME

  • @thomasenglish8169
    @thomasenglish8169 2 роки тому +254

    This guys work will truly be the big breakthrough racing games need. Excited for the next step forward!

    • @JasonBeo
      @JasonBeo 2 роки тому +22

      I really really doubt that we have the hardware to run such complex engine physics in racing games just yet. Keep in mind that most Racing simulators like Iracing, ACC etc, run their physics around 400-500HZ in order for hardware and netcode to be able to keep up. We still have a Loooooong way to go until such complex engine simulations can be used in a racing game.

    • @FlaxTheSeedOne
      @FlaxTheSeedOne 2 роки тому +34

      @@JasonBeo True but this allows to get sound for engines way more accurate than before possible. Even if they aren't simulated in game, but pre recorded and played back.
      Or have a Model that sits somewhere in between.

    • @JasonBeo
      @JasonBeo 2 роки тому +22

      @@FlaxTheSeedOne It might work as a middleware that generates the sound true.

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

      @@JasonBeo Like how NatualMotion's Euphoria improved ragdolls. We can dream.

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

      @@JasonBeo it doesnt need to be the full sim itself, you can just use the sim to generate the sound and use the super clean samples to work on. I think someone already utilized this for an ac mod, I think I downloaded it but I forgot the name of the car, I can look it up if anyone is interested

  • @mimisaiko
    @mimisaiko 2 роки тому +53

    The way you tried to make it sound more "real" or organic,
    is really similar to how sound designer do with synthesizers.
    Add randomness and noise then it won't be as digital and clean haha.
    Great video, never mind those people speaking things anonymously.

  • @wuiss__._
    @wuiss__._ Рік тому +7

    People: how does your program that makes vrom vrom noises works
    Ange: *proceeds to do a university class on mechanical engineering*
    Loved it

  • @RC-1290
    @RC-1290 2 роки тому +221

    Do I understand correctly that you're using EQ to boost the high frequency signal, to make it less muffled sounding?
    Have you tried adding harmonics for the high frequency sounds? For example with a saturation filter?
    As if the loud sounds vibrate other parts of the engine, with different kinds of sympathetic frequencies.

    • @LarsWilms
      @LarsWilms 2 роки тому +7

      He does have a clipper at the end

    • @RC-1290
      @RC-1290 2 роки тому +5

      @@LarsWilms true, though I'm not sure that's the kind of saturation you would expect from an engine

    • @alexthi
      @alexthi 2 роки тому +23

      From a physical standpoint, this makes sense even without considering mechanical vibration, since acoustic propagation at these pressure levels is nonlinear: the waves travel faster in the high pressure zones than in the low pressure ones, causing gradient steepening and spectral enrichment. A simple setup to take it into account would be a variable delay filter, in which the delay depends on the signal itself.

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

      Not sure if that would really give you a better result.
      If you work with high pressures, air acts more akin to a compressor, as you have some base inertia from your particles, and compressive properties where part of the acoustic energy is converted to heat due to friction or pressure differences in the air.
      So while you do get changes in dynamics from the air and elements around the engine, it wouldn't really saturate the sound, as the changes in dynamics happen on a larger timescale than 1 single cycle.
      Beyond that, the main issue that's being corrected here is the overall spectral shape of the sound, while keeping the waveform mostly intact.
      If you distort the signal, you won't really shift the spectral centre in any major way (this refers to the overall shape of a sound when viewed in a spectrogram). This is pretty important to how our ears perceive "dark" or "bright" in a sound, so an EQ would work better here.
      Last but not least, if you actually wanted to simulate the way the engine resonates by the sound, you would still use a convolution impulse for this. The harmonic frequencies you generate would be harmonic frequencies of the object that is being excited, not the signal that generates it.
      So having harmonic distortion on the engine rawr itself sounds somewhat unnatural (at least from my theorising and testing I just did).

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

      Saturation would help the "click" feel less digital for sure

  • @AJMansfield1
    @AJMansfield1 2 роки тому +32

    For the EQ stages, there's a definite physical justification to boosting the high frequencies if you consider the way the thin walls of different exhaust components would couple interior and exterior pressures, blocking "DC"=exhaust leaks while allowing high frequency. And if you want, you can absolutely derive "realistic" frequency response curves from first principles by finding clever ways to treat everything as a damped spring-mass system (or an LCR circuit, since it's the same math).
    For a thin-wall exhaust tube, the mass term can come from the material's area density and the spring term from hoop stress calculations; for a solid engine block the mass term can come from volumetric density and the spring term from hertzian contact stress mechanics. For either, the damping term comes partly from mechanical properties and partly from the exterior surface area vibrating and getting pressure+cavitation drag.

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

    Anyone else notice how his voice has sounded a lot higher and happier at the start of each vid? I think this is a big morale boost for him, keep it up folks! Keep it up AngeTheGreat!

  • @charliemaybe
    @charliemaybe 2 роки тому +10

    You know understanding the way an engine works is cool and all, but the fact that this man just made this level of simulaton perform as good as it does, is just something else entirally. Round of aplause for this chad that made this with his absolute dedication and knowledge of engines, coding, and physics.

  • @fishercawkey
    @fishercawkey 2 роки тому +7

    This is one of the most superb videos I've watched on UA-cam, describing one of the most superb computer applications ever written by an individual (in my view). I could go on and on but instead I'll point out how you only spent a moment saying something that I believe is super important: your goal was to make something that sounds realistic but runs in real-time on consumer hardware - i.e. purpose + audience = application. I have an aeronautics background and have thought for many years about writing flight simulations (I created one back in 2006 and published it as first author on an AIAA meeting paper) -- the idea that "the more realistic I make this, the more people will find something to critique" can be debilitating. But ultimately, I see you've done something for enjoyment, because you thought it was cool -- I truly respect that, and to hell with them haters!

  • @veaxvoid
    @veaxvoid 2 роки тому +8

    Man pls don't listen anyone who says bad stuff this is insanely good and amazing job overall, as a fellow programmer I can appreciate a good real time simulation when I see one.
    And the sound is just unbelievable.
    you know what? it would make an insane FL plugin lol~

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

    I made a VST version of this core idea in 2012, but credit where credit is due, I did not build a full-on physics modeling engine, but rather condensed the conceptual functions of an ICE engine to work within the framework of a musical synthesizer. It's been interesting to watch the development here and the open-market uploads of various users' different engines, because I can see and hear the exact same issues I had to work through to get mine more accurate over the (admittedly quite long) time it took to develop into the fully-featured product I brought to market. Seeing this newfound interest (or perhaps just latent interest that I never tapped from lack of adequate advertising?) has made me consider picking up development again. Either way, impressive product so far for sure, and I hope you're able to further refine the model to get a more accurate response/sound out of this program than even what you already have.

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

    See, I just love the fact that this was done -SPECIFICALLY- in the quest for realistic engine sounds. Not for like a full realistic engine simulation or anything, just to get the sounds right... but along the way it just morphed into that, and when you think about it of course it makes sense. What better way to generate a realistic engine sound from a handful of variables than to simulate the entire engine? Because all of it has an effect. Flat plane cranks sound far different than a cross plane. Cam lift duration will change how an engine sounds. The length of the headers, the firing order, all of it... and I'm thoroughly impressed at just how close and good it is, even in this form. Honestly can't wait to see how this tool evolves.

  • @joaolucamendes5503
    @joaolucamendes5503 2 роки тому +46

    Ang, how many hours does your day have? 36?
    By the way, the fact that this video feels like an animated termodynamics course is mind-blowing.

    • @BrooksMoses
      @BrooksMoses Рік тому +3

      Doesn't it, though? I'm sending it to my thermodynamics professor so he can get some ideas from it. :)

  • @TropicDaKid
    @TropicDaKid 2 роки тому +7

    Bro accidentally started an entire trend/community out of pure curiosity

  • @ralfszemzars1885
    @ralfszemzars1885 2 роки тому +3

    To me, the most amazing audio that comes out of your simulation is engine braking. I have not heard a better "sample" or simulation in any game on deceleration, as well as transient throttle inputs. Nothing comes close, and you hit the nail on the head when you mentioned that those are the things that we listen to and intricate details add to the realism.
    Thank you for the explanation!

  • @gabrielv.4358
    @gabrielv.4358 2 роки тому +7

    really REALLY Amazing!! But there's one thing to consider: The engine itself makes noise, the inside parts make sound too, the valvetrain, and such. Still, Amazing program!
    Edit: I never thought I would ever see anyone make an really accurate engine simulator. You made it. You're a legend. Congratulations!

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

      Another sound when shifting the piston in dead spots.

  • @БогданСкулимовский
    @БогданСкулимовский 2 роки тому +11

    Gosh, It is so beautiful. The code you write the sheer size of your project, and how you visualise that, it is just beautiful. I do also enjoy reinventing things and diving into the details of how stuff works, and then implementing it with code, bu I still cannot build something as big and complex as a 3d renderer. I really admire your work. Thank you for the videos!

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

    This is the stuff modern racing games need! The engine sounds like a Ferrari without even having samples!
    I love the idea that you can reproduce the engine sounds with just maths and physics.

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

    Fluid mechanics expert here. You’ve done a great job here. Computational fluid dynamics software is a real mess. It’s often crazy expensive and awkward to use or free and open source and even more awkward to use. The results are often garbage and require a lot of experience and expertise to be useful. For students the whole experience is painful. They struggle with the user hostile software and barely get something basic to work in the end.
    A tool as accessible and dynamic as yours would make an incredible teaching environment. Same for BeamNG.
    So in a sense this is revolutionary.

  • @captainbanglawala2031
    @captainbanglawala2031 2 роки тому +54

    Hi Ange, can you make a video explaining how the physics engine works? When they start talking about projected Gauss siedel methods my eyes just glaze over. I've tried reading the Baraff papers but not easy to follow

    • @AngeTheGreat
      @AngeTheGreat  2 роки тому +24

      I did make one already but it doesn't cover the Gauss Seidel method in detail. I believe Engine Simulator uses a gradient descent solver for the physics

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

    As a non-expert in anything you've created for this program, I can honestly say you sir are 100% legit. Its the internet, there are people that will kiss your butt saying how this sim changed their life then switch accounts and make another comment about how your ancestors are ashamed and you should find a short pier and take a long fuck off it. Dont forget, the positive comments come from people who just happen to have the time and motivation to comment, vastly more people could very easily be geeking out over the two engine types videos (as I did yesterday, and I dont think I commented because I didnt really have anything to say at the time) but not commenting. Then there is the internet hate brigade that is always fired up to author a fresh dissertation on whatever they can reason as context for keeping your ego in check, and they love commenting back and forth to each other. And there is the volume boosting effect of the vocal minority and their vitriol, magnified by bandwagoners. The negative crowd ALWAYS seems louder and denser than the interested/positive commenters crowd, while most people at the very least are going "huh, cool" and on to the next video. Dont let those negative comments drag you down, especially when the view count to negative comments ratio is on the scale of mountain to mole hill. Rest assured, this is one internet weirdo whos pants have been efficiently blown off never to be seen again.
    Also, I know coding aint easy, even when you've done it for a while. Getting all that to run in essentially real time is no small feat. A quick glance at any app/game store will prove people have asked far more compensation for magnitudes less effort. From one nerd to another (I assume you identify as nerdy on some level, as we all should feel comfortable doing about the things we nerd on) Thank you. Thank you for your time, effort, sharing your interests and knowledge, for sharing what you have created with the internet at large. You and this project are a shining example of what the internet, as a community, is supposed to be about. Make something cool, share how you did it, and allowing/enabling others tweak and tween it to their whim without losing scope on your goal.
    Seriously, thank you.

  • @tunatuna8877
    @tunatuna8877 2 роки тому +7

    Mechanical Engineer here. Everything you said about fluids was spot on. But man, if you can take the same concepts and apply it to compressible flow/supersonic flow that would be incredible. Imagine all of the cursed wing designs, intake designs, nozzles, shock waves, etc etc. Or procedurally generated fluid dynamics in flight simulators including vortices and vapor.

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

      I was thinking about how the video only shows the "choked flow" equation for a moment -- it made me think of how easily flow can become choked in small openings under large pressure differentials (ahem throttle bodies and engine valves). Though, I wonder what such choking actually means for the sound 🙂

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

      ​@@fishercawkey I believe he showed non choked flow (first eq). I actually never thought about the speeds of flows through ICE's and how close they come to mach 1 or even into the compressible region. Definitely something I will read into!

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

    Take it from someone who spent over 20 years in the auto OEM engine development business, with names most will recognize immediately, your simulation is f-ing ace! It's probably more than good enough to do some scoping work at a conceptual level for a real world engine development project if you were after a certain type of sound. It probably also generates a more accurate power and torque estimation than most garage dynos that people use for their modification willy waving. I salute you sir!

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

    People on Reddit were doubting the veracity and authenticity of this simulator? Shows how much they (don't) know! It's clear that it's still not a "perfect" simulator, as far as the audio generated vs the genuine article that it is simulating, but it definitely is producing audio that has the same distinct characteristics of the actual motors and engines themselves. This engine simulator and the audio synthesizer are REALLY cool, and the sheer novelty and ingenuity are something to behold. I think the work done here was well worth it for the result produced, and AngeTheGreat accomplished what he set out to. If someone wants to go write an individual molecule or even macro-particle simulator that does the same thing, I challenge them to. At the end of the day, a simulator will never produce the same exact effects or results of the actual thing that's being simulated, that's why it's a SIMULATOR. I sorta feel like this video wasn't warranted, at least anywhere it acknowledges the jealous naysayers, though I did enjoy more breakdowns of the internals but I fear that their presentation was motivated out of frustration with the dingdongs with internet access, rather than by passion like the previous videos were. Nobody doing awesome stuff like this needs to be wasting their time or mental energy on recognizing the morons who will never do anything anywhere near as neato or interesting. Anybody can say anything on the internet, and as such morons will say moronic things, it's inevitable - there's no avoiding it, so you just gotta take it in stride and not let it affect you.

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

    This is probably the coolest thing (from a programmer's view) that I have seen the last 10 years!

  • @AHSEN.
    @AHSEN. 2 роки тому +2

    The rest of your videos are so awesome, you totally deserve a lot of subscribers. I'm glad this small project has allowed your channel to grow so quickly :D

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

    I don't care at all about engines and their simulation, but your approach to generate sound is awesome as heck. Real-time procedural realistic audio generating has almost infinite potential and amount of use cases.

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

    Damn, think I could watch 5 hours of this guy talking about mechanics and software. This engine is awesome, never seen a tool so simple work so well

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

    Maaan thats nuts, great job around the audio. Implementation of sounds for real engines is the most difficult task in game audio imho. Absolutely stunning. Thank you

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

    holy shit. I've been sort of learning the ins and outs of digital audio workstations for 20 plus years, but what you have shown here is something like the next generation of physically modeled synthesizers. astounding

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

    The showcase video already was very impressive and inspirational but this one is straight-up a true work of art. As an applied mathematics engineer I can only appreciate this accomplishment even more

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

    this one 20 minute video has taught me more than the half a year ive spent at college

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

    Lovely, this is exactly what the first video had me yearning for. Great work!

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

    I simulated a guitar sound in a similar way, by physically modeling strings with particles and translating their vibration into a waveform.
    the most interesting takeaways are that it's particularly hard to pluck a string procedurally without introducing a sharp release sound that sounds like metallic clanking, but it's curiously easy to stimulate rock-like distortion by literally clamping the output signal.

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

    This is the best video I have watched in ages. Concepts were explained with an effortless almost lazy clarity that just clicked. You are an inspiration, my good sir.

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

    This is amazing, now put the output through that impulse converter a few times to simulate the engine bay and the room the car is in and you've got yourself a very convincing engine sound

  • @nn-wm2un
    @nn-wm2un 2 роки тому

    Hey man, I have to say I am impressed with your work. Great stuff, truly. Keep it up. I am going to download and play with Engine Simulator for many hours!
    Cheers from a mechanical engineer, fluid dynamics simulation specialist, former Honda engine plant guy.

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

    you went from a causal c++ enjoyer to being a on motortrend. that’s impressive

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

    I just think it's crazy that he just kind of popped this little thing out and was like "oh hey look at this cool little thing I did do you like watching it? Lol" and pretty much the entire online automotive community collectively exploded. (Me included) really cool project and I can only wait to see what you come up with next. Looking back at your other videos I've even enjoyed the other ones you were making before this.

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

    Every new video blows my mind. Hoping to use your simulator in Unity some day.

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

    I absolutely love the sounds, I'd love to see a mod for assetto corsa that uses sounds like these, cause all the default ones are pretty outdated

    • @peachulemon
      @peachulemon 2 роки тому +3

      I'd love to see a future where you can export your custom engines to BeamNG swap em into a car a let em rip.

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

    I love the way he describes all of the technical aspects as well as the physical aspects.
    I've had trouble understanding engines for the longest time.
    Subscription earned!

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

    This is the coolest shit, it's what I'd dreamt of making when I was younger and first got into automotive engineering stuff. You're doing god's work

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

    First off, I love it all! Everything from the visuals and explanation to the voice over, it's all on point! I feel like this video could only have been made by someone who really knows and loves his craft. This video also shows that a regular human really can learn almost anything. Thanks for teaching me something new and interesting, made my day a little bit better! : ) (Side note: 13:31 I 100% agree LOL)
    12:55 From my experience, this noise is almost never truly "random" (but I think we both get that, moving on). Theoretically correct or not, this noise method is actually commonly used in music production when you are making a synth preset/sound etc. The reason behind this is almost the same as yours. The noise coming from an electronic synth can in a lot of cases sound too perfect, sterile and electronic. By adding noise into the mix you make the synth sound more natural and warm (in a way faking how an analog synthesizer would sound). I sometimes use this technique myself when making a preset. (there's obviously more to noise than this but it's the basics)
    13:39 When I see this I wonder a few nerd things (sorry if this is a lot).
    1st: What bit depth and buffer size is the program "playing" at if you know (both before the "upsampler" and at the finale output sound, if there is a difference)?
    2nd: What noise is the "Noise Generator" generating? (Is it just regular white noise or something more complex?)
    3rd: What "settings" are you using for your "low pass filter" (what frequency does it filter etc)?
    4th: What compressor type is it (multi- or single band etc), and what "settings" are you using for it (if it operates like a regular compressor that is)?
    Again, thanks for the cool video, I love it, and thanks for reading this!

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

    Way more interesting than expected.

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

    That recorded and posted tag underneath the sub count is neat. Very clever

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

    man, ange. you're like a teacher or something. im literally taking notes while watching this so i can understand this simulator.

  • @consuminhelium3346
    @consuminhelium3346 2 роки тому +3

    Amazing stuff dude! Love the more technical breakdown

  • @Niro_sounds
    @Niro_sounds 2 роки тому +3

    Lol you making the bonehead engine sounds is basically me on serum/phaseplant (vst) some days. Love that you share this knowledge

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

    Holy crap dude, I was already amazed enough about what you've been building and presenting and thén you casually started discussing the heat cycle in refrigeration using your model. And then it just kept getting better and better...

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

    I think using the ideal gas model was a smart idea for your air pump simulation, considering that atmospheric temperature and pressure is already well past the saturated vapor line on a T-v diagram, but since refrigerators operate so close to the saturated vapor line, and commonly transition into the liquid/vapor mixture dome, you won't get any meaningful/realistic behavior out of modeling refrigerants using the ideal gas model. Other than that, I am glad you spent the time going over how you condensed undergrad level engineering material into a nice and clean piece of software. Very good job.
    I bet you that car companies model their engines by solving the navier-stokes equations repeatedly for each cylinder, one degree of rotation at a time, for each each stroke, which probably takes hours for them to compute just a complete cycle of all cylinders. You are able to create meaningful and semi-realistic engine behavior in a matter of milliseconds of time. That is so freaking cool!

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

      The refrigeration cycle shown in the simulation is not the same as the one used in typical vapor-compression systems. Refrigeration can be achieved without any changes of state, but is less efficient. What I show is gas-cycle refrigeration which is a rarely used but still viable method of refrigeration and does not use phase-changes or any special refrigerant (air being the refrigerant). Gas-cycle refrigeration systems are also slightly different from the one shown in the simulation and typically use an expansion chamber or turbine to reduce pressure as opposed to a nozzle but I wanted to keep the demo as simple as possible.

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

    Can we all appreciate how the background for this program and the video is in dark mode? A lot of youtubers seem to not care about our nightly eyesight

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

    The future for racing games is looking pretty bright

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

    Lol I can never figure out how to type out these but you truly are one of the best creators on UA-cam in my opinion

  • @8curred72
    @8curred72 Рік тому

    Tons of thanks for the insight on how you achieved the sound! I'm interested in achieving realistic engine sounds digitally and your video definitely cleared the path

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

    I have a suggestion regarding the sound design, which may or may not produce the "higher partials" you're expecting. At high acoustic pressure levels, sound propagation is nonlinear, meaning that higher-pressure zones travel faster than low-pressure zone. This causes them to "catch up", steepening the pressure gradient. If the tube is long enough, it may even lead to shock waves: these have been observed e.g. in trumpets using Schlieren imaging, and I suspect that some motors may produce them as well.
    My suggestion is therefore to implement a nonlinear filter simulating this effect: assuming that the waves only travel in one direction, it can be represented simply a variable-length delay, for which the delay length depends on the pressure level (i.e. on the signal itself).
    For more info the keywords are "weakly nonlinear acoustics".
    Cheers!

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

      Also note that the pressure waves radiated by the end of a small tube into outer air can be quite different from the waves traveling inside the tube due to the impedance mismatch. This may explain your need for a high-frequency boost.

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

      This is actually a very interesting point and I'll definitely look into this. Thanks for sharing, really appreciate it!

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

    Just found this today, I'm going through these videos, the only real flaw I see in how the audio is generated is you don't have all of those nasty little bits of reality interjecting into our perfectly running engine, inconsistent fuel, hotspots in less than perfect mass produced engines, rattling in the muffler because it was a rough fit for a dozen models and not a perfect fit for any of them, resonation for various reasons from the exhaust.
    You have the ideal engine, reality introduces all of the problems. Of course all of this makes the engine sound cooler.

  • @jaredloveless
    @jaredloveless 7 місяців тому

    Fascinating! I came here because I'm searching for audio simulation. Really cool.

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

    Hi, this is a comment complaining about the use of imperial units in your videos!

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

    this is beyond beautiful. perfect or not... it sounds amazing.

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

    The best aspect in this is you seamlessly combined an engine simulator with an imbecile detector.. both work greate! and using the same code! you are a genious!

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

    great video as always, a tip to reduce youtube artifacts on the particles (eg 6:10) is to upscale, render and upload to youtube in 4k. The compression algorithm is way less harsh with 4k video, even when you are playing it back on 1080p

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

    The Sanford and Son reference was not lost on me. Good chuckle. Great vid!

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

      Haha it's one of my favorite moments in the show!

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

    I'd loose my job for sure because I'll simply sit and mess with this for days. Awesome!!

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

    Next project - sound synth/instrument simulator ;)
    I love synthesized sound generation projects :)

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

    This is a really cool project. Have you thought about simulating fuel/air mixtures burning in the exhaust and expanding to change exhaust pressure and therefore exhaust sound? I think that has potential to add something to the simulation that's currently missing.

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

    Actually pretty informative, I have a new understanding of how air moves. Thank you!

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

    Obligatory comment about how I really feel the need to complain about using PSI for pressure.
    Seriously though this is amazing.

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

    This has to be inluded in modern racing games

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

    This is awesome. I love tampering with engine design, but some things, we just don't have the time and funding to do. This solves that quite well! Thank you! I never really understood programming, so I will attempt to use the program. Wish me luck!

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

    How you explained convolution was amazing!!!

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

    FLUID simulation. For ENGINE audio.
    You are out of this world, holy crap

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

    Regarding the peculiarities of the sound of pipes and valves, you can read about the study of the simulation of wind instruments and organs. For example organteq does a good job of simulating the sound of organ pipes. An organ has pipes and valves. There is a lot of research that the creators of organteq rely on. There, the features of the movement of the air flow in the center of the flow and near the walls of the pipes are studied. The swirls on the valves are also investigated. And how it should sound. You may be able to find some additional information there to refine your simulation.

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

    When I learned PV = nRT, we had to first derive the equations ourselves. Obviously guided by our Physics teacher. It was a pretty fun way to learn this.

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

      It would be nice if they taught it this way all the time, it probably would have made a lot more sense to be back then. Thanks for watching!

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

      @@AngeTheGreat Your video is really inspiring. I really want to make my own fluid simulation using ideal gas law now.

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

    Hah, this is pretty dang cool. I didn't really read the topic before i started and i was like: Hey, he seem to like audio stuff, took a hot minute until i understood that was the whole point haha. Sounds amazing!

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

    OH! I just noticed my name in the credits! WOW! Also I'm definitely pre-ordering fridge simulator!!

  • @k.c.maclachlan3227
    @k.c.maclachlan3227 2 роки тому

    God damn this thing is cool. The UI is awesome, delightful to behold. Well done!!!

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

    Now this is the sort of programming I like

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

    I develop induction systems for race engines. I feel like this program has a ton of potential. The fact that you understand air flow this well is amazing to me. Only a small amount people understand engine airflow this deeply. I would be intrested to see if you could develop port designs/sizing with this program. If you are intrested I can give you specs of a head and intake port/ plenum design and we could compare the results to a flow bench to check for accuracy(my work has a sf-1020). If this would work you would make my job so much easier. You could run simulations of customers exact engine set up and fined the best port sizing and shaping for the application.

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

    People don't realize how much of every single game, simulation and graphics implementation is total smoke & mirrors. Having to add so many disclaimers about your product feels extremely silly to me as an engineer who has written a ton of game, graphics and simulation code and knows how much total made up nonsense there is behind the curtains. In fact, this is one of the most accurate and impressive implementations I've ever seen. It's not perfect, but it's way ahead of the curve and amazing for a real-time application. Thanks for sharing this so kindly and candidly, and especially for giving the code away for free for everyone to learn from and help improve!

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

      Also.. it's just damn beautiful. Love the style!

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

    this man has went from created his own engines as a hobby to starting a physic simulation company

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

    the problem is very interesting and the solution is very well applied. I loved your project and am waiting for future updates.

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

    It's definitely not a scientific simulation. And even modern CFD simulations are not capable of capturing the full complexity of the turbulent flow and flame propagation (As far as I know of ). But it solves the problem it is intended for, which is what counts.
    To make things a bit more accurate you could treat the intake and exhaust manifolds using a simple PDE in time and position along the "tubing". In this manner, you could capture shocks, waves, and wave reflection at the in- and outlets. These are important as they can increase the volumetric efficiency of the engine.
    However, even that would be infeasible at 85k fps. So I think you got the best possible solution, given the problem you set out to solve

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

      I was planning to look into that approach for the exhaust and intake, but whether or not it makes it into the simulation depends on performance of course

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

      @@AngeTheGreat There are numerical schemes based on the method of characteristics for the hyperbolic PDE you need to solve, which are very efficient. Maybe it is doable, I'm looking forward to seeing what you come up with!

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

    I wish I could learn thermodynamics for the first time again like this…hope someone can see this vid because of the engine memes, but leave with a great intuitive basis for this stuff :)

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

    I think you have done a pretty good job. Software is not my thing, but I do motor sport as a hobby. I do know that different inlets, carburetors and forms of aspiration do change the overall sound of an engine i.e full throttle under load, idol, cruise and engine braking as you mentioned. Inlet manifolds are designed with pulse wave from closing inlet valves in mind for example. I know by experience that at high engine speed with side draft carburetors you can get fuel mist coming out of the carburetor's velocity stacks. So to be able to simulate the exact sound of every engine configuration would be impossible. And exhausts vary. In saying that you are very close. Job well done. I doubt you would have time, but I have an engine configuration i would love to hear if you want to try it. Cheers, Nev.

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

    I'm in no way able to understand the maths exposed here, but the sound is fucking delicious! Awesome work mate.

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

    This is sort of how I've built up an intuitive understanding of fluid dynamics, with particles bouncing off of walls. It feels super validating to see it spelled out like this lol. I still need get my head around how changing the volume works, I guess it's fighting with or against each particle that hits the wall? I dunno, I'll think on it more

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

    This is just amazing, thanks for sharing your work in such a manner, great explanation of simulations in general and yours specifically.

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

    Jesus Christ, I think you've created something incredible here. Amazing work ! and thanks for sharing it with the world.

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

    are you kidding me? this is incredible. Holy ... :O I am in awe and in love, this is something I would love to do. I have to get to reading, hope I've got the time!

  • @DogeRAM-no8pj
    @DogeRAM-no8pj 2 роки тому

    I am a "expert in fluid dynamics" (In "" because I work with chemical reactions mostly) and I'd say it's pretty spot on what you did (for this use case of course). About the white noise thing, It's true there is some white noise irl but I IMAGINE it doesn't come directly from the turbulence, but from the interaction of the air molecules with the inperfect surfaces inside the engine, ie friction, probably most of it coming from parts like the manifolds flanges. The turbulence of course plays a role in it but it's not the full reason, but the way you implemented it does the job just fine, I also imagine simulating that would be a pain in the butt.

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

    This video is great, dude! I started watching expecting most of the content to go over my head, but your explanations are very easy to understand.