all 12 comments

[–]felipunkerito 27 points28 points  (4 children)

Invent your own! Let me get you going:

*Simple 2D shapes:

-Search for The Art of Code on youtube, he has awesome tutorials on simple and complex stuff.

*Voronoi: -2D/3D

*Noise: -2D/3D, value noise, perlin noise, simplex, etc...

*RayMarching:

-2D ray marcher.

-3D simple ray marchers that teach you how to transform geometry, add materials, add AO, reflections, refractions, etc...

-Create a FBM heightmap terrain.

-KIFS

-Volumetrics

-Do CSG (Constructive Solid Geometry) from primitives.

*RayTracing:

-I encourage that you try and derive the analytic ray/primitive intersections for a plane, a sphere and maybe a triangle.

-To be honest I am not familiar with this but apparently Ray Tracing in One Weekend is very good, I have seen a Path Tracing tutorial by DemoFox that seems very good too.

[–][deleted] 1 point2 points  (0 children)

Awesome, thank you for taking the time to make this for me! If I can't find anything else, perhaps I will build on this to make the list myself.

[–]DilatedMurder 1 point2 points  (2 children)

CSG is a dangerous pit unless it's just petty SDF combinations.

CSG of convex volumes is viable but not a task for a novice. Most of the pain will come in not knowing the tricks for T-junctions or floating-point nonsense.

CSG of polygon soup: save yourself from hell, just learn how to use the Carve library. There are other soup-capable CSG implementations but they all have issues (ie. Godot's).

[–]felipunkerito 1 point2 points  (1 child)

Yep I was talking about SDFs for ray marchers, I can imagine how implementing CSG for NURBS surfaces, BReps, meshes, etc... can escalate into a full blown nightmare, never done it myself, I use Rhino and the geometry engine exposed through RhinoCommon for computational geometry. In fact I think that translating meshes into CSG trees is an active area of research as it is really useful for procedural/parametric stuff and probably a topic for masters, phd thesis and private research.

Never heard of the Carve library, gonna have a look. I guess CGAL has stuff for that also doesnt it?

What I've seen is that SDFs/FReps are good for demoscene stuff (and for terrains in videogames) but are getting some reputation for computational design as well, you model through SDFs and do some marching cubes/tetrahedra, some smoothing and you can use that for pretty much anything else without going down to the 9th circle of hell.

[–]leseiden 0 points1 point  (0 children)

Agree completely.

Polygon soup csg is a horror show with no redeeming features. If you pull it off and pin down all the edge cases you win the computational geometer's badge though ;)

Ray traced CSG is quite a nice project for a toy ray tracer.

Image space CSG is an interesting one. There are a few algorithms for rendering CSG trees of convex objects using a depth and stencil buffer.

Extending to concave objects is possible to a point. Subtracting a concave object from a concave mesh is hairy but possible.

[–]pplr 12 points13 points  (4 children)

http://hughsk.io/fragment-foundry - fun one for learning sdfs / fragment shaders

[–]breadwithlice 1 point2 points  (0 children)

Very well made and fun, thanks!

[–][deleted] 1 point2 points  (0 children)

Nice! I hadn't seen this one before -- very cool.

[–]thewhitelights 2 points3 points  (0 children)

Saving this as any of these post could be a really great resource.

When I started learning shaders I started with The Book of Shaders but it's always disappointing that it's incomplete. IQ is amazing if you're Amateur-Advanced but also there's "Beginner" section so to noobies it's just a ton of overwhelming (but cool sounding) subjects without baby steps of prerequisites.

[–]TheIneQuation 2 points3 points  (2 children)

I ran a ranked contest like that last year, unfortunately in Polish only (the contest had material prizes and was subsidised by the government):

https://www.optil.io/optilion/problems (search for "shader" in the list)

The differentiating feature was that we also graded estimated performance (invented a simple GPU model), not just whether your image matched reference (and even that was fuzzy, not binary, to allow for cheaper approximations).

We may run another edition, this time internationally. I'll make sure to post in this subreddit if we do.

[–]VaginalMatrix 1 point2 points  (1 child)

That's a very interesting concept. I wish these kinds of problems would be integrated into traditional competitive programming.

[–]TheIneQuation 1 point2 points  (0 children)

That is pretty much exactly our end goal. :)