understanding "poly_mode" arguments

Roth's icon

I'm getting into the OpenGL aspects of Jitter for the first time and I wanted to find out if I understand the "poly_mode" message. In Tutorial 32j it says that the two arguments for "poly_mode" set wireframe/solid for the front and back of the object. Looking at Tutorial 33j I notice that "poly_mode" doesn't seem to make a difference unless both arguments are the same. I am guessing that one argument sets the wireframe status from the perspective outside the sphere and the other from the inside and the reason I don't notice the difference is that because if you trigger wireframe for the outside only, you see through to the solid setting on the inside. Is this right?

I guess my point of confusion is what you gain by being able to set each argument separately.

Roth's icon

Okay, lame I know, but I continued reading Tutorial 34j and found out about "cull_face" and it makes a little more sense. I guess I shouldn't be so impatient when I'm trying to understand things when I'm doing tutorials when I'm this night.

I'm still curious what kind of situations people use these wireframe features. I know back when I played around with some 3D rendering on my older Macs in the '90s wireframe was a prerendering necessity for designing scenes. Do you guys just use it for laying out things you plan to render in non-realtime? Or for some sort of live applications. Starting to feel like this amendment question might be a little silly too and maybe I should stick to tired responses and not tired questions.

seejayjames's icon

Roth wrote on Thu, 09 April 2009 00:03

I'm still curious what kind of situations people use these wireframe features.

I like having it as an option, it allows seeing more of what's going on behind it, and the texturing looks interesting as you change the dimensions (which you can't really see in solid mode except for the roundness of round objects). Also the points mode is cool too for that reason. Using jit.gl.nurbs or similar in wireframe/points can also help visualize the warping better in some cases, like a topo map or terrain.

I would like to see a dropdown menu in the help files for poly_mode, there's just the toggles, which led me to believe that only two modes were available when there are three: solid, wireframe, points. So I always use a dropdown with those entries and take the index into [pak poly_mode i i]. Also if you dig a bit deeper in the jit.gl.gridshape help file, you can enable drawing with jit.gl.mesh, which provides 11 additional modes for drawing (primitive modes). They interact with what poly_mode you're in, and not every one will have a noticeable effect, but some are quite different (quads, tri_fan, etc). Pretty cool.

line_width, point_size, and antialias 1/0 are also worth looking into, they make a big difference in what you can do and how things look. Big antialiased points will slow things down a lot, but moderate-sized ones look great.

Roth's icon

seejayjames wrote on Thu, 09 April 2009 11:24I like having it as an option, it allows seeing more of what's going on behind it, and the texturing looks interesting as you change the dimensions (which you can't really see in solid mode except for the roundness of round objects)

So do you use this different modes in your final projects? Or just while you are working?

seejayjames wrote on Thu, 09 April 2009 11:24
I would like to see a dropdown menu in the help files for poly_mode, there's just the toggles, which led me to believe that only two modes were available when there are three: solid, wireframe, points. So I always use a dropdown with those entries and take the index into [pak poly_mode i i].

Oh, thanks for mentioning this. I made the same assumption (although I was wondering about this since I had seen people mention point mode on the forum).

seejayjames wrote on Thu, 09 April 2009 11:24Also if you dig a bit deeper in the jit.gl.gridshape help file, you can enable drawing with jit.gl.mesh, which provides 11 additional modes for drawing (primitive modes). They interact with what poly_mode you're in, and not every one will have a noticeable effect, but some are quite different (quads, tri_fan, etc). Pretty cool.

Oh cool, I'll have to check this out. Looking forward to learning more about the world of OpenGL.

Axiom-Crux's icon

I use frontface poly 1 all the time, I love having the front be wire and the back solid.. also something that I didn't see in the doc anywhere is that there is polymoce 2 which is points, and if you turn on antialias 1 for the object and turn up the point_size setting you can get circular points that look really nice, also activate blend_mode 1 to make the antialiasing work properly