Archived

This topic is now archived and is closed to further replies.

Best way to do cel-shading?

This topic is 5594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So far I know of two methods of doing cel-shading. The method used by OpenGL programmers (having to do with 1D textures and the such). Then pixel shaders used by DirectX 8. Which method is faster? -- Ivyn --

Share this post


Link to post
Share on other sites
estenially both methods are the same. you could just use nvidia register combiners then yoy geth ehardware benefits like d3d8. though ussually in d3d8 you use vertex shaders. in any case both do the same thing. except one allows the hardware to do more then the other. however if you use nvidia or ati extensions then you get the benefit of the hardware just like in d3d8. you can also do cell shading in d3d8 using the "opengl method" of a lightmap texture done in software per vertex.

its up to you.

what to know which one YOU can optimize to be the fastest for your drivers? code each one up and test. you will find no significnt speed differences if optimized properly and all approiate extensions used.

Share this post


Link to post
Share on other sites
The vertexshader/vertexprogram version should be the fastest though, since the lighting will be done in hardware instead of software.


--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites
Like person said, there's no right way, nor best way. I did a whole game using only software based cel-shading, which is probably why I only got about 10fps on average. All cel-shading is is a special lighting calculation that maps out to a texture with the possible light shades (black, gray, white, for instance).

It's done the same way in software or hardware (Vertex Shaders) with thattexture, but when you use Vertex Shaders (either in Direct3D or OpenGL, oh, btw, reg coms are part of the shading component), you do the lighting calculations on the video card, which is MUCH faster than doing them on the CPU (which is why t&l became popular about 2 years ago).

Oh as a straight up answer though, using Vertex (and Pixel) Shaders is MUCH MUCH MUCH faster, but it's not limited to Direct3D (you can do the same thing in OpenGL). The speed should be equivalent. Those 2 methods btw are the same, except one takes advantage of hardware more.

Checkout my site for an example of doing Cel-shading (w/out hardware acceleration) with some source code.


"Love all, trust a few. Do wrong to none." - Shakespeare

Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan

[edited by - Dirge on August 18, 2002 2:32:06 PM]

Share this post


Link to post
Share on other sites