[jitter] vertex ordering for segmented tunnel
Brecht
Brecht at autofasurer.net
Fri Apr 18 17:40:58 MDT 2008
- Previous message: [jitter] Re: float into message for line
- Next message: [jitter] vertex ordering for segmented tunnel
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all, I'm attempting to create the wonderfull 'endless tunnel' effect in openGL. I want to do this by adding new segments in the distance, and remove them once the they moved passed the camera. Below is a little test setup but I'm having a few questions about it: - how to do the vertex ordering? Once I add a new segment (circle) things go haywire unless I use cylindrical segments, but then I can't stop thinking this is not very economical since I'd have to create the same set of vertices twice (end of segment 1 = beginning of segment two,...). This works, but seems wrong. - I don't understand where the pink is coming from...? It seems like the each vertex also contains color data? - eventually this will need to be done differently, since the circle of jit.gl.gridshape also point in the middle, which gets messy when making the segments not perfectly circular. any pointers? #P window setfont "Sans Serif" 9.; #P window linecount 1; #P newex 81 61 195 196617 jit.gl.handle tunnel @inherit_transform 1; #P newex 327 190 153 196617 jit.op @op pass pass + @val 0.2; #P newex 23 217 66 196617 jit.multiplex; #P newex 327 168 303 196617 jit.gl.gridshape tunnel @shape circle @matrixoutput 1 @dim 32 1; #P window linecount 2; #P newex 23 243 233 196617 jit.gl.mesh tunnel @draw_mode tri_strip @color 1. 1. 1. 1. @lighting_enable 0 @smooth_shading 1; #P window linecount 1; #P newex 23 168 303 196617 jit.gl.gridshape tunnel @shape circle @matrixoutput 1 @dim 32 1; #P toggle 23 44 15 0; #P newex 23 148 209 196617 jit.window tunnel @fsmenubar 0 @floating 1; #P newex 23 80 58 196617 t b b erase; #P newex 23 61 57 196617 qmetro 20; #P newex 23 129 95 196617 jit.gl.render tunnel; #P connect 7 0 9 0; #P fasten 9 0 8 1 332 211 84 211; #P fasten 10 0 0 0 86 108 28 108; #P fasten 2 2 0 0 76 106 28 106; #P connect 2 0 0 0; #P connect 5 0 8 0; #P connect 8 0 6 0; #P connect 1 0 2 0; #P connect 4 0 1 0; #P window clipboard copycount 11;
- Previous message: [jitter] Re: float into message for line
- Next message: [jitter] vertex ordering for segmented tunnel
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
