Page 1 of 1
Cell Shading
Posted: Wed Oct 10, 2007 3:51 am
by evildragon
So, I'm planning out a plot to a video game for the Sega CD/32X (and will be in 3D with a "almost" full 3D world).
What I want to do is make the 32X be the graphics engine, Genny be the core game engine, and the CD being the storage, AND sound engine (via PCM).
But, I want cell shading. Can this be done on the 32X?
Posted: Wed Oct 10, 2007 4:10 pm
by Chilly Willy
You would do shading in the rasterizer. How complex would determine how much it slows the drawing. If you're doing subdivided affine mapping, your best bet would be Gouraud shading - calculate the shading interpolation deltas at the boundaries just the same as you would the texture walking deltas. It's not as accurate, but then neither is subdivided affine texture mapping. The point is to make it CLOSE while keeping the speed up.
My own experiments with subdivided affine mapping on a 320x200 display (on an Amiga to be precise) showed steps of 8 pixels to be the best for speed vs visual accuracy. More pixels per step made it a little faster, but gave really nasty looking results. Fewer pixels looked a little better, but slowed things down too much.
Posted: Wed Oct 10, 2007 8:38 pm
by evildragon
Ok, I'll pass that information to my friends (whom are doing the coding).
(I'm more of a director for the games plot. The only coding I'm doing is the title screen splash, and intro graphics, which are nothing more than stills, like how Castlevania Drac X on the SNES does for it's intro demo)
Posted: Wed Oct 10, 2007 10:38 pm
by Chilly Willy
They REALLY want to look at Chris Hecker's articles on texture mapping. What he covers is about the limit of what the 32X is capable of. His articles on TM are found here:
http://chrishecker.com/Miscellaneous_Technical_Articles
Posted: Thu Oct 11, 2007 4:43 am
by ob1
Ambitious. Really.
I have thought about such a thing one year ago, but without going deeper.
Chilly Willy wrote:... your best bet would be Gouraud shading.
I would have gone for flat shading : a single color by polygon (triangle ?).
@Dragon, your graphics friend can contact me for ASM and parallel optimisations.
Posted: Thu Oct 11, 2007 5:07 am
by Shiru
It's called 'Cel shading' (aka 'Toon shading'), not 'Cell'. Just read
wiki article to understand what you want.. I don't think it's possible for 32x (for realtime in-game graphics).
Posted: Thu Oct 11, 2007 5:11 am
by evildragon
I'll have her sign up on this site (or she may just use my account, don't know which).
Posted: Thu Oct 11, 2007 4:04 pm
by Chilly Willy
I figured he was talking about lighting as that's what most people mean when they talk about "shading". They want "flat shaded" or "gouraud shaded" or "phong shaded" polygons. Phong is pretty much beyond real-time 32X gfx. Gouraud should be possible. Obviously, flat shaded is what many games use on the 32X.
As "Cel-Shading" is beyond the 32X, I didn't even think about it.

Posted: Fri Oct 12, 2007 4:52 am
by evildragon
Ok, then we'll just do regular polygonal world. Don't know how good it'll look though.
Mainly, it's going to be like an RPG, has a storyline that's very deep, and the game will be LONG, and have great battle scenes that's not "menu driven" like Final Fantasy. (unless that finally changed? i last played 7)
I just can't code much anymore though, I got carpal tunnel now

so all I'm good for, for this game is, designing the storyline.
Posted: Thu Aug 14, 2008 7:47 pm
by TMorita
Shiru wrote:It's called 'Cel shading' (aka 'Toon shading'), not 'Cell'. Just read
wiki article to understand what you want.. I don't think it's possible for 32x (for realtime in-game graphics).
Depends.
Cel shading is comprised of two techniques: quantized lighting and black outlines.
The quantized lighting can be done with a single AND instruction.
The black outlines are expensive, because they're usually done by rendering the object twice or more times.
So, you can get half the effect for a very low performance cost.
Toshi
Posted: Fri Aug 15, 2008 7:15 am
by Chilly Willy
Well, if you made your subdividing affine mapper output one or two black pixels at the start and end on the line, then did the line with a pre-quantized texture, you could simulate cel-shading fairly fast. That would probably be the closest you could get in real-time on the 32X.
Posted: Fri Aug 15, 2008 7:56 am
by mic_
Shouldn't gouraud with an AND mask (and possibly a shift) be faster than using a pre-quantized 1D-texture? Since you'd get rid of the extra memory access required for the texel read.
I've never tried to do cel shading in a software renderer though, so I'm not sure.
I'm talking about paletted mode now. The gouraud inner loop gets more complex in direct color mode.
Posted: Sat Aug 16, 2008 6:55 am
by Chilly Willy
I was talking 2D textures. As I understand it, cel-shading is "cartoonizing" a standard texture mapped render. If the texture gets quantized to a single color, obviously using flat (gouraud) shading would be faster. If your texture doesn't quantize down to one color, then you're back to my suggestion. From the examples I've seen of cel-shading, it generally gets quantized to like four colors or so, so you still have a texture of sorts.