You ought to. It’s great fun. If you understand basic vector and matrix math, and understand what MODELING, VIEWING, and PROJECTION transforms are, then you shouldn’t have any trouble. Just a little learning and piecing things together – should be a fun project.
And after lots of “googling” im now a little confused.
Post your questions, and we’ll help you out. Might outline what you think you understand and then ask what’s got you confused.
What is the current best way or most common used way of shadows? “real-time” if i dare?
Define “best” That’s a flame war waiting to happen. Best quality? Best performance? Best hard shadows? Best soft shadows? Best for explicit geometry? Alpha geometry? Dynamic geometry? Point light sources? Directional light sources? Area light sources? etc. …you see what I mean.
However, in terms of “most common” “real-time” shadowing techniques, arguably “shadow maps” have that title right now.
There are bunches of tweaks, variations, and add-ons (cascaded, variance, exponential, etc.), but just try your hand at some basic shadow mapping first to lock in the basic concepts. Then branch off to the variations as desired.
I would have thought using shaders? But cant find much on that soim not sure?
Yeah, it’s a heck of a lot more flexible doing shadow mapping using shaders, versus legacy techniques using the fixed-function pipeline, but you can use legacy fixed-function pipeline functionality to do very basic shadow mapping if you want.
another good question would also be (from a beginners POV) what would be the best way to have a go at first?
Just start with a simple scene casting a shadow of a cube or sphere onto a plane. Easy to cook up such a scene using GLUT or similar (sphere above plane – check!) or just borrow it from an on-line tutorial somewhere. Then add the shadow casting logic.
I thought about this one (im sure you have seen it before) its hte “pauls projects” one. http://www.paulsprojects.net/tutorials/smt/smt.html
Is that a real-time one?
Yeah, that’s a pretty good tutorial. Pretty good description of the concepts. Though its implementation uses the legacy fixed-function pipeline TEXGEN functionality to do the projective lookup into the shadow map. Works, but as a Phase 2 you might want to convert to using shaders as its much more flexible and more easily extended.
As in if there is a rotating object the shadows are also updated?