We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
openGL posterize? (Read 1195 times)
openGL posterize?
Jun 8th, 2007, 1:32am
 
hi all

is there a non-complex way to render openGL 3d scenes with a sort of "posterize" function (i.e. make it look more like cartoons)?

i had a look at gestalt library, there is a shadow demo that almost does it, but it's doing threshold instead and makes everything grey without colors (and actually gestalt had me totally lost after a while... guess you need to know openGL reasonably well before getting well stuck into it).

thanks for any pointers.

p.s. this is for a single machine, so might there, perhaps, be a way to manually do something to the video card to posterize?
Re: openGL posterize?
Reply #1 - Jun 8th, 2007, 2:07pm
 
there are a few ways to do that..
old techniques were edge-detection from models and render them, there were another technique i used that was to render scene twice, one time render with front face culling enabled and no depth test. just render it with no lighting and no color, then render normally with backface cull and depth test enabled.. it looked quite ok. if u want to use lighting and colors u could use a LUT of colors..

if you're up to shaders then u can use the edge detection filter in image space..

i think if you google for "realtime cartoon rendering" you will find relevant information about it..

anyway for the non-complex way i would go for the 2-pass render way and then try out in image space
Re: openGL posterize?
Reply #2 - Jun 8th, 2007, 5:51pm
 
thanks for the answer, i will try your non-complex way..!
Re: openGL posterize?
Reply #3 - Jun 9th, 2007, 4:44am
 
i built an example which uses cel-shading. you can find it at vic.pixelnerve.com at the processing section.
Re: openGL posterize?
Reply #4 - Jun 9th, 2007, 12:57pm
 
very cool, nicely done!
Page Index Toggle Pages: 1