Cell Shading

Blitz3D Forums/Blitz3D Programming/Cell Shading

Lilprog(Posted 2003) [#1]
What exactly is the best way to do cell shading when it comes to models? And is there a way to do dynamic texturing?


jhocking(Posted 2003) [#2]
The word is "cel shading." Especially considering my longtime study of biology, I cringe every time I see someone refer to "cell shading." That mistake-term actually applied to my last animation job; I was doing medical animation which required me to create materials/shaders which evoked the appearance of cells.

At any rate, the best way right now is to have a copy of the mesh, expanded slightly along the polygon normals, flipped, and colored black. This accomplishes the black outlines; to get the stark lighting/shading you will either need to play with the ambient light or use a spherical environment map to fake it. To expand on the latter suggestion, create a texture which is white for the top two thirds and grey in the bottom third, load this image as a spherical environment map with "multiply" blending, apply it to your model as the second texture layer, and set the model to fullbright.


Lilprog(Posted 2003) [#3]
Perhaps Im a little confused(im new to blitz 3d). if you expanded a copy of the mesh flipped it and colored it black how would you see the original mesh? Wouldnt it look all black?

A;so, I dont know anything about spherical environment maps, how do they work?

Sorry for butchering the term
Rob


SSS(Posted 2003) [#4]
because you are inversing your normals, and blitz supports backface culling it will work, if your new just accept it as a meracal of modern science, in reality what is essentialy doing is if you are facing the FRONT of the polygon then it renders it but if you are faceing the back then it does not, by fliping the mesh you are turning the faces around


Lilprog(Posted 2003) [#5]
ok that makes sense, and I have tried implimenting it, the problem is now the actual object is flipped as well as the black mesh, heres my code am i doing it in the wrong order?

Bed=LoadMesh("Furniture\bed.3ds")
Bed_shadow=CopyEntity(Bed)
FlipMesh(bed_shadow)
ScaleEntity bed_shadow,1.01,1.01,1.01
EntityColor bed_shadow,0,0,0
EntityParent bed_shadow,bed
ScaleEntity Bed,.3,.2,.4
PositionEntity Bed,100,20,0
RotateEntity Bed,0,90,0

Rob

P.S. I still dont know about this spherical environment maps.


(tu) sinu(Posted 2003) [#6]
try using copymesh or loading the mesh as new for Bed_Shadow


DrakeX(Posted 2003) [#7]
yeah copymesh works better.

(btw the spheremapped celshading looks orgasmic :) )