ShaderToy FX Coding: Twisted Toroid

preview_player
Показать описание
Twitter: @The_ArtOfCode

In this video we'll write a ray marcher from scratch and texture map a cool material onto the inside of a torus.

Inspiration for this effect:

Live version:

Music:
Рекомендации по теме
Комментарии
Автор

I liked how you explained the setting up of the ray-marching part, it is really concise and understandable. I've rewatched it a few times now. Thank you.

codebro
Автор

You make it look so easy. This is easily one of your most impressive videos.

mikee.
Автор

This was incredible, I have recently discovered your channel. Have been trying to learn shaders for a while but it's always been super daunting… Taking your channel from the bottom up has been the best intro I have found in years of trying. I'm not going to lie, I still don't 100% get some of the stuff you did here, but I love how you build up from previously introduced concepts. If there's one thing I do agree with a comment below talking about naming, etc. When you don't know much about shaders (like me), it's kinda hard to understand some things based on 1 letter variables. I wish they had more explicit names, maybe the concepts would sink in better. Also there seems to be a lot of inline calculations, and sometimes a lot of repetition (things like sin(t) * 0.5 + 0.5), would be good maybe to generalise that concept? Anyway, I wanted to take the time to let you know your videos have been nothing short but amazing for me. They melt my brain but in a good way, "some" things have definitely finally clicked.

benoitgrelard
Автор

- Saitama, how did you get so good at programming?
- I wrote 100 lines of code, 10 commits, every single day until my hair fell off.
- ...Wait is that it? Just...
- I became the One Compile Man.

..
Автор

Awesome stuff man! I really liked the distorted-esque effect of you modifying the zoom variable, very cool

slideshowbob
Автор

I have watched many of your videos by now and they are really excellent. Eveything is explained too the point without spending too much or too little time. Two big thumbs up for your excellent work. Thanks to people like you we might see some new, young fresh developers appear in the demo scene soon...

raabix
Автор

I've been looking for this all day! You're a hero!

rmt
Автор

There are very nice ray-torus intersection equation and normals from Inigo Quilez. Can help to avoid marching and win some speed.

alexfrozen
Автор

thank you for sharing your knowledge with us ^^

JustYesntMan
Автор

Truly worth the wait. Thank you. I've been experimenting with this one for about 2 hours today! You can see on Discord what I did

sacredbanana
Автор

I don't use shadertoy, but I'm liking this anyway because you deserve the support! Holding out for more Unity vids :)

saiaku_x
Автор

I'm watching this video, currently at 8:25, and I have absolutely no idea where that torus came from and why it's there. Nothing in the code speaks "torus" to me.

Tekay
Автор

I don't quite understand if our coordinate system is right or left handed.
When looking at the torus at 7:02 for example it seems to be left handed. Positive x is to the right, z in to the screen and y up, based on the atan values.
What am I missing here? Is it something about the view frustum that I haven't understood yet?

ReviveNRepair
Автор

By the way, does sine clamp to -1 to 1 because any input into a sine function is basically calculated as an angle theta on a triangle in a Unit Circle? So 719 (in degrees), for instance, would be the same output as 359 (in degrees) as the hypotenuse of that Unit Circle triangle would have been rotated to the same angle? Thanks in advance for a good answer from somebody and thanks again to The Art of Code!

THE_ONLY_GOD
Автор

So basically making a circle in zx is the same as making a circle in xy plane, and then those are combined somehow? Seems obvious in some ways, although that is pretty cool. How is that "spun" to make the circle slice into the torus? Didn't notice where that was in the code.

THE_ONLY_GOD
Автор

Anyone knows which kind of software is used for recording videos like this? Hangouts or zoom can do it?

rodolfomaxi
Автор

Excuse me, I'm pretty new at ShaderToy coding and all things shader releated, can somebody tell me what fragCoord.xy returns?

skillato
Автор

that was brilliant, from a noob's perspective though I wish the variable names were a bit more descriptive
(e.g. "ray_origin" instead of "ro" )

danielkrajnik
Автор

I discovered this only last month, i use C++ with library SFML

__hannibaal__
Автор

Ey!! Thanks very much!!!! But... I don't understand nothing about this part!! :S... I don't know if is necesary to know all (When I use Unity don't know all...) but is frustrating!!! Is about RayDirection:

vec3 f = normalize(lookat-ro),
r = normalize(croos(vec3(0, 1, 0), f)),
u = croos(f, r),
c = ro + f * zoom;
i = c + uv.x * r + uv.y * u,
rd = normalize(i-ro);

Very difficult... xDD Where are the information for understand this staff!!!

Thanks in any case!!

adriancardenosocerezo
welcome to shbcf.ru