I Tried Recreating Counter Strike 2's Smoke Grenades

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 พ.ค. 2023
  • Get 20% Off + Free International Shipping with promo code ACEROLA at
    mnscpd.com/acerola ! #ad
    Counter Strike 2 releases soon and it comes with some very innovative smoke grenades! But, how do these smoke grenades work? Why can't anyone properly recreate them? and can I crack the code?
    Topics covered include: Frame debugging, voxels, mesh voxelization, flood fill propagation, ray marching, volumetric transmittance, volumetric shadows, worley noise, phase functions, and signed distance functions.
    Support me on Patreon!
    / acerola_t
    Socials:
    Twitter: / acerola_t
    Twitch: / acerola_t
    Discord: / discord
    Code: github.com/GarrettGunnell/CS2...
    References:
    www.scratchapixel.com/lessons...
    bronsonzgeb.com/index.php/202...
    advances.realtimerendering.co...
    shaderbits.com/blog/creating-...
    iquilezles.org/articles/distf...
    Music:
    During The Test - Persona 3 OST
    Afternoon Break - Persona 3 OST
    This Mysterious Feeling - Persona 3 OST
    Fearful Experience - Persona 3 OST
    Just Like This - Persona 3 OST
    Soft Oversight - Sonny Boy OST
    GO!GO!STYLE - Paradise Killer OST
    Midori Eyes - Paradise Killer OST
    New Game - World Of Horror OST
    Junes Theme - Persona 4 OST
    Sandgem Town (Day) - Pokemon Diamond OST
    Prof. Omochao - Sonic Adventure 2 OST
    In a Moment's Time - Skullgirls OST
    Title Theme - Cooking Mama OST
    A New Frontier - VA-11 Hall-A OST
    Every Day Is Night - VA-11 Hall-A OST
    Neon District - VA-11 Hall-A OST
    Climactic Reasoning - Danganronpa 2 OST
    Thanks for watching!
    arrow in thumbnail drawn by thlurp
    This video is dedicated to my friend, Alotryx.
    #acerola #graphics #gamedev #unity3d #graphics #shaders #counterstrike2
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1.3K

  • @Acerola_t
    @Acerola_t  11 หลายเดือนก่อน +274

    Get 20% Off + Free International Shipping with promo code ACEROLA at mnscpd.com/acerola ! #ad
    As I announced at the end of the video, I am now a full time content creator! Expect videos to come out a little bit quicker with higher quality and less compromises on the project itself (I kinda bit off more than I could chew with this video lol). For a more in depth announcement check out my tweet: twitter.com/Acerola_t/status/1657244847068315648
    I'll also be starting up a real stream schedule, I really mean it this time! I'll be streaming monday/tuesday/thursday over on twitch (linked in description). I'll be streaming whatever I want so it'll probably be variety with intermittent dev streams when I feel like it. I'd really appreciate it if you stopped by! Twitch partner is pretty much my last goal in life.
    Thank you so much again for all your support.

    • @toolazytobeoriginal4587
      @toolazytobeoriginal4587 11 หลายเดือนก่อน +2

      Can you try recreating tears of the kingdom's abilities? Seem like a cool thing to try to figure out

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

      ​@@toolazytobeoriginal4587 he won't cause tears is just havok engine physics. There isn't much to recreate.

    • @illegalcoding
      @illegalcoding 11 หลายเดือนก่อน +1

      @@MaxIzrin Wdym? what did gilette do lol

    • @DonC876
      @DonC876 11 หลายเดือนก่อน +5

      Always a pleasure watching a new video of yours

    • @illegalcoding
      @illegalcoding 11 หลายเดือนก่อน +6

      @@MaxIzrin i knew it was gonna be transphobia

  • @DFYX
    @DFYX 11 หลายเดือนก่อน +1959

    Some thoughts about the voxel placement:
    1. Their examples for enclosed spaces might indicate that they don't limit the flood fill by a radius but by the total number of filled voxels. That would make sense physically since the contents of the grenade expand to a near-constant volume (assuming constant external pressure)
    2. Depending on the representation that the physics engine uses (for example bsp or octrees), real time collisions between voxel grids and the environment might not be too expensive.
    3. That would make it possible to use smaller local voxel grids around the grenades instead of a global one which saves a lot of memory.

    • @Sylvarus
      @Sylvarus 11 หลายเดือนก่อน +109

      Realtime collisions are required for CS because there are a few dynamic objects (doors/windows) that can be opened/destroyed.

    • @dmitriytuchashvili8594
      @dmitriytuchashvili8594 11 หลายเดือนก่อน +94

      ​@@Sylvarus I think they might bake the environment in chunks, and the chunks that contain dynamical objects will have several variations corresponding for different states of the objects

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p 11 หลายเดือนก่อน +38

      if source 2 is still quake engine under the hood, it might still used baked-in collision hulls, and there's not that much dynamic stuff which might need checking - until I see the smoke interacting with moving doors in interesting ways my bet would be they take the easiest possible way out there : p

    • @potatofuryy
      @potatofuryy 11 หลายเดือนก่อน +12

      ⁠@@user-sl6gn1ss8p Source two doesn’t use collision brushes anymore.

    • @Anohaxer
      @Anohaxer 11 หลายเดือนก่อน +25

      @@potatofuryy source 2 authoring tools don't use collision brushes anymore. collision brushes are nevertheless very efficient for static geometry, so they might bake all static collisions instead of considering them separate objects where possible.

  • @SokoBuilds
    @SokoBuilds 11 หลายเดือนก่อน +1304

    Wow, this took a lot of work.

    • @hypegaming5547
      @hypegaming5547 11 หลายเดือนก่อน +5

      True

    • @EvokerKing
      @EvokerKing 10 หลายเดือนก่อน +29

      took valve 10 years to make a second csgo, i now see why

    • @DebasedAnon
      @DebasedAnon 10 หลายเดือนก่อน +36

      ​@@EvokerKingAll joking aside a lot of people dont comprehend how hard of a tightrope walk remaking CS in a new engine is, any minor screw ups that affect the extremely refined gameplay loop will get more hate than most Triple A devs get for releasing absolute trash.
      To just make a CS game in source 2 isnt that hard, to make one that keeps the high skill mechanics identical while upgrading everything else and making sure none of it screws with said high skill mechanics thats where the challenge lies.
      Not to mention they had to make sure it was also extremely optimised and ran on a potato while looking nice.

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

      It is work

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

      It just works

  • @shayes.x
    @shayes.x 11 หลายเดือนก่อน +1223

    I know that you are literally a professional at this stuff, but it still breaks my brain that you made all this plus the entire video in like a month or so. Absolutely nuts, makes my week when you drop a new vid!

    • @aparato1993
      @aparato1993 11 หลายเดือนก่อน +49

      While working full time!

    • @whannabi
      @whannabi 10 หลายเดือนก่อน +9

      And not putting an ad every 5 minutes like some people do !

    • @simoncollins69
      @simoncollins69 10 หลายเดือนก่อน +20

      he wasted no time searching for high resolution images for the memes

    • @cumibakar10
      @cumibakar10 10 หลายเดือนก่อน +3

      He’s far from professional. An amateur hobbyist at best.

    • @deemp6773
      @deemp6773 9 หลายเดือนก่อน +12

      @@cumibakar10 you call this amateur?

  • @TheXientist
    @TheXientist 11 หลายเดือนก่อน +459

    personally i would have coded the smoke to have a set amount of voxels to expand, counting down from the total every time one is placed, completely ignoring the radius. this way you get smoke that entirely fills a corridor that is longer than the free standing smoke radius. though if you do this the elliptical nature of the voxel cloud is lost so valve must be doing something else as well, probably a combination of the two

    • @ChrisUG
      @ChrisUG 11 หลายเดือนก่อน +60

      you could modify the floodfill algorithm to not expand vertically (making it think its blocked) every x frames which would act as a sort of atmospheric pressure assuming it happens quick enough not to create artefacts.
      Or put some sort of chance element on vertical expansion

    • @Acerola_t
      @Acerola_t  11 หลายเดือนก่อน +319

      Yeah the more you try and solve this propagation issue to fill generic volumes the more you approach actual fluid simulation lmao so I kept it simple

    • @underdweller
      @underdweller 11 หลายเดือนก่อน +46

      I'm picking up that the more effort you put towards implementing it the more often you say "what the fuck, valve?"

    • @torginus
      @torginus 11 หลายเดือนก่อน +8

      I think that (and more) is perfectly feasible if you calculate the voxel fill on the CPU and just upload the thing into a compute buffer. Considering its not a huge amount of data, I think it's perfectly feasible.

    • @dthunes
      @dthunes 11 หลายเดือนก่อน +11

      Why don't you just use horizontal and vertical components for the counting function. Setting the vertical count limit smaller could create the ellipse shape.

  • @delayed_control
    @delayed_control 11 หลายเดือนก่อน +409

    6:01 I literally exclaimed "RAY MARCHING" at this exact moment lol. I like how you structure those videos, you don't just deliver information, you make the viewer arrive at the conclusion themselves, that's how you actually teach people stuff.

  • @coriumCrush
    @coriumCrush 11 หลายเดือนก่อน +36

    every once in a while i am forcefully reminded that the number of operations per second current generation hardware is capable of executing is absolutely fucking bonkers bananas

  • @eborge9711
    @eborge9711 11 หลายเดือนก่อน +294

    Acerola, could that red hole texture be a parallax effect? They just use it as a mask? That might be doable? If it's skewed at an angle, they probably assume you can't see through the hole anyways, so they just hide the mask all together (due to parallax's weirdness at acute angles?)

    • @EmApex
      @EmApex 11 หลายเดือนก่อน +71

      Would make sense because they use parallax mapping for bullet decals as well, you might be onto something

    • @pablodelgado744
      @pablodelgado744 11 หลายเดือนก่อน +15

      Best point I've seen yet

    • @KaletheQuick
      @KaletheQuick 11 หลายเดือนก่อน +18

      This was my first thought too.
      Essentially a decal texture that lets you see through the smoke when you are looking at it.

    • @NoTengoIdeaGuey
      @NoTengoIdeaGuey 11 หลายเดือนก่อน +8

      Yeah i think he gathered that much, he said he was confused specifically about how they use this mask for other players at different viewing angles than the shooter.

    • @eborge9711
      @eborge9711 11 หลายเดือนก่อน +5

      @@NoTengoIdeaGuey It should work the same way. If it's flipped 180 degrees, just use the same shader with a flipped direction.

  • @maxinai_
    @maxinai_ 11 หลายเดือนก่อน +294

    Just a quick thought on the bullet hole mistery:
    My first thougth (with the texture and all) was that they might be using a mask.
    Basically, there is a seperate render buffer that renders two quads with the texture you showed for the entry and exit "hole".
    These get combined mutiplicatively so you only get a non-zero value if the entry and exit overlap (which means you should be able to see through in a straight line).
    Then the inverse of that result is used as a mask for the generated smoke texture.
    This might work... or not, i don't know just my two cents on the topic.
    P.S.:
    Great video as always, loved the PsychoPass-Reference.

    • @maxinealexander9709
      @maxinealexander9709 11 หลายเดือนก่อน +7

      that's what I thought as well

    • @vocassen
      @vocassen 11 หลายเดือนก่อน +18

      Would be a good idea, but in the video he explicitly said he wanted it to work from multiple perspectives (not sure if that's how it works in CS2).
      Though I have another idea that would greatly simplify the calculations (and most importantly eliminate multiple checks and sqrts):
      They could compared each position to be sampled with each ray, with X and Y being the offset in the plane, and Z being the distance along the ray. Then they could sample the texture using X and Y, and compare the sampled value with Z to see if the voxel should be rendered or clipped. This is super simple since the texture sampling can be set up to clamp out-of-bounds samplings, and the texture also provide the hole shape, eliminating the sqrts.
      So all we would be left with is a few multiplications, two divisions (scaling distance to the texture bounds), a texture sample, and a single comparision with division between sampled value and Z (to check whether the voxel clipped).

    • @HionV
      @HionV 10 หลายเดือนก่อน +7

      I think that the way that texture works is it is actually just a map that is used to alter the density of voxels that the bullet ray passes through (in screenspace relative to the intersection point with the ray). Purely a speculation on my part though, I only really have a surface level understanding of 3d graphics.

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

      My favorite mystery I'm the whole puzzle. My story is a modeler told them to subdivide those voxels and they said, how big and how fast is the projectile.

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

      ​@@vocassenpretty much my solution as well, if I'm following you right, though I added a step to animate the effect and increase the granularity of edge activity around the time/speed and space where a projectile would cavitate in line with its bullet physics model on the engine...
      Cool stuff.

  • @thejinxedartist
    @thejinxedartist 11 หลายเดือนก่อน +360

    How on earth do you make these videos somewhat educational and engaging at the same time... also casserola lmao

  • @bobthedeleter
    @bobthedeleter 11 หลายเดือนก่อน +614

    wake up babe new acerola video dropped

    • @Turbosquirl
      @Turbosquirl 11 หลายเดือนก่อน +2

      @@darkxseries7can confirm

    • @smilleur
      @smilleur 11 หลายเดือนก่อน +6

      I downvote this comment every time i see it

    • @SirNightmareFuel
      @SirNightmareFuel 11 หลายเดือนก่อน +3

      Thanks babe 🚬☺️

    • @M.m.nt.m.n.t.m
      @M.m.nt.m.n.t.m 10 หลายเดือนก่อน

      He makes me tired

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

      @@SirNightmareFuel I think your holding that cigarette the wrong way

  • @nathanh755
    @nathanh755 11 หลายเดือนก่อน +90

    You are serving a niche in the gamedev community that feels halfway between sebastian lague and dani and I love it. Hope to see more soon :)

    • @CraftBasti
      @CraftBasti 4 หลายเดือนก่อน +2

      I'm a bit disappointed; I was like "who's dani" and thought he'd be the absolut dev professional with knowledge equal to black magic, but realized his contribution in your analogy is the presenting style instead

  • @jaysonrees738
    @jaysonrees738 7 หลายเดือนก่อน +23

    Math buffs and programmers must have some form of insanity to think like this. I get what's going on in a simple way, but to keep track of all of these functions and then stick them together in a functional way is simply astounding. What's more is that they've figured out how to make this stuff get calculated quickly. This is why I try to never give game devs crap when they do silly stupid things that break stuff. They've already achieved feats that I can't even begin to touch.

    • @XoIoRouge
      @XoIoRouge 7 วันที่ผ่านมา

      Well, to be fair, we didn't figure out how to make this stuff get calculated quickly. That's the GPU and whoever designed that already figured it out for us.
      We just figure, "Hey, if we do this thing 36000 * 800 times, it'll be slow. Let's try to reduce those numbers." :)

  • @willemowen2515
    @willemowen2515 3 หลายเดือนก่อน +11

    My jaw dropped at the ray marching technique, it’s truly unbelievable how clever some of these concepts are.

  • @weidiocrow
    @weidiocrow 11 หลายเดือนก่อน +109

    I'm astounded by this video. In like half-n-hour you explained 3D coordinate systems, noise, ray marching, several properties of light, BAKING, a fill pattern that's re-usable within the effect, plus five or so other prosperities on top of almost replicating the smoke effect. Pretty amazing you did this in less then a month tbh.
    13:00 Now wondering how in the world Teardown's lighting is so good. Since all their level geometry is dynamic, they can't really bake anything right? 🤔

    • @heliusuniverse7460
      @heliusuniverse7460 11 หลายเดือนก่อน +40

      that's because teardown has no triangles. It's always working with voxels so you don't have to do any conversions

    • @dronihack
      @dronihack 11 หลายเดือนก่อน +7

      I sometimes think he talks too fast to understand everything. But that's alright, if you want you can try to rewatch it bit by bit.

    • @vibaj16
      @vibaj16 11 หลายเดือนก่อน +6

      @@heliusuniverse7460 then how does it do dynamic geometry that's not aligned with the voxel grid (and is rotated)?

    • @Hexcede
      @Hexcede 11 หลายเดือนก่อน +9

      Teardown uses full fledged raytracing

    • @BurningApple
      @BurningApple 8 หลายเดือนก่อน +1

      @@vibaj16 Probably domains.

  • @TorMatthews
    @TorMatthews 11 หลายเดือนก่อน +22

    I wrote some volumetric clouds a awhile back and on the topic of curl noise: consider bitangent noise instead. The main feature you want from curl noise is the zero divergence aspect, and you can get there in two gradients instead of three so it's cheaper if you're generating it in realtime, which is worth doing for your zero-divergence component

  • @bots_op
    @bots_op 11 หลายเดือนก่อน +33

    Maybe the magical bullet hole texture is used to mask out the part where the bullet was shot before it is recomposited back into the main frame

  • @LiveWire937
    @LiveWire937 11 หลายเดือนก่อน +25

    I'm currently ~2 weeks into a psychotic speedrun attempt at teaching myself how to make a halfway decent game from scratch so I can finally properly tell this visual narrative I've been mulling over for a few years, now that the message and themes of it feel super relevant to current events. Still sleep deprived from beating my head against shader code all weekend and been kinda feeling like none of it even really sunk in, but... for the first time, I actually feel like I kinda understood most/all of this. Normally your more technical videos tend to lose me early in, after which I'd only occasionally continue watching for the top notch presentation and entertainment value... guess I have some older videos to re-watch :p

  • @mooncatcher_
    @mooncatcher_ 11 หลายเดือนก่อน +53

    I'm not an expert at all, but the bullet holes look like 2d composites on the final alpha matte, and if you move away from the line of the bullet another duplicate of the texture slides to obscure the hole.

    • @mooncatcher_
      @mooncatcher_ 11 หลายเดือนก่อน +2

      Should be extremely basic and fast

    • @SagnikDasgupta
      @SagnikDasgupta 11 หลายเดือนก่อน +1

      This makes sense.

    • @Rivandu
      @Rivandu 11 หลายเดือนก่อน +1

      And maybe only visible client side? Haven’t played it, so wouldn’t know..

    • @dronihack
      @dronihack 11 หลายเดือนก่อน +14

      Yes but looking at the footage it seems like it has depth. There is a bit more to that than only masking

    • @joelambert7128
      @joelambert7128 11 หลายเดือนก่อน +2

      @@Rivandu I don't think it would be wise to leave an effect that could confer a competitive advantage client side.

  • @Dibblii
    @Dibblii 11 หลายเดือนก่อน +6

    Love the Goodnight Pumpum God reference 3:45

  • @ZettXXII
    @ZettXXII 11 หลายเดือนก่อน +10

    Thank you. There's truly nothing quite as satisfying as listening to such a delightful and informative explanation.

  • @dinoscheidt
    @dinoscheidt 11 หลายเดือนก่อน +30

    Lot‘s of respect for how far you go here to make a video. Mad respect.

  • @akuvr
    @akuvr 11 หลายเดือนก่อน +8

    The quality of this video is insane, super informative and so well structured, the effort you put in really shows!

  • @KateVR_Dev
    @KateVR_Dev 11 หลายเดือนก่อน +9

    That's incredible and even more incredible is that you share all of the code

  • @StanleyKubick1
    @StanleyKubick1 11 หลายเดือนก่อน +28

    to someone who dabbles in 3d with some art school skills, the technical knowledge on display is staggering

    • @evilotis01
      @evilotis01 11 หลายเดือนก่อน +1

      yeppppppp

  • @CosmicDTaco
    @CosmicDTaco 11 หลายเดือนก่อน +3

    Absolutely amazing explanations and showcase with an appropriate amount of humor. I hope you continue to do what makes you happy and share it with us all!

  • @Banaaani
    @Banaaani 9 หลายเดือนก่อน +5

    Damn, this is impressive. The smokes look really good while keeping solid performance.

  • @copperverdigris7321
    @copperverdigris7321 11 หลายเดือนก่อน +1

    I love these videos! Seeing the smoke just getting small little improvements along the way and summing up to something that looks amazing in the end is like a story on it's own!

  • @arturoweird9695
    @arturoweird9695 6 หลายเดือนก่อน +2

    Me: F*king amazed by the work and the results.
    Acerola OCD: What? Still not enough?
    Me: I never say that
    Acerola OCD: Fine I'll simulate how light pass through particles differently

  • @stormy_in_vr640
    @stormy_in_vr640 10 หลายเดือนก่อน +5

    this is wildly impressive, I'm so fascinated with game development, and this was a hell of a journey, awesome vid bro!

  • @vladislavrys4540
    @vladislavrys4540 11 หลายเดือนก่อน +7

    Obviously the result is astonishing, a lot of work have been put into that! But I really admire the effort your have put into the explanation of the animation parts, that is soooo fascinating to watch... Thank you for that :)

  • @ShortyTwo42
    @ShortyTwo42 11 หลายเดือนก่อน +2

    Congrats on being a full time funny internet man. Your videos are what keeps me inspired in pursuing a career in computer graphics. It's so much fun to watch your content, thank you

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

    So excited that you're able to do this full time! Congrats and I'll be watching your career with great interest! Keep up the good work!

  • @zlico1
    @zlico1 11 หลายเดือนก่อน +22

    i really like your humor, and i love shaders even more when i see your videos.

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

    Great job. I see many have tried to recreate this effect, but it seems you are the first to achieve a result that is so close to the original solution.

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

    you have no idea how much i adore your videos, they have touched on something i've always wanted to know about but didn't know how to find perfectly

  • @EsusGamer
    @EsusGamer 8 หลายเดือนก่อน +5

    From the looks of it CS2 had a set amount of voxels the smoke grenade will emit and would flood fill to meet this limit.

  • @photophone5574
    @photophone5574 9 หลายเดือนก่อน +4

    The smoke looks so realistic in some screenshots. It looks like you went into photoshop and cut out an image of dust, and then you just pasted it into a screenshot of a game.

  • @ceilidhDwy
    @ceilidhDwy 11 หลายเดือนก่อน +1

    You are my favorite gamedev youtuber and you actually inspired me to start learning a little bit of gamedev with your grass video (god that grass looks good), so I am very exited that you are going full-time and I hope it works out well for you!

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

    Your skill to simplify such complex topics is simply amazing, I don't even know how to write shaders and 3d stuff but I love watching your videos

  • @crow4277
    @crow4277 11 หลายเดือนก่อน +11

    acerola you are a legend and one of my favorites youtubers!!!!!!! so happy to hear you are now full time

  • @f3rny_66
    @f3rny_66 11 หลายเดือนก่อน +12

    this made me realize some extra reason to have smoke as voxels: replays. Being a competitive element, making the smoke visible in replay (and tournament transmissions probably also more important in this day and age) exactly as as played is fundamental

  • @jaktrak
    @jaktrak 11 หลายเดือนก่อน +1

    I have no idea what you are talking about, but I love it so much. It would be cool to understand everything, but I also have fun just looking a the complexity of these examples. Thanks for the awesome videos!

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

    Great video! Really impressive stuff. And you explained even the complex stuff in a fun and interesting way.

  • @Cash-Trax24
    @Cash-Trax24 11 หลายเดือนก่อน +34

    Could the bullet hole textures Valve used on the smoke have been used as perimeters for real-time textures? Like the flat textures on the portals in Portal made to look like the actual environment through the portal. And each perspective from each player in the lobby could be rendered separately, like the multiplayer in Portal 2. Just a thought.

    • @benshulz4179
      @benshulz4179 10 หลายเดือนก่อน +3

      I believe that is the case, but this alone doesn't explain the 3d effect. In CS2, when doing the depth testing through a bullet hole, each pixel takes from a seemingly correct position of the noise, creating a proper 3d effect:
      The smoke inside fades into the surface of the smoke.
      This leaves me to believe the ENTIRE voxel is ignored when it sees the bullet hole.

    • @Cash-Trax24
      @Cash-Trax24 10 หลายเดือนก่อน

      Then I'd be led to believe they have some form of client side ray tracing, but I do know how heavy on the hardware that would be.

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

    It'll be interesting to see the bugs we get with CS2's smoke, beyond what people have already tried there isn't much else that will give us so much raw information to speculate over.
    Keep an eye out for smoke bug videos folks, that's all I'm saying.

  • @hawns3212
    @hawns3212 11 หลายเดือนก่อน +2

    Very well made video. As a fellow graphics programmer, its nice to see some love for topics like this. Kept me entertained throughout the entire video too. You've earned a sub

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

    Looking forward to more videos now that you do this full time! Awesome work!

  • @pixstatic200
    @pixstatic200 11 หลายเดือนก่อน +3

    For the bullet holes, I would've just thought they projected the texture through the smoke.
    Keep track of every bullet hole's location and direction, then when sampling the smoke density you project the point you're sampling onto that plane and sample the texture that way. To make the hole get smaller further from where it was shot, you can offset the vector along which that point is projected.
    I'm honestly not sure how efficient that is - I'd have to try it - but that was my first thought when I saw how the smoke works in CS2

  • @EricMBlog
    @EricMBlog 11 หลายเดือนก่อน +12

    I do wonder if they have a global voxel grid, or if they make a local one when the grenade deploys. If you included simplified bounding boxes for your environment objects (which they might already have for basic collisions), it seems like the cost of setting it up might low enough.

    • @Acerola_t
      @Acerola_t  11 หลายเดือนก่อน +10

      I don't believe they do as the number of bound constant buffers doesn't change based on the amount of smoke grenades in the scene

  • @Vitamin_Games
    @Vitamin_Games 11 หลายเดือนก่อน +2

    Congrats on getting your first sponsor! Was watching you develop this on twitter! Video didn't disappoint!

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

    This is insanely cool, very informative and super entertaining. Good work

  • @nkkls
    @nkkls 11 หลายเดือนก่อน +3

    Wow !! A new acerola video !!
    such amazing

  • @SimeonRadivoev
    @SimeonRadivoev 11 หลายเดือนก่อน +6

    The bullet mask is probably just projected on the smoke volume from the direction of the bullet. It's just used to subtract density. This should work for all viewers. Imagine a negative projector for the density. Should be easy to give you projected coordinate of a world space point on the bullet mask, and it will form the nice cone. The resolution would be very high as the check can be done in view space not voxel space.

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

      This prevent bullet interactions from two directions, no? If you shoot from left and someone shoots from right, you wouldn't see the right-left bullet hole inside the front-back bullethole.

  • @Novacification
    @Novacification 11 หลายเดือนก่อน +2

    Another small thing about the bullet holes is that they react to the volume of the smoke. You can only create bullet holes near the edges, not in the middle (you might able to with continued shooting in the same place, not sure about that).
    This was hugely impressive though. Great video!

  • @farhadaa
    @farhadaa 10 หลายเดือนก่อน +2

    I believe that the smoke hole could be a displacement mask that hides that part of the smoke, much like displacement decals but far more sophisticated, still confusing and amazed how it is done and how you managed to get close to the real thing.

  • @TheDwarvenDefender
    @TheDwarvenDefender 11 หลายเดือนก่อน +3

    This smoke reminds me very much of the clouds and / or fog seen in Xenoblade Chronicles 2 & 3 and The Legend of Zelda: Tears of the Kingdom. Maybe Monolith Soft, who worked on both games, used a similar technique for nearby fog / clouds in their games.

  • @PauLtus_B
    @PauLtus_B 11 หลายเดือนก่อน +3

    I remember hearing Breath of the Wild rendering everything under the water surface at half resolution, but it would then later be changed by a displacement map.
    I think the smoke effect gets away with the low resolution just fine as is, but I wonder if a similar process might still be able to fake extra detail.

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

    This is really cool.
    While I'm not currently doing/learning game development, I love learning about the trucks that developers use to make perfomant and visually pleasing graphics.
    This is definitely something you excel at teaching and demonstrating at a good level of abstraction. It feels like you know just how much detail you have to share so that your videos are informative and engaging, while introducing topics/techniques that we could go research if we want more detail.

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

    Very interesting video, thanks for all this work! The progression of information is very well made, taking the audience to the relevant conclusions instead of simply dumping info

  • @isaipack
    @isaipack 11 หลายเดือนก่อน +8

    Didn't watch yet but can say confidently: what a banger

  • @BaxDigitalTest
    @BaxDigitalTest 11 หลายเดือนก่อน +9

    Idea for the texture they use for the holes.
    Maybe it is used similar to a volume texture in 3d by just scaling the height of the texture a lot into the volume and then they subtract it from the density.
    Like a 3d decal.
    Or they remove the voxels on hitting them.
    that would work with the grenade explosion aswell.

    • @qqii
      @qqii 11 หลายเดือนก่อน +6

      Removing voxels would require a very dense voxel grid, far denser than the one shown in the video.

    • @tiarkrezar
      @tiarkrezar 11 หลายเดือนก่อน +3

      @@qqii could work for grenades, but the grid is definitely too coarse for those bullet holes

    • @user-sl6gn1ss8p
      @user-sl6gn1ss8p 11 หลายเดือนก่อน

      @@qqii maybe some displacement magic affecting the neighboring holes deals with that somehow because magic?

    • @unfa00
      @unfa00 11 หลายเดือนก่อน +1

      Maybe it's possible to project the hole's texture in word space and sample these projections during raymarching to influence density of the volume?

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

      Rather than removing the voxels I think the texture is just used to negate the visual effects already induced by the smoke. Like, "if bullet hole texture shows black, do not show smoke effects here". Then fade that mask out over time with some function to give the smoke the appearance of refilling the smoke, when really it was still there the entire time.

  • @alina_rosa
    @alina_rosa 11 หลายเดือนก่อน +1

    I absolutely love the in-depth analysis. But also wanted to give kudos for the bg music selection. It's a nice surprise to hear Va-11 OST

  • @aboxninja
    @aboxninja 7 หลายเดือนก่อน +2

    ive seen a lot of your videos they are very well made idk why you are so underrated please keep it up

  • @geeshta
    @geeshta 11 หลายเดือนก่อน +3

    It's hard to focus on the video when you use such banger soundtracks from some of my favourite games

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

      it's to distract from my awfully monotone voice

  • @dimitri0404
    @dimitri0404 11 หลายเดือนก่อน +5

    Wouldn't it be possible to deside the shape of the smoke by throwing particles and and then calculating witch voxel a particle is in and then and filling in the voxel. (And I mean throwing like 50 particles not just making particle effect smoke, so not rendering the particles themselves)
    That way you don't actually have to pre-bake the whole map.
    It also gives you the posiblility to make the smoke Dender if multiple particles are in the same voxel.
    You could also only make a voxel grid at the moment the smoke is thrown and only in a certain range of where the smoke lands.
    And only keep that grid for a the life span of a smoke grenade.
    That way you minimize the amount of voxels that need to be rendered.
    You would still have to make sure that shit dousnt break when multiple smoke grenades are thrown.

  • @pcvsk8
    @pcvsk8 11 หลายเดือนก่อน +1

    Honestly one of my favorite youtube channels. Keep it up!

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

    Happy to see you've got a sponsor! Love your work, always great stuff, keep it up!

  • @jesco3921
    @jesco3921 11 หลายเดือนก่อน +3

    I was going to give my opinion on how the decal texture might be used but I will instead respect your wishes and keep it to myself. I will also be implementing my idea in my own free time to prove thats how it works. I hope you look forward to it.

  • @ArsArmegis
    @ArsArmegis 10 หลายเดือนก่อน +9

    I don't get it. I'm stupid.

    • @Birchish
      @Birchish 3 วันที่ผ่านมา

      Nah, you aren’t.

    • @quinndepatten4442
      @quinndepatten4442 2 ชั่วโมงที่ผ่านมา

      No, we're stupid. Apes together strong.

  • @janlohse3130
    @janlohse3130 11 หลายเดือนก่อน +2

    I always love seeing your anime and manga references to the Monogatari series, Tatami Galaxy and more. But I really didn't expect a reference to god from Oyasumi Punpun at 3:45. Keep them references coming

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

    Great video! Some really interesting topics and the end result looks awesome!

  • @haiperbus
    @haiperbus 11 หลายเดือนก่อน +3

    Monogatari intro, I kneel

  • @MrNatsuDragneel
    @MrNatsuDragneel 11 หลายเดือนก่อน +5

    I think they use marching cubes, mip map of a only one hole texture setting the angle on creating, and apply based on voxel of entry and position of bullet. After they use the entry and out of bullet to interpolate the animation.

    • @Acerola_t
      @Acerola_t  11 หลายเดือนก่อน +3

      If it were marching cubes then a mesh of the smoke would be bound to the render pass, but I am always looking for an excuse to use marching cubes

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

    You're so good at explaining this stuff that, armed with nothing but a chemistry degree and a receding grasp of multivariable calculus, I now also feel like I am an expert in video game graphics. Woe upon my friends and family whom I'll be ranting to about all of this to the next time I see smoke in a game.

  • @Nvargas31
    @Nvargas31 11 หลายเดือนก่อน +1

    this is the first video i watch from you, and the references, soundtrack used, editing, and explanation were on point
    Can't believe i didn't find you earlier

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

    Everything in this video was so over my head, the info might as well have been airplanes in the sky!
    But really enjoyable and entertaining, so it felt like like an airshow!

  • @Jejkobbb
    @Jejkobbb 8 หลายเดือนก่อน +2

    If I were to attempt doing the bullet holes in the smoke myself I would probably create two floating textures (like the ones you found in the game) in the air when the player shoots. One on one side of the smoke and one on the other, then render the floating textures separately. And if the black color of the texture overlaps with the one on the other side it would be used as a mask for the smoke layer. I'm not sure if this would actually work or look good, but that's how I would try it.

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

    Really well made, informative and entertaining video! Good job and keep it up!

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

    Congrats for the sponsoring. You earned it! One of the most interesting upcoming gamedev channels since Sebastian Lague :)

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

    very impressive how maths, coding work together to create beautiful visual graphics.
    Very good job bro I understood how these smokes are made in detail

  • @benshulz4179
    @benshulz4179 10 หลายเดือนก่อน +1

    Incredible video, I will try this out myself, seems fun!
    Meanwhile, a theory on the bullet holes:
    When you shoot, it applies the smoke bullet hole decal (and decreases it's size over time) on EVERY voxel on the shot's path, including the voxels inside the smoke.
    Then, when doing depth test for a pixel, we check if the pixel can see a decal from a voxel. If it can, it ignores that entire voxel for depth testing. So if we see all voxel's decals, we ignore all voxel's depth and see through smoke, in that pixel. But if we see two voxel's decals, we ignore only those two voxels' depth.
    After applying noise, it should create a proper 3d bullet hole effect.
    Explosion clearing might be the key here. It could in theory just mark voxels as "do not render" and then apply a smoothed explosion decal on every voxel which is touching those "do not render" voxels, then ignoring entire voxel per-pixel like above if the decal is seen.

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

    Freaking awesome video. Love how everything is easy to follow regardless of technical understanding.

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

    this whole video was nuts you never miss 😭

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

    Parts of this video seriously amazed me how you broke it down. Plus extremely satisfying to listen to, thank you Funny Internet Man!!

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

    Fantastic content good sir! As always very Informative and entertaining

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

    can't believe I hadn't found your channel until now. This stuff's gold man

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

    great video with tech breakdown! the best volumetric smoke in a game imo is teardown for sure

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

    Your videos are always such a joy to watch
    I feel like I'm on the edge of understanding something then you dash my hopes every time XD
    I'm binging them at the moment

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

    You are making content that people are not, you are asking the right questions, sir ... And the answers are not disappointing at all.

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

    you're so underrated, i love watching your vids idk why, and i love the effort you put on editing. keep this up blud!

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

    Nice video. Verry informative. And for someone that knows nothing about voxels, is pretty easy now to understand how the smoke works in CS2.

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

    This is literally one of the most amazing videos I have ever seen.

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

    You just keep getting better and better! Keep up the good work dude!
    Awesome video and execution.
    In valves implementation, are the bullet holes billboarded to the camera? Could they just be running a simple transparency of the smoke shader with the bullet hole texture?
    Maybe you were overthinking it

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

    Mad respect for reverse enginieering these smokes! Hilarious presentation with the guerrilla games section as well!

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

    as someone looking to try out game dev this video was super informative thank you for making this vid

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

    man acerola, your reaching for the stars with this one. i'm rooting for you

  • @s-ata-n
    @s-ata-n 11 หลายเดือนก่อน +1

    3:45 mmmmm nice little punpun reference, i liked it very much

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

    I really love the monogatari-like editing in the video ✨

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

    Wow. You have a brilliant way of explaining stuff. Maths is really cool when you use it to solve these sort of graphics puzzles