Cartoon Shading

Blitz3D Forums/Blitz3D Programming/Cartoon Shading

Huh? Cubic maps are special. You need to generate one at runtime. It requires six different views, and you have to set the cubic mapping mode.

I don't have time to write you a cubic mapping thing, but look int he code archives for my cel shading system. I think it's there at least. Maybe I put it in a thread. I forget. Maybe someone else knows. If you can't find it, email me and I will send the zip to you when I have time.

Once you have that find a function in the code archives for generating a cube map from a specific location in the world.

Now that you have both of those, combine the two.

My cel shading system loads a 1d texture... a gradient map. It then applies this to a sphere and renders the view of the sphere. This makes a sphere map.

What you need to do is instead of rendering the view from outside the sphere, you need to flip the sphere inside out, and render the view from the inside with a cubic map generator.

Once you've done this you will have a proper cubic map for a light from a specific direction.