I've been looking at the old spherical mapping technique used to approximate cel shading (the lighting effect rather than outlining the model) in blitz3d.
It's a pretty neat effect but unusably flawed when you add in a dynamically moving camera, because - obviously - due to the nature of spherical mapping, the lighting is relative to the camera, and it changes whenever the camera is repositioned.
So I was wondering if there was any way to somehow "clamp" the light texture when the camera is moved?
EDIT:
after searching the forums I have found that using a cubemap is a way to solve the problem. Has anyone used cubemaps to create improved cel shading?
FURTHER EDIT:
on another thread regarding cel shading, sswift wrote (in reference to solving the above problem that I mentioned):
My first reacton to this was "Yay!" but, inevitably, my second was "Er, what?", so does someone have a working example that I could learn from (steal)?
It's a pretty neat effect but unusably flawed when you add in a dynamically moving camera, because - obviously - due to the nature of spherical mapping, the lighting is relative to the camera, and it changes whenever the camera is repositioned.
So I was wondering if there was any way to somehow "clamp" the light texture when the camera is moved?
EDIT:
after searching the forums I have found that using a cubemap is a way to solve the problem. Has anyone used cubemaps to create improved cel shading?
FURTHER EDIT:
on another thread regarding cel shading, sswift wrote (in reference to solving the above problem that I mentioned):
To avoid that, you could apply the shading map to a sphere, point the top of the sphere towards the desired light source, flip the sphere so it is inside out, and then render a cubemap from inside the sphere with the sphere set to fullbright. Then you could use the cubemap instead of the spherical environment map, and the light would stay in the right direction no matter how you moved the camera around the obejct in question.
My first reacton to this was "Yay!" but, inevitably, my second was "Er, what?", so does someone have a working example that I could learn from (steal)?
