4 ms·
This is great! Is there any place where it is possible to read more about this painting techniques for code?
by HugoDaniel 5y ago
This is great!
Is there any place where it is possible to read more about this painting techniques for code?
- onion2k 5y agoIt's all done with shaders. A good starting point is https://thebookofshaders.com/ https://thebookofshaders.com/. You can learn a lot from people's examples on https://www.shadertoy.com/ https://www.shadertoy.com/. Another amazing resource is iq's website at https://iquilezles.org/ https://iquilezles.org/. Something to note - it's all math. Changing other people's code and implementing things other people have devised is quite straightforward, but making new styles requires a good understanding of some relatively complex math topics. I'm not saying that to put anyone off - the opposite in fact. If your math isn't great or you're a bit scared of it then learning shader coding is a brilliant way to improve.
- SonOfLilit 5y agoIt's all math, but it's pretty easy math and it's a great way to learn it. (Just building on what you said and encouraging people not to be scared and to dip their toes in)
- hutzlibu 5y ago"It's all math, but it's pretty easy math " My experience is, that all math is easy - if you understand it. But most have big gaps in their basic math knowledge (like me) - and then "pretty easy math" is suddenly very hard, as you stumble every second step, over a concept you never really understood back in class and what you learned you have mostly forgotten - so you have to relearn this. And then that. And then the other thing. And suddenly "easy math" is hard work. So ... telling people, it is just "easy math" - can make people feel very stupid for not getting it and totally put them off. And I know that I am not stupid - I simply lack knowledge in the area. But for other people with lower self esteem, it can have the opposite effect of encouraging.
- aspaviento 5y agoAlternatively, you can add mentally "for the author" to "easy math" and you won't need to feel stupid or go through the enormous effort of trying to convince everybody to change the way they express themselves.
- bryanrasmussen 5y agoso the above links are good for learning about shaders, are there any resources that are good for the math involved (as in better than the shader links above)
- SonOfLilit 5y agoI recommend starting with the shader stuff, and when you really feel the need picking up a linear algebra textbook, preferably one that has "linear transformations" earlier in the ToC than "matrix multiplication" (or 3Blue1Brown's videos come very recommended by some)
- fsloth 5y ago"Real-time Rendering" by Akenine-Tomas Möller et all is one of the standard references here. https://www.amazon.com/Real-Time-Rendering-Fourth-Tomas-Akenine-M%C3%B6ller/dp/1138627003 https://www.amazon.com/Real-Time-Rendering-Fourth-Tomas-Aken... Peter Shirley's free Ray Tracing series is incredibly good as well: https://raytracing.github.io/books/RayTracingInOneWeekend.html https://raytracing.github.io/books/RayTracingInOneWeekend.ht... And the outstanding piece in rendering is the Physically Based Rendering book by Pharr et all (which won an Oscar): https://www.pbrt.org/ https://www.pbrt.org/ None of those are math references as such, but the thing is with graphics it's not based on first principles (well, ray tracing is kinda getting there but still has lots of artistic stuff rather than science stuff), but rather on a bag of tricks. And the math without the "bag of tricks" context may not be that clear.
- greggman3 5y agoUgh! Those sites will do absolutely nothing to teach you how to make something like this. Thebookofshaders and shadertoy are about solving a puzzle "given only a single function who's input is the position of the pixel being draw, draw a pretty picture with math". That is not remotely related to the techniques used to make something like this paint program. I don't have a suggestion for the paint program in particular. There are a few S.O. answers that cover painting linked here https://webglfundamentals.org/webgl/lessons/webgl-qna.html https://webglfundamentals.org/webgl/lessons/webgl-qna.html