Skip to main content
gamedev.net
🔒 Locked

Cartoon rendering

Started by r@ph 4 replies 1.5k views
Original Post
r@ph
r@ph
hello I have some questions about cartoon rendering in directX 9 There is a lot of tuts on the net to do that but none with textured models I have implemented one with a vertex shader but it only works with a single color mesh So do you know how to do that effect with a textured model (i have think of multitexturing but I'm not sure if it is the correct way) thanks
JanusFury
JanusFury
A textured model wouldn't really be cartoonish, would it? ;)

I'm not sure it's really possible to do what you're imagining, but you could accomplish something close by combining texturing with a cartoon-shade pixel shader. Just use the texel color instead of the vertex color (YMMV)
r@ph
r@ph
First thanks for your answer

I have tried the method explain at the end of the link above but it doesn't work well

I have certainly forget something :-(

If I test it on a very subdivised sphere it works (there is again some problems because the change of color take place where the vertex are so it is not very regular)

but on a lowpoly model it doesn't look like cel shading at all

here is the results I have :
http://r.nury.free.fr/sphere.jpg
http://r.nury.free.fr/farm.jpg

thanks
M3d10n
M3d10n
The first cell-shaded game ever (Jet Grind Radio) already did it with textured objects: the character themselves have textured details. You need to use two texture units: have the character texture on channel #1, and the cartoon 1D ramp texture on channel #2, with some blending (modulate works fine), and have your shader change the UVs of channel #2.
JanusFury
JanusFury
Quote:
Original post by r@ph
First thanks for your answer

I have tried the method explain at the end of the link above but it doesn't work well

I have certainly forget something :-(

If I test it on a very subdivised sphere it works (there is again some problems because the change of color take place where the vertex are so it is not very regular)

but on a lowpoly model it doesn't look like cel shading at all

here is the results I have :
http://r.nury.free.fr/sphere.jpg
http://r.nury.free.fr/farm.jpg

thanks

My guess is that the main problem there is that your ramp texture is far too low in resolution. I'm not sure how to get around the subdivision issue, though.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.