An introduction to Raymarching

  Рет қаралды 113,006

kishimisu

kishimisu

Күн бұрын

This tutorial guides you through the fundamentals of raymarching and space transformation, providing insight into the endless creative possibilities that this technique opens up.
Raymarching base: www.shadertoy.com/view/MfX3WH
Final shader: www.shadertoy.com/view/lcs3DH
You can now support me on Patreon!
• Patreon: / kishimisu
If you want to see more content related to computer graphics & shader coding:
• Instagram: / kishimisu (Digital Art)
• Twitter: / kishimisu (Computer Graphics, ML, Shaders..)
Resources presented in the video:
• Shadertoy: www.shadertoy.com/
• Raymarching in Raymarching: www.shadertoy.com/view/wlSGWy
• 3D signed distance functions: iquilezles.org/articles/distf...
• Color palette: iquilezles.org/articles/palet...
• How to rotate a vector - Freya Holmér: • How to rotate a vector
• Quaternions and 3d rotation - 3Blue1Brown - • Quaternions and 3d rot...
• Inigo Quilez's channel: @InigoQuilez
• The Art of Code's channel: @TheArtofCodeIsCool
Video editing: Premiere & After Effects
Animations: Manim Community and GLSL Shaders
Note that the voice-over has been generated using AI ! (platform: ElevensLab)
The primary reason for this choice is to ensure a cleaner audio quality. As English is not my first language, it can be difficult to keep this kind of content clear and concise. I believe that the generated voice enhances the educational quality of these tutorials. With that said, this is not a definitive choice.
Timestamps:
00:00 Introduction
00:40 What’s Rasterization?
02:02 What’s Raymarching?
05:45 Shader start
08:37 Raymarching
12:35 Optimizations
15:50 Translation
17:50 Operators
19:10 Scaling
20:12 Rotation
22:10 Order of operations
22:53 Camera rotation
24:45 Space repetition
27:07 Getting Creative!
32:37 Final shader
Musics:
• massobeats - jasmine tea
• corbyn kites - dusk drive
• Music by | e s c p | escp-music.bandcamp.com

Пікірлер: 249
@kishimisu
@kishimisu 5 ай бұрын
I hope you'll find this tutorial to be a useful starting point for learning more about raymarching! On a personal note, I recently completed my masters degree in machine learning and plan to start working on my next video as soon as I find employment. If you or your company are seeking a creative mind in the fields of computer graphics, machine learning or computer vision, don't hesitate to send me an email! (available on my profile) You can also support these tutorials on Patreon: www.patreon.com/kishimisu See you in the next one!
@SpiritBladeFox
@SpiritBladeFox 5 ай бұрын
Your tutorials are so useful and inspiring thank you for teaching me so much!!
@codeunited5905
@codeunited5905 5 ай бұрын
You are one hell of a talented person. Hope you find a good employment soon!
@onetwothree2617
@onetwothree2617 5 ай бұрын
Your tutorials are fantastic, thank you. I like the AI voice over.
@Carlosdreaming
@Carlosdreaming 4 ай бұрын
These tutorials are amazing! Very well explained and with lots of visuals that help a lot! All the best!
@likrecelineation
@likrecelineation 4 ай бұрын
Can you do a video on how to add lights, shadows, and specular reflections to the scene when you do?
@krzysztofwolski9156
@krzysztofwolski9156 3 ай бұрын
Thanks a lot for this video. IT's great and easy to comprehend. I just spotted one mistake, so I'll share with people if they get stuck: 26:55 - When doing the time-dependent offset of the cubes the line q=fract(p) - 0.5; should be changed to q=fract(q) - 0.5;
@benxtan
@benxtan 26 күн бұрын
I as just about to post this correction. Thanks!
@jacobosaldarriaga4820
@jacobosaldarriaga4820 17 күн бұрын
Thank you! I was going really confused for a while, thougth of changing a bunch of stuff except that, makes sense.
@VerdASMR
@VerdASMR 5 ай бұрын
10/10, kishimisu you are a brilliant shader artist and an equally brilliant communicator of information. Please keep sharing that gift with us ❤🙏
@psenej
@psenej 5 ай бұрын
OMG THE RETURN !!
@Kabodanki
@Kabodanki 5 ай бұрын
The algorithm choosed him
@danycorona6788
@danycorona6788 5 ай бұрын
A just became a supporter at patreon because of this video. I think you nailed the perfect balance giving just enough information to understand what’s going on without getting bogged with details while providing external resources to drill down. The visual explanations are great too. Looking forward to dig in with your next tutorials!
@Lavamar
@Lavamar 5 ай бұрын
Amazing tutorial once again! Your first video inspired me and many others to start experimenting with shader code. This video made basic 3d graphics easily understandable, previosuly to me a daunting task. I also love how you briefly explain several sub-concepts in their simplest forms, prompting a lot of creative exploration. Really appreciate your style, pacing and looking forward to your future videos.
@Darkensses
@Darkensses 5 ай бұрын
Thank you kishimisu! you're a true inspiration for me! Shaders are a very complex topic but with your help, this kind of programming is begin become easier :)
@2_Elliot
@2_Elliot 5 ай бұрын
Man, talk about underrated! Here from your previous video, can’t wait for your next. Keep up the good work!
@MashJDW
@MashJDW 5 ай бұрын
This is a fantastic introduction into Ray Marching. Wonderful video. I've started this journey myself a few months ago, and your visualizations will really help others conceptualize these seemingly complicated operations!
@thepurplbanana
@thepurplbanana 5 ай бұрын
Great video! I toyed with fragment shaders before, but this video made want to go back and properly learn some GLSL and create a couple shader programs! As a point of criticism, I think the code you provide would be easier to follow along and more readable if you were to use proper variable names for values you hardcoded -- using something like `scalingFactor` instead of 4., for example.
@kimmyera174
@kimmyera174 4 ай бұрын
Yes. This is a general coding practice called magic numbers. Eventually, constants that never change or one off values, may need to be understood by anyone revisiting the code in the future... that also means yourself :p This was a good tip from professors when I went to college for programming. Also keep up the vids, I'm subscribed for the incredibly easy to follow, guided visual examples that help explain what's fundamentally going on, step-by-step. Keep it up ^^
@NeverduskX
@NeverduskX 3 ай бұрын
This video was so dense with information yet so well-explained. I'm going to rewatch this a few times just so I can absorb everything.
@sIippo
@sIippo Ай бұрын
Great video! You started small and worked up to some really cool demonstrations. Thank you for doing this all in shadertoy too, so I could quickly try it out for myself.
@duhdiggitydan
@duhdiggitydan 4 ай бұрын
Fantastic video! Looking forward to more in this series. I'm a big fan of the 64K demoscene and the creative and technical uses of raymarching, but never could give myself a starting off point to try my hand at my own. You just unlocked a whole universe of exploration for me.
@grey8_
@grey8_ 5 ай бұрын
Awesome video! I was occasionally checking your channel to see if you had a new video since you said you're working on a new video on Instagram. You did a really great job! Especially because it was a topic I wanted to checkout anyway. I'm looking forward to more raymarching and seeing your channel evolve, I think you'll succeed easily! Good luck! 🎉
@PledgeBass
@PledgeBass 4 ай бұрын
Thank you so much for all of the effort put into this. I don't have time to dive into shaders right now but it's something I've been wanting to do for a while.
@nathanlebon5813
@nathanlebon5813 4 ай бұрын
GOAT Tier learning material. Thank you a lot! I'm seriously thinking about subscribing to your Patreon after 2 tutorials.
@hekuli
@hekuli 5 ай бұрын
You really have the best tutorials on the topic. Very well done explaining complex topics in easy to understand terms.
@loriennasarre
@loriennasarre 5 ай бұрын
Dude I was really waiting for you to drop another video. I am getting into the world of 3D graphics and shaders and your insight is very appreciated!
@BarneyCodes
@BarneyCodes 5 ай бұрын
Another great video! I've been meaning to explore raymarching for ages, so this might be the push I need to get started!
@Veptis
@Veptis 5 ай бұрын
I am still working on my shader generation evaluation for language models, but your videos have been a great aid to help people explain what shadercode is and how you might interpret code as art.
@MysteryPancake
@MysteryPancake 5 ай бұрын
Fantastic!! I especially like the diagram at 25:18, it's a very interesting way to visualise it
@arnetriesyoutube
@arnetriesyoutube 5 ай бұрын
I really like how much info even the description has!
@SuboptimalEng
@SuboptimalEng 5 ай бұрын
I wish this video existed when I started learning Ray Marching (earlier this year) because it would've saved me weeks of self-studying. Really amazing work!
@puntig.1187
@puntig.1187 5 ай бұрын
I just decided to get into shaders, as a self-taught "creative coder". Your videos are absolutely stunning, highlighting an incredible production value. Be sure that I am going to follow your every move ;) I think you just convinced me to become a Patreon.
@randomystic218
@randomystic218 3 ай бұрын
This is an absolute gem. Please keep making more of such videos
@CathodeRayKobold
@CathodeRayKobold 5 ай бұрын
The biggest flaw with ray marching, in my opinion, is that it can be difficult or tedious to design certain arbitrary structures purely with math. It's not a very artist-friendly technique.
@seanloughran6714
@seanloughran6714 5 ай бұрын
Had to pause in the middle of the video and say, that Milky Way comparison was amazing, funny and instructional. This is an awesome video, well done!
@JakeDownsWuzHere
@JakeDownsWuzHere 4 ай бұрын
double thumbs up for the Quaternion videos you linked, they're invaluable in understanding what at first can be a very opaque and confusing construct
@pekka8605
@pekka8605 4 ай бұрын
10/10 Nothing to add. Very clear yet concise explanation and visualizations.
@Elmo-uu3cb
@Elmo-uu3cb 5 ай бұрын
Wow amazing! Thank you for sharing all those great lessons 😎🔥
@Nosikas
@Nosikas 5 ай бұрын
Oh my gosh, you're back! These videos are phenomenal.
@juanloutech2864
@juanloutech2864 4 ай бұрын
Very, very interesting and very well explained! Thanks for this introduction to the huge world of shaders!
@neokortexproductions3311
@neokortexproductions3311 Ай бұрын
Thank you! You inspired me to get back into coding and creating generative art, looking forward to future tutorials🤝
@januskane1978
@januskane1978 5 ай бұрын
I enjoy the AI voiceover, it's calm and to-the point! Very nice!
@AlexMoreno-zj7po
@AlexMoreno-zj7po 5 ай бұрын
same, had no idea it was AI
@najlitarvan921
@najlitarvan921 4 ай бұрын
to be frank it is one of the better AI voices
@4.0.4
@4.0.4 5 ай бұрын
Absolutely amazing content. I can vouch for The Art of Code too, his videos are long but very easy to follow.
@motbus3
@motbus3 5 ай бұрын
This is absolutely amazing. Please keep doing it!
@Cigam_HFden
@Cigam_HFden 5 ай бұрын
Excellent run down of a lot of concepts and aspects of ray-marching. I have been experimenting with raymarching and SDF shapes in the godot engine. I am not sure how performant that will be, because I am still working at making the code for it. However, I will definitely be looking forward to your future videos. Cheers!
@rimonsade-jd3id
@rimonsade-jd3id 5 ай бұрын
That is beyond great content. Truly mesmerizing.
@marvinkruger4559
@marvinkruger4559 5 ай бұрын
Thank you so much for another wonderful video!!
@Not_Even_Wrong
@Not_Even_Wrong 5 ай бұрын
Amazing, awaiting the next videos eagerly!
@foxxify1
@foxxify1 5 ай бұрын
This is so cool. I love the exploration into noncartesian space. You can really do so much with just a few lines of code.
@michaelcheverie7579
@michaelcheverie7579 5 ай бұрын
Just this afternoon I was messing around with applying rotation matrices to conic sections in the Desmos graphing calculator. Cool to see that technique used in shaders!
@futurebypatrick
@futurebypatrick 4 ай бұрын
Great video with great presenting format. Really appreciate. I am not coder at all, but really interested in this type of experimenting now. 😁😁
@MrBerserkPoo
@MrBerserkPoo 5 ай бұрын
im so glad you're making more content
@shinomitsu7798
@shinomitsu7798 5 ай бұрын
Thank you. Can't wait for the next video
@gdthatbigderp2375
@gdthatbigderp2375 5 ай бұрын
The legends said that some day, kishimisu will return!
@miyu1424
@miyu1424 5 ай бұрын
Finally! I'm so excited!
@dumbo8260
@dumbo8260 5 ай бұрын
nicely done dude. can't wait for the volumetric tutorial
@augnix888
@augnix888 5 ай бұрын
Loved the tutorial!
@razu1976
@razu1976 13 күн бұрын
This is such a good video. Well done.
@viezegast1305
@viezegast1305 5 ай бұрын
Absolute unit of a channel
@migueldc6845
@migueldc6845 2 ай бұрын
Really enjoying your videos! And have recommended them in my developers circle (:
@erikjohnson9112
@erikjohnson9112 5 ай бұрын
Great to have you back! Personally I would like to see WebGPU perhaps using wgpu (and engine that supports both desktop and web). Compute shaders & fragment shaders are my top topics (or more precisely areas).
@kishimisu
@kishimisu 5 ай бұрын
I might create a video about webgpu in the future to introduce compute shaders. However it may be difficult to fit on the screen nicely as wgsl is more verbose than glsl!
@mlecz
@mlecz 5 ай бұрын
Fantastic Video !, The content of this material is so valuable that the participation of AI as an speaker completely does not bother me. Thank you for your work !
@bloom945
@bloom945 5 ай бұрын
Absolutely legendary video. Subbed.
@NedCollyer
@NedCollyer 12 күн бұрын
Incredible! Thank you :)
@LuigiElettrico
@LuigiElettrico 5 ай бұрын
Simple yet amazing.
@10bokaj
@10bokaj 4 ай бұрын
nice explination, one of the better I have seen
@vovos00
@vovos00 4 ай бұрын
It helped me a lot!! thank you so much.
@NoBody-pf2nv
@NoBody-pf2nv 4 күн бұрын
Absolutely incredible! I hope to see more videos on shaders from you! 🎉
@bengt-goranpersson5125
@bengt-goranpersson5125 5 ай бұрын
Thank you kishimisu!
@hordorsok
@hordorsok 5 ай бұрын
Oh man, you are finaly here thax for video!
@mercantilistic
@mercantilistic 3 ай бұрын
This is completely bananas thank you!
@jazzhar
@jazzhar 4 ай бұрын
I found it incredibly easy to understand, you expertly explained not only the goal but also what individual components did without making it confusing. Although it's not shader, but could you tackle cube marching? (Procedural generation) Havent found someone that could explain it well yet.
@somewhere-else
@somewhere-else 5 ай бұрын
ai voice or not the effort that went into this video is obvious and it’s top notch. honestly reminds me of robert penner’s work back in the flash days.
@dacool_boe4071
@dacool_boe4071 5 ай бұрын
Your videos are amazing bro
@redsprites5216
@redsprites5216 5 ай бұрын
'Now' I subscribe. Love this!
@morqanic
@morqanic 4 ай бұрын
YESSSS ANOTHER VIDEO THANK YOU!!!!
@JimmyBrandZ
@JimmyBrandZ 3 ай бұрын
Wooooow!... Just the thing i've been looking for. 😲
@aref2268
@aref2268 4 ай бұрын
Aah shade, here we go again Now I have an awesome toy to procrastinate with. This tutorial is amazing🔥
@erevanayen
@erevanayen 4 ай бұрын
My guy is literally teaching magic and asks nothing for it. The production and information value of this video is insane. I'm making a patreon account just to support you.
@ahsan2649
@ahsan2649 5 ай бұрын
The only raymarching tutorial I ever understood.
@thailonlucasart
@thailonlucasart 23 сағат бұрын
We miss youuu!!! Hope you produce some new shader content 🎉
@raulcasquinha
@raulcasquinha 5 ай бұрын
This is so cool thank you
@bitblit
@bitblit 5 ай бұрын
Never thought I'd learn how to become a lightbender, but this video made it so easy! Universes beware.
@simonviit4982
@simonviit4982 5 ай бұрын
Thank you, I hope you might consider produce "An introduction to RayTracing" in future.
@someguy1428
@someguy1428 5 ай бұрын
Ray marching is such a beautiful technique. Infinite objects with mathematical operations with low computational power.
@leonardvanduuren8708
@leonardvanduuren8708 5 ай бұрын
Grandmaster ! The best out here !
@eli123ry
@eli123ry 2 ай бұрын
Amazing Video
@RemoteAnimations
@RemoteAnimations 21 күн бұрын
This is amazing
@ethanwimsett
@ethanwimsett 3 ай бұрын
Brilliant!
@cyberbemon
@cyberbemon 5 ай бұрын
Lol this video would have helped me a lot about 2 years ago when I did my computer graphics module. I was struggling to find a good video that broke down Raymarching. Still better late than never, I can use this to revise that shit properly now!
@isma.noether
@isma.noether Ай бұрын
Incredible tutorial ! Thanks a lot ! Just one question, is it normal that your cartesian coordinates system at 7:01 is left-handed ? It seems a bit odd since, as I thought, the convention was right-handed cartesian coordinates system.
@aimkata
@aimkata 27 күн бұрын
🔥 Next amazing video please!
@Fikretov
@Fikretov 19 күн бұрын
Pure gold.
@sleepymushroom9403
@sleepymushroom9403 5 ай бұрын
Funnily enough I was looking for a video to explain raymarching to me, been thinking of implementing in a project lately.
@JunicoNRC
@JunicoNRC 5 ай бұрын
goh damn my new shaders course
@lkhprime
@lkhprime 3 ай бұрын
Very Clear
@Jellyjam14blas
@Jellyjam14blas 5 ай бұрын
That is awesome! :D
@gaeel330
@gaeel330 4 ай бұрын
You shouted out Leon Denise! He's the one who introduced me to raymarching. Really cool dude! He organises amazing demoparties and live-coding events with Cookie Collective, check them out if you're into all this stuff!
@absence9443
@absence9443 Ай бұрын
THANK you!
@user-nq5un4zn8e
@user-nq5un4zn8e 5 ай бұрын
Great content
@a1000joys
@a1000joys 5 ай бұрын
This is magic.
@prathampatel6357
@prathampatel6357 5 ай бұрын
Nice work
@ivanmoltini926
@ivanmoltini926 5 ай бұрын
Babe wake up, Kishimisu dropped a new video!
@briansheldon9401
@briansheldon9401 2 ай бұрын
Incredible video. Could someone please explain why at 7:27 the ray direction is given as normalize(vec3(uv, 1)) and not normalize(vec3(uv, 3)) for a camera 3 units from the screen? Shouldn't the direction be normalize(vec3(uv, distanceFromScreen)) for this setup?
@TiagoTiagoT
@TiagoTiagoT 5 ай бұрын
Is it possible to correct the space distortions mentioned in the end to avoid the artifacts?
@ottobyte
@ottobyte 5 ай бұрын
This is so awesome 🤩 thank you so much for sharing this information. I struggle terribly with math but I think I can follow a lot of this. I see that Shadertoy is used as an editor/visualisation tool. Is there an application that runs locally for when I’m not online?
@DankSauce-lh8zk
@DankSauce-lh8zk 5 ай бұрын
Anything that supports glsl like game engines such as unity/godot should work fine! If you use microsoft tools with intellisense you should have some decent offline help as well
@camellia1264
@camellia1264 17 сағат бұрын
sooooooooooooooooo goood! i love it!!!!!!!!!!!!!!!
@andreicn0
@andreicn0 5 ай бұрын
wow you're back
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 904 М.
I made a better Ray-Tracing engine
17:38
NamePointer
Рет қаралды 242 М.
I Need Your Help..
00:33
Stokes Twins
Рет қаралды 124 МЛН
Пишем свой движок 3D-графики
19:25
Onigiri
Рет қаралды 531 М.
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 555 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 782 М.
Coding Challenge 180: Falling Sand
23:00
The Coding Train
Рет қаралды 731 М.
How Big Budget AAA Games Render Clouds
10:45
SimonDev
Рет қаралды 254 М.
How Are Games Rendering Fur?
28:51
Acerola
Рет қаралды 410 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 162 М.
Introduction to shaders: Learn the basics!
34:50
Barney Codes
Рет қаралды 271 М.
Marble Marcher - A Fractal Physics Game
3:58
CodeParade
Рет қаралды 1,6 МЛН
Эффект Карбонаро и бумажный телефон
1:01
История одного вокалиста
Рет қаралды 2,6 МЛН
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 9 МЛН
Apple, как вас уделал Тюменский бренд CaseGuru? Конец удивил #caseguru #кейсгуру #наушники
0:54
CaseGuru / Наушники / Пылесосы / Смарт-часы /
Рет қаралды 4,4 МЛН
Carregando telefone com carregador cortado
1:01
Andcarli
Рет қаралды 1,8 МЛН
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1 МЛН
Как я сделал домашний кинотеатр
0:41
RICARDO
Рет қаралды 1,5 МЛН