Need Shader Help for Toon Render

Started by
3 comments, last by Matsy 18 years, 7 months ago
After looking over many documents on the net over and over again. I'm having a hell of a time wrapping my head around this. I belive the problem could be obvious but still need some help. But to get to the point, I render a 3D object and try to evaluate the normals of the surface as close as posible real time to then later ink lines on top to give it a pencil and paper kind of effect. I've read the atricle on the site here and even put the cod in verbatem and no effect. I think I just need some insight, it could be my images my approch. However any help to get to the bottom of this would be appreciated. Below are the images that I have right before my inking step maybe the images are crap and I need a second approch all together. I just cant for the life of me figure out how to get a single line out of the data. RGB has this: Alpha has: The alpha is the depth information, that also I am having a dificult time getting the info out of. I did sample it in multiple stages, but when I go to compare cross corners I cant seem to find the right steps to generate the line I'm looking for. Any help please, more on the algorith than anything else. Thanks.
Advertisement
are you talking about drawing outlines? usually this is done by building an adjacentsy list, that is a list such that for ever entry(triangle) it's children are all the triangles that connect to it, we want to draw lines only when we see a triangle that is visible(ie facing the viewer) and if one of the triangles adjacent to it are NOT visible, then we simply draw the edge that connects the two triangles, also draw edges of triangles that are not connected to other tirangles. never heard of the image space approach I'm gonna look into it. seems inefficent tho, but then again I never done implimented either.


Tim
Yeah, I heard about the adjacency list as well. There is actually an article on this site that talks about toon shading for directx 8.1. However I think it is doing something slightly different.

But yeah I would be interested in trying this list as well. Guess I was just trying to keep it on the hardware. Maybe I'll fiddle around with the edge list approch for a while and see what I can get there.

But yeah if you see something on the other and understand it please post it ;).
can you point me to the docs that describe this method, I'd like to read them for my sake.
Sure here are a few articles I read on the subject...

Gamedev's Article

Other

There are really a bunch out there though. This is all I could find from what i read erlier. Mostly I was linking from paper to paper etc... trying to get to the bottom of where the idea spawned. And how it works... but have not been very sucessful yet. Although I'm working alot and dont have the time id like to research.

Mostly these are "Image Processing" techniques to get the lines rather than calculating off the geometry.

This topic is closed to new replies.

Advertisement