Forums > Jitter

ogsl contour code? (aka toon lines)

April 18, 2008 | 4:53 am

I can find plenty of info on the web about programming the shading part of the cel shader look, but I can’t find any info on the contours as we call them in mental ray (aka toonlines). Has anyone accomplished this with Jitter? Toon lines?


April 18, 2008 | 5:56 am

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 237 277 48 196617 loadbang;
#P flonum 442 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 352 191 124 196617 pak param shininess 0.98;
#P flonum 315 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 254 191 97 196617 pak param edge 0.5;
#P flonum 389 132 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 354 132 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 319 132 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 284 132 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 241 151 185 196617 pak param specular 0.75 0.75 1. 1.;
#P newex 156 326 80 196617 jit.gl.handle foo;
#P flonum 373 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 338 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 303 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 268 95 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 225 114 185 196617 pak param diffuse 0. 0.25 1. 1.;
#P newex 225 240 231 196617 jit.gl.shader foo @name shady @file mat.toon.jxs;
#B color 5;
#P message 237 303 73 196617 read apple.obj;
#P newex 237 326 148 196617 jit.gl.model foo @shader shady;
#P message 58 231 68 196617 fullscreen $1;
#P toggle 41 231 15 0;
#P newex 83 206 35 196617 sel 27;
#P newex 41 206 40 196617 key;
#P newex 41 251 75 196617 jit.window foo;
#P newex 70 163 52 196617 s thebang;
#P newex 41 185 82 196617 jit.gl.render foo;
#P user jit.fpsgui 95 124 60 196617 0;
#P newex 41 98 66 196617 t b b erase b;
#P toggle 41 47 15 0;
#P newex 41 73 57 196617 qmetro 20;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P fasten 8 0 9 0 88 228 46 228;
#P connect 10 0 6 0;
#P fasten 9 0 10 0 57 246 57 231;
#P connect 2 1 5 0;
#P fasten 7 0 8 0 82 223 82 208;
#P connect 2 3 3 0;
#P connect 2 0 4 0;
#P connect 2 2 4 0;
#P connect 14 0 13 0;
#P connect 15 0 14 2;
#P connect 16 0 14 3;
#P connect 17 0 14 4;
#P connect 18 0 14 5;
#P connect 21 0 20 2;
#P connect 22 0 20 3;
#P connect 23 0 20 4;
#P connect 24 0 20 5;
#P connect 20 0 13 0;
#P connect 19 0 11 0;
#P connect 12 0 11 0;
#P connect 25 0 13 0;
#P connect 26 0 25 2;
#P connect 27 0 13 0;
#P connect 28 0 27 2;
#P connect 29 0 12 0;
#P window clipboard copycount 30;


April 18, 2008 | 6:44 am

Does this shader use texture coordinates? I have a strange seam that looks like a texture edge when I rotate the apple.

It looks mostly like it’s using facing normals to camera.
I was hoping for a better line drawing method than using the normal angle to camera, but this definately helps, thanks.


April 20, 2008 | 1:47 pm

I set the face cull to 1 and it helped


April 21, 2008 | 2:33 am

Thanks. I gotta finish up the jitter tutorials now before I ask anything I can find by doing them. :)


Viewing 5 posts - 1 through 5 (of 5 total)