Ray Marching, and making 3D Worlds with Math

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 28. 08. 2022
  • Built this entire video on raymarching in shaders using shaders, ray marching, and signed distance functions.
    🛒 Recommended books (on Amazon): www.amazon.com/hz/wishlist/ls...
    ❀ Support me on Patreon: / simondevyt
    🌍 My Gamedev Courses: simondev.teachable.com/
    Disclaimer: Commission is earned from qualifying purchases on Amazon links.
    Follow me on:
    Twitter: / iced_coffee_dev
    Instagram: / beer_and_code
    In this video, I cover ray marching and some of the cool stuff you can do with it in shaders. We cover basic scene construction, unions/intersections/subtractions, doing smooth minimums, normal generation and soft shadows, and anything else that seems kinda neat about the technique.
    Ray Marching: en.wikipedia.org/wiki/Ray_mar...
    Great Resource for Ray Marching and SDF's: iquilezles.org/
    Smooth Maximum: en.wikipedia.org/wiki/Smooth_...

Komentáƙe • 349

  • @simondev758
    @simondev758  Pƙed 28 dny +1

    Patrons can now vote for the next video! Thank you for your support.

  • @Chribit
    @Chribit Pƙed rokem +628

    I‘ve actually been working on a graphics engine using signed distance fields as primitives instead of triangles for ~2 years now - super hyped to see it become more and more mainstream recently :D

  • @stickguy9109
    @stickguy9109 Pƙed rokem +293

    For the first time I understood what this magic "ray marching" is and how it works. You are good at explaining things

  • @BalintCsala
    @BalintCsala Pƙed rokem +167

    Great video, but small correction on a common misconception: Ray marching is just doing raytracing but numerically (so instead of having an equation tell you how far you need to go, you just go in small steps and check if you are inside a shape at any point), it doesn't necessarily involve SDFs (e.g. screenspace reflections also use raymarching, but not SDFs). The special name for this is sphere tracing.

  • @magnusm4
    @magnusm4 Pƙed rokem +13

    I remember this blend mechanic being used in a Valve tech demo from around 2003 where they made blobs able to combine and melt together like here.

  • @cucumberedpickle
    @cucumberedpickle Pƙed rokem +41

    I've seen a lot of videos about raymarching before, but this is the first time I've "gotten it". The graphics you used to explain it make so much sense.

  • @guaje
    @guaje Pƙed rokem +3

    It's great to see more content like this. Loved your explanation of the central differences method.

  • @cl10k
    @cl10k Pƙed rokem +1

    Your vids are so incredibly good! I always get excited when a new one comes out. Pure gold!

  • @RobinPayot
    @RobinPayot Pƙed rokem +47

    Amazing video, well done on the explanations! The 3D scene really helps to understand, maybe explaining a bit more the code part would be even better

  • @uquantum

    Wonderful Simon, came here from another one of your shader vids, mind-blown that you made the actual video using ray-marching, now picking jaw up from table

  • @gtnbssn
    @gtnbssn Pƙed rokem +5

    I have started the glsl course a couple weeks back and am learning so much! Thank you!!

  • @Matkins85
    @Matkins85 Pƙed rokem +13

    Nice video! I love playing with SDFs too.

  • @awesomecronk7183
    @awesomecronk7183 Pƙed rokem +1

    I like the explanation! I'm working on my own ray marching based graphics engine right now and, while your demo here is far more polished, I'm getting places.

  • @Shamysoza92
    @Shamysoza92 Pƙed rokem +5

    Now THIS is how you sell a course.

  • @nordie92
    @nordie92 Pƙed rokem +4

    Nice stuff, nice explanation, nice voice. Love it

  • @simoniacdemoniac7525

    I purchased your course. You really explain things well!

  • @younghsiang2509
    @younghsiang2509 Pƙed rokem +1

    This is really a cool video, the way objects transition between frames are just amazing! Wondering how that could be made.

  • @Luka116_
    @Luka116_ Pƙed rokem +13

    I love your editing & teaching style! Thank you for making such informative and fun content for free ^_^

  • @icimojojojo
    @icimojojojo Pƙed rokem +4

    That's an amazing video Simon, thanks a lot for sharing your knowledges with us !

  • @aquanton
    @aquanton Pƙed rokem +1

    this was the single coolest video I've seen on CZcams for a while