If more people in the world were interested in math and art creation, you would have 1 billion of subscribers 👍
@masakari69223 жыл бұрын
I feel like its because people don't really get into actually building shaders from scratch they use programs that have all the tools built in but that only can get you so far
@aboody0063 жыл бұрын
@@masakari6922 That's true, but it's not the case in a professional setting though.
@sacredbanana6 жыл бұрын
omg you are the best. For the longest time my ray marched shaders were suffering from artefacts, especially when using the mod operator to create many copies of an object. All I had to do was make the ray travel only a fraction of the min distance. Even though this video didn't explain how to fix my specific situation, I immediately understood it to be the solution when seeing you do it when scaling. Thank you so much
@TheArtofCodeIsCool6 жыл бұрын
I'm glad to hear this helped. For your specific case, what you should really do is take into account the boundaries between cells when marching. Maybe I'll do a video about repeated distance fields in the future where I explain this.
@gijsb47086 жыл бұрын
Oh and as always great video! You're creating an excellent source of information next to that of Inigio Quilez'.
5 жыл бұрын
This channel is pure gold. Awesome work!
@JustYesntMan6 жыл бұрын
Never went home this fast before, saw the notification on my way and i just began running haha
@TheArtofCodeIsCool6 жыл бұрын
Haha, awesome :)
@EricAAnderson6 жыл бұрын
Just stumbled upon your channel today, and it's already become a treasured resource. Thank you so much for all your time and effort!!!! Really looking forward to following along!
@TheArtofCodeIsCool6 жыл бұрын
Thanks, I'm glad you get something out of it!
@sergeipavlov11174 жыл бұрын
You are GENIUS! Where did you learn this?!?!
@prietjepruck Жыл бұрын
You make it all look so easy. Thanks for the tutorial.
@DB0094 жыл бұрын
Great tutorials i actually used this to make a raymarcher in shader toy then migrate it to unity. I know you have a video on that but I feel this one goes so in depth thats it worths learning to convert shaders from shader toy to unity to absorb it all and to learn from various shader toy examples. I already followed a tutorials from another channel but you go more in depth so definitely worth watching. great job man!
@bryphi776 жыл бұрын
You sir, are the MAN!
@theobgshow4 жыл бұрын
Happy new year Martijn. Thank you for all you hard work in providing these lesons.
@TheArtofCodeIsCool4 жыл бұрын
Happy New Year to you, and thanks for watching.
@kaihenthe Жыл бұрын
this is the third tutorial im following so ima sub and be a 48.9K sub
@Stenjus4 жыл бұрын
I am SOOO glad I found this... Totaly subscribed and notified. I've started writing shaders a few years ago. And I was such wondering how da fck those crazy dudes build scenes, even animated with kind of modeled objects on Shadertoy (even games like Doom) without ANY traditional 3D, keyframe animations, even without cameras..... All I saw is a bunch of lines of code, (not readable, more like yxa * cx * .5 * gf * wtf) and this MAKES this picture. That was an ABSOLUTLEY piece of magic for me, dispite I have enough hlsl and c# experience. And there we are! A MAN veeeryyy carefully and thoroughly explains part by part HOW this works. THANK YOU!
@TheArtofCodeIsCool4 жыл бұрын
Aww thanks! And thanks for watching :)
@whythosenames6 жыл бұрын
Can you do 3d fractals like the menger sponge?
@TheArtofCodeIsCool6 жыл бұрын
Its on the list of potential future videos :)
@playbyan14533 жыл бұрын
I already did mandelbulb sdf i think my mandelbulb sdf wasn't perfect cuz i got glitches
@LuukP202 жыл бұрын
Great tutorial, helped me a lot!
@fuzzyhenry20484 жыл бұрын
This shows how beautiful the math is.
@NBsTube6 жыл бұрын
another excellent set of tools for everyday use! you should put your patreon link in the description box of your videos, and maybe announce it at the end of the videos, I just realized you have a patreon because I googled you. I'm sure there are some people like me that would gladly put a few bucks to have one or two of your videos a week
@TheArtofCodeIsCool6 жыл бұрын
I put the link. Thanks for the tip. I'm currently aiming to have a new video every 2 to 3 weeks. Its quite a lot of work making these. Hopefully in the future I can ramp up[ the frequency.
@lewisrafter34656 жыл бұрын
Awesome video, great explanations as always!
@miro-hristov5 жыл бұрын
I bet the Nike logo on your hoodie is the same color as your background :) Excellent explanation btw! Keep up the good work!
@TheArtofCodeIsCool4 жыл бұрын
I always have to fiddle with lighting and clothing and camera settings to get the damn blue/green screen to work :)
@ooisee4 жыл бұрын
I have registered thrice, to vote up this video and hit "subscribe" =) tnx a million! =)
@xamogxusx5 жыл бұрын
Nice! Texturing/colouring tut? :D I'm hyped for new stuff
@TheArtofCodeIsCool5 жыл бұрын
Its coming!
@eyupfndkl Жыл бұрын
Hi. Is this can be use as CAD boolean operation for any shapes? if it is yes , how. Could you explain please?
@JNelson_6 жыл бұрын
Fantastic as always!
@adriancardenosocerezo Жыл бұрын
Great!! Thanks very much.
@minimalisticbits12326 жыл бұрын
Really nice explanations!
@kogorek15 жыл бұрын
Awesome video! Really liked it. But I I have one question: Why are you using cryptic var names? Why not use full names? Wouldn't it be easy to understand?
@TheArtofCodeIsCool5 жыл бұрын
The problem with long var names is that they take longer to type, which makes my videos even longer. I also find that when you use long names in formulas, the formulas actually get harder to read. One good thing is that a lot of the short names come up over and over again, not just in my shaders but in others as well. Here is a short list of common ones: ro = ray origin, which is usually the camera position rd = ray direction p = position, e.g. a ray marching position t = time, a value that changes over time, used to animate something d = distance, e.g. a distance to the center of a circle, or the surface of an object dS = distance to a surface dO = distance from current raymarch point to the origin a = angle i = index, or iteration, generally used in conjunction with a for-loop I hope that helps a bit. :)
@Frencylil5 жыл бұрын
Your tutorials are amazing. Thanks a lot
@徐一雄-d8o4 жыл бұрын
Thank you for your great videos! Can you do a video about Quaternion and Quaternion Rotation? Thank you very much!
@TheArtofCodeIsCool4 жыл бұрын
I like the idea, but Quaternions are a mystery to me as well. So hopefully someone else can make a video that we can all learn from ;)
@josh_swanson5 жыл бұрын
Is there any way to do Raymarching with polygonal meshes?
@TheArtofCodeIsCool5 жыл бұрын
You could, and some people have done it, but it is not very practical because rasterizing triangles (rendering poly-meshes) and raymarching distance functions are two fundamentally different things.
@josh_swanson5 жыл бұрын
@@TheArtofCodeIsCool I was afraid of that. I have seen people speculate we might eventually have models made entirely of particles or millions of small shapes instead of just triangles. Perhaps then we can use these techniques, though I also wonder how UV wrapping would work. Someone smarter than me will invent this I'm sure
@minecraftermad5 жыл бұрын
can you make light bend around corners a little (basically whenever a distance is larger than the las distance make it tilt a little towards the object. or just make it run slightly towards the nearest object always to simulate gravitational bending or something like that) this would mimic real light. also is there a way to make the double slit experiment work?
@TheArtofCodeIsCool5 жыл бұрын
I'm not sure about the double slit experiment but you can definitely bend the rays towards an object. I made a black hole shader not too long ago that bends rays: www.shadertoy.com/view/3d2SWK
@ciniss3 жыл бұрын
Hi everyone! I've got a question regarding practical use of ray marching. How to you move the shapes out of shader code and just export those into the shader? What I mean is... How to use such shader in c++ code, where I have a scene and want to render the scene using ray marching? Should I use uniforms or there is another way?
@BossBeneBaby4 жыл бұрын
Would it be possible to do some low resolution fluid simulation with multiple smooth sphere unions? I mean the way it looks is already really organic so this would be awesome.
@TheArtofCodeIsCool4 жыл бұрын
Good question! You certainly can simulate the look of a blob of water with this method. Search ShaderToy I know there are examples.
@jimmyjimbo6665 жыл бұрын
good format :-)
@Lucas-bf4pw5 жыл бұрын
What about glow 3d fractals? Is there another video about it?
@TheArtofCodeIsCool5 жыл бұрын
No 3d fractals yet. Soon!
@osm49625 жыл бұрын
Awesome !
@1732ashish6 жыл бұрын
thanks a lot for this awesomeness
@Andrew-qc8jh Жыл бұрын
so cool
@frankeke85415 жыл бұрын
I tried rotation but in unity, but instead of rotating it moves up and down... shape.position.xy *= mul(shape.position.xy,Rotate(shape.rotation.z)); How do i do it ?
@TheArtofCodeIsCool5 жыл бұрын
I don't know, but: shape.position.xy *= mul(shape.position.xy,Rotate(shape.rotation.z)); looks like you are multiplying twice? The mul operation by itself should be enough (so without the *=)
@frankeke85415 жыл бұрын
i no longer work on this project but still thanks for replying
@kalkiavatar81216 жыл бұрын
Can we impliment ambient occlusion?
@TheArtofCodeIsCool6 жыл бұрын
Yes. I'll talk about it in one of my future videos.
@icaroamorim31235 жыл бұрын
how can we set a different material for each geometry?
@TheArtofCodeIsCool5 жыл бұрын
Thats a good point, I should do a video about that. In short, you would need to keep track of which object you hit. You could do this by making a function you call after the raymarching loop that gets the distances to every single object one last time (from the hit position) and spits out a different number for each object. So, if it hit the sphere it returns 1, if it hit the plane it returns 2, etc. Then in your lighting and material code you could do an if statement to do something different for each object.
@RifinTidHamar5 жыл бұрын
Thank you
@rbouakaz3 жыл бұрын
goddddddAMN !! That's cool!!!
@sc5shout5 жыл бұрын
How to mix it up with vertices set up on CPU with VBOs etc. etc. when we have no informations about number of object and also we want to give no shader direct interaction (actuall I think interaction is not a word here, but forgot the correct one) to, let's say, a guy who edits/creates a world. You know, standard situation, we have a 2D renderer, may be batched or something and we may handle 100k primitives, 60k primitives, as many as we can and as the guy needs. The guy wants to subtract one circle from another. Also collision has to work properly, normals has to be recalculated and I bet ton of other things. How to handle it?
@TheArtofCodeIsCool5 жыл бұрын
Raymarching is completely different from the standard approach of rasterizing triangles. I would not recommend ray marching for making more complicated things like games.
@sc5shout5 жыл бұрын
@@TheArtofCodeIsCool I see. One more thing. You used signed distance functions to draw your scene. There is a way to draw high quality textures using signed distance field. Is it possible to use your box function to draw antialiased 2d quad on a screen?
@ismaelmagana16766 жыл бұрын
Great ! Thankyou!
@wilsimarbr6 жыл бұрын
fantastic
@gijsb47086 жыл бұрын
I find the boolean substraction could have been better explained if you first explained boolean intersection. Because then substraction would just be the intersection of the complement!
@TheArtofCodeIsCool6 жыл бұрын
Yeah you are right. Too late now though ;)
@dae25306 жыл бұрын
Volumetric clouds tutorial, please.
@TheArtofCodeIsCool6 жыл бұрын
It's on the list of potential future vids.
@NikolaNevenov865 жыл бұрын
should had added the start code.Or explained how the camera system works.
@TheArtofCodeIsCool5 жыл бұрын
Its all explained in other videos. Check the links in the description.
@NikolaNevenov865 жыл бұрын
@@TheArtofCodeIsCool Oow!...yeah... I actually went back through all your videos.Because I remember you having one and found it that way.Did't look in the description.