Cartoon render

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
qBiN
Posts: 9
Joined: Sun Jun 18, 2006 10:45 am

Cartoon render

Post by qBiN »

subj. How to create cartoon render without shaders(on OpenGL && D3D)?
thx.
BlindSide
Admin
Posts: 2821
Joined: Thu Dec 08, 2005 9:09 am
Location: NZ!

Post by BlindSide »

This ones easy, just get an exact replica of the model, make it a very tiny bit bigger, flip the normals and make it have a solid black texture. This will give it a black outline and make it look cartoonish just remember to always place the bigger black version in the same place as and animate it the same as the original one.

Cheers :D
Anteater
Posts: 266
Joined: Thu Jun 01, 2006 4:02 pm
Location: Earth
Contact:

Post by Anteater »

Actually, you'll need to extrude all the faces connected (this is easily done in Anim8or). Simply scaling the mesh wont work 100%, unless the mesh is convex (very unlikely).
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

The best way to my knowledge right now, aside from shaders, is to have a copy of the mesh, expanded slightly along the polygon normals, flipped, and colored black; this, as stated before, will accomplish the black outlines.

To get shading you will either need to use a spherical environment map to fake it. Basicly, create a texture which is white for the top two thirds and grey in the bottom third, load this image as a spherical environment map with "multiply" blending, apply it to your model as the second texture layer, and set the model to fullbright.

I have yet to use this method within Irrlicht, as my current project does not call for it; though when using Blitz3D it worked just fine with splended results for not being shader driven. Though I see no reason at all as why this would not work within Irrlicht; so give it a try an' see how it goes for you :D
qBiN
Posts: 9
Joined: Sun Jun 18, 2006 10:45 am

Post by qBiN »

I can see your code?
AlexL
Posts: 184
Joined: Tue Mar 02, 2004 6:06 pm
Location: Washington State

Post by AlexL »

As I said, the code in which I used this was done in Blitz3D; which is a spin off of BASIC and not C++ Irrlicht code. If you really want, I could try to dig up the code I used for it, but I don't see it to be much use with Irrlicht :?
qBiN
Posts: 9
Joined: Sun Jun 18, 2006 10:45 am

Post by qBiN »

Two years ago I work with Blitz3d and I can understand code :)
Post Reply