There’s no multitexturing yet, so this demo does 3 passes to get the result I was looking for. The first pass is the base color, the second pass is a spheremap if it’s present and the third pass is specular lighting.
This demo is showing off everything that Spider3D v3 can do:
-Dynamicly control objects attached to bones
-Collision detection for movable and non movable objects
-Specular lighting
-Multiple texture layers
-Oh…I guess one isn’t in there yet, and that’s transparent surfaces
I’m waiting until Spider3D v4 before I impliment vertex programs and fragment programs. Baby steps .
Anyway, I thought I show you guys the kind of progress I’ve made with your help.
Spider3D is a closed source library so I can’t let you see all of the source code, however, when Spider3D v3 is finaly released, I will post parts of the code for those interested. That will most likely happen on my forums though.
For now the best I can do for you is let you view my winmain.cpp file. It shows how to init, draw, manipulate and do collision detection with Spider3D v3. It will also give you a glimpse into my new OpenGL init code I call SpiderGL. SpiderGL makes it super easy to init OpenGL and it will be open source when I release Spider3D v3.
The code is a bit messy right now(cleaner than my demos at spider3d.com) but is still easy to read IMO. Here ya go: winmain.cpp
The simulated finish is done using a spheremap but it really needs to be a cube map.
I’m using the good ol’ glBlendFunc and glDepthFunc(GL_LEQUAL). First the skin for the plane is drawn and then it’s drawn again with glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR) and then again with glBlendFunc(GL_ONE, GL_ONE) for the specular.
Nutty has some great demos for using cubemaps at nutty.org. I havn’t really used cubemaps myself yet.