Cell Shading
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
Cell Shading
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?
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?
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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.
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.
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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
http://chrishecker.com/Miscellaneous_Technical_Articles
Ambitious. Really.
I have thought about such a thing one year ago, but without going deeper.
@Dragon, your graphics friend can contact me for ASM and parallel optimisations.
I have thought about such a thing one year ago, but without going deeper.
I would have gone for flat shading : a single color by polygon (triangle ?).Chilly Willy wrote:... your best bet would be Gouraud shading.
@Dragon, your graphics friend can contact me for ASM and parallel optimisations.
Last edited by ob1 on Wed May 28, 2008 9:06 am, edited 1 time in total.
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).
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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.
As "Cel-Shading" is beyond the 32X, I didn't even think about it.
-
- Very interested
- Posts: 326
- Joined: Mon Mar 12, 2007 1:53 am
- Contact:
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.
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.
Depends.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).
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
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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.
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.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
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.