Recently I found out about shadertoy and I'm quite amazed by the various creations I saw there. So how can I create similar effects of my own ? I have experience with c,c++ and sdl for some months making 2d game clones. Also I can understand from looking at the provided code parts of each shader in shadertoy that there is a good amount of math involved(if not all math),but I still wonder how can a person know how to make a shape using just math, I mean a cube and a sphere are primitives and simple to create but a spiral or something out-of-this world like clouds or hills or whatever not-normal shape just seem so hard to me. Is the procedure to create these effects and complex animations the outcome of not only good math skills but lots of experimentation ? Do people just like begin with a cube,or primitive shape in general as in moving lines, and then mix and match "random"-ish variables,values,coordinates combined with time create these effects or they just know from the get go what they are going to create and what the possible tools might be. It all seems so random at me looking at most of the code samples there. Hope someone experienced(who might have his own shadertoy creations too) will give me a glimpse into his thought process during the creation stage and help me set a clear path so I can be able to create things on my own. Thanks in advance.
How to get started with shadertoy ?
Here are a few links.
The first set are from iq who is the co-creator of shadertoy
http://iquilezles.org/www/index.htm (distance functions and others)
http://iquilezles.org/www/material/nvscene2008/nvscene2008.htm
This is also a great resource (as well as its references at the bottom).
http://graphics.cs.williams.edu/courses/cs371/f14/reading/implicit.pdf
The great advantage of shadertoy is the near instant feedback loop from trying somethig to seeing it on screen.
Hah so we are talking about pretty advanced things and I guess I got work to do though I expected something more basic but good info in general, definetely will got lost in these for many days !
Assume you are talking about raymarching fun, this is a good article:
http://9bitscience.blogspot.com/2013/07/raymarching-distance-fields_14.html
This post contains a lot of lego-like formulas you can combine together:
http://www.pouet.net/topic.php?which=7931&page=1
And this lecture mentions interesting ways to combine them all together:
It's not too hard to get started, first try to raymarch a sphere without any lighting next add normals then off to the races. But yeah it's all math and shapes (and perlin/curl noise, which I don't think you mentioned in your original post... especially for clouds):
http://www.futuredatalab.com/volumetricloud/
For non-shader stuff, I like the C implementation of noise found here:
http://webstaff.itn.liu.se/~stegu/simplexnoise/DSOnoises.html
Oh, and trig! Trig out the wazoo, see if you can find the source or some presets for Ryan Geiss' Geiss or Milkdrop... trig is like lifeblood for making mindportals. Not for solving triangles, but as a source of periodicity (and a base for square waves and sawtooth waves etc.):
http://www.helixsoft.nl/articles/circle/sincos.htm
http://iquilezles.org/www/articles/palettes/palettes.htm
So in my admittedly small experience:
cos() + rand() + noise() + endless tweaking = retro mind portal
cos() + rand() + noise() + raymarched implicit geometry + endless tweaking = modern mind portal
Thank you very much for your reply my friend, I was kinda underwhelmed when I didn't receive many replies. Yours is filled with so much information and I'm really glad about.It seems I got tons of work to do and fiddle arround with things. Thanks again for the informative post !
No problem! It's a bit grey-area, you can't buy a book on demoscene from amazon as far as I know... and not many coursera classes on mind portals. But if you read around enough you will eventually cobble together a curriculum. Good luck~!
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.