Polygon Count

Post Reply
Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Polygon Count

Post by Sylus101 » Tue Nov 03, 2009 7:09 am

Hello again... I'm hoping all the questions are starting to lose steam... but it seems one always brings another.

At the moment, I'm trying my damnedest to limit the polygon count on my current mech model. According to the ply converter, the poly total when adding up the different model pieces (head, leg parts, etc...) should be 212.

Now that I have my new Acekard, I ran a test to see what the DS reports as the poly count with glGetInt(GL_GET_POLYGON_RAM_COUNT, &polycount); and it's reporting 183. I tested with one polygon and found that it gives back 0, so I'm gathering that 183 means I've got 184 polys.

I'm not sure why the difference. I've looked at my models, and the count of faces matches the 212. I thought, possibly that polys that are obscured by others are omitted, but I tested that theory out by just displaying a quad and a smaller one behind it, rotating to see if the count changed when both were seen or not and it was unaffected. Is there an optimization that I'm missing or not understanding perhaps? I'm quite happy that it's lower... I'm already experiencing the struggle of keeping below the 2048/1536 limit... but would like to understand why. Also, the count seems to flicker a bit... I added several extra swiWaitForVBlank() calls to slow it down, and it stayed at 183 but jumped just for a split second to 184 or 185 when each animation frame played. Those animation frames were just modifications of rotation values for certain peices.

Turning on Back Culling certainly works in lowering the count down to 124-ish, so that's good... but if I understand it, that's just omitting those poly's who's normals are pointing away...
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: Polygon Count

Post by elhobbs » Tue Nov 03, 2009 2:34 pm

is it possible that the model is being clipped by the frustum - maybe the near or far clip planes?

There is also the DISP_1DOT_DEPTH which could be removing very small polys.

what value are you passing to glFlush - 0,1,2 or 3? as I think I remember this having an effect - though it may have been strictly a z-fighting issue.

Sylus101
Posts: 179
Joined: Wed Dec 24, 2008 5:08 am

Re: Polygon Count

Post by Sylus101 » Tue Nov 03, 2009 4:37 pm

I noticed the 1 dot depth in gbatek and found it an interesting setting, but I'm pretty sure all of the poly's are large enough. That may not be the case though... I'll have to double check on that one.

The demo I posted at gbadev has a perspective view and I have attempted orthographic as well getting the same counts. The orthographic parameters are:

Code: Select all

glOrtho(-4,4,-3,3,-6,6);
so nothing should be being clipped. I haven't gotten to learning any of the options for glFlush() but I'll do some research on them now. I'm pretty sure all of the examples just use 0 so that's all I've been using.

Thanks again.
-Sylus "Not Stylus..." McFrederickson

Come visit my web site.

elhobbs
Posts: 358
Joined: Thu Jul 02, 2009 1:19 pm

Re: Polygon Count

Post by elhobbs » Tue Nov 03, 2009 6:42 pm

the 1dot depth is related to the size of the polygon after it has been transformed to screen coordinates - which depends on viewing angle and distance from the screen. you could set the always render polygon attribute bit to see if it changes the counts.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 6 guests