|
From: James W. W. <ja...@fr...> - 2005-07-07 01:20:46
|
I have just finished committing a cartoon-style renderer. The programming was started by a Siberian programmer going by the name Lloyd Bridges, under contract to ScriptPerfection Enterprises, and finished by me. I do not claim that the code is pretty or bulletproof, but it is enough for my purposes. This renderer is implemented as part of Quesa, rather than as a plug-in, because it calls a couple of internal functions of the Interactive Renderer. The main idea of cartoon-style rendering is to use relatively few distinct colors, giving a look that is somewhat "flat" but not as flat as using the NULL illumination shader or using nothing but ambient light. We also wish to emphasize the outlines. Usage: One way to get the Cartoon renderer is to enumerate subclasses of the renderer class, as the Geom Test sample does. Another way would be to use code like this: TQ3ObjectType cartoonType; Q3ObjectHierarchy_GetTypeFromString( "Quesa Cartoon", &cartoonType ); TQ3RendererObject theRenderer = Q3Renderer_NewFromType( cartoonType ); A TriMesh can be forced to be rendered by the standard interactive renderer by attaching an object property of type 'NCar'. The data in the property does not matter. Transparent trimeshes will always be rendered by the interactive renderer. -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |