Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Brett Gillick, posted on July 26, 2001

Image Description, by Brett Gillick

After seeing Tom Nuydens' ( demo I decided to try a little bezier patch programming for myself to see how fast it was.

The program creates a lump comprised of 4 patches which all use the same level of tesselation per edge which can be varied from 2 upwards. As you can see in the message box above, the level of tesselation was 233.75 sections per edge. The nVidia evaluators allow different tesselation levels per edge but I'm not that advanced yet.

The 2 left images show a wireframe view of the lump, while the 2 on the right show the filled version. If you can't read the numbers, the rendering in wireframe was running at 1 fps and filled was running at 6 fps, as the program uses no optimisation whatsoever, and reevaluates the patches every frame, this is quite good for rendering with back and front faces enabled. The second number is the difference in ticks from the performance counter from the last frame.

The program uses OpenGL for rendering, DirectX for input, and is running on an Athlon 1.2Ghz with 196Mb of RAM and a 64Mb GeForce2 MX.

Please don't email me asking about the patch evaluation as I copied the lines for rendering a patch from Tom's demo and have not had a chance to investigate what all the parameters in the call to glMapControlPointsNV( ... ) mean.

Brett Gillick aka Shabadoo

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

July 26, 2001, 02:27 PM

Cool !!

I'm nowhere near this yet but your shots look impressive.

Planning on doing a tut or exposing your demo ?



July 26, 2001, 02:52 PM

wow, the two to the left are wireframe? okay the lowerleft one was visible but the upper left one only shows by a pattern on its surface occuring :) thats quite the complex mesh (in raw numbers).
strange though that wireframe is slower then filled! (why back in my amiga days rant.....:)


July 26, 2001, 03:01 PM

For some reason, and I'd be interested in knowing if anyone knows why, the graphics accelerators are MUCH slower at rendering lines than whole triangles. I think the reason might be that lines are not hardware accelerated, and so they involve surface locks/unlocks or whatnot. I know DirectX does something horrible with lines, wasn't sure about OpenGL.

I first ran into this when I tried to put rain in one of my programs as a bunch of lines. I lost 5 FPS when I had the rain on, which seemed excessive. On a lark, I rendered the rain as superthin triangles instead of lines, and boom-- I lost 0 FPS.

So beware. Rendering with lines in your games is a baaaaaad idea.


July 26, 2001, 03:02 PM

wireframe is slower because most consumer 3d cards don't have dedicated silicon for line drawing. It's fundamentally a different operation to polygon filling, and would require extra die space.

What IHVs do is to simulate line drawing by drawing a set of polygons for the line. Unfortunately this means that to guarantee pixel coverage the driver has to render more than 1 polygon per line (IIRC there was a case of a card rendering something like 6 polygons per line, but that was a while ago).

So, you end up with the driver having to do a lot more work (to generate all those polys for the line), and the card has to do more rendering (i.e. triangle setup).

Cool app btw. Oh, and I would expect it to be *a lot* faster on a GeForce3 as the evaluator stuff is done in hardware on that card. The GF2 driver is having to do all the curve calculations in software, another reason for the somewhat low framerate.


July 26, 2001, 03:15 PM


Ewan Higgs

July 26, 2001, 03:33 PM

Because of occlusion. When you render, say a sphere you will only render the front three sides. The back three sides have normals that face away from the camera so they are not drawn. In wireframe, their lines are drawn no matter what. Boom!


July 26, 2001, 03:41 PM

I think you meant 'cube' and not 'sphere'...a sphere has alot more than 6 sides :)

I had heard somwhere that hardware draws lines as triangles with only an edge facing the camera.
Thus, to draw a single triangle in wireframe takes 3 triangles. one for each edge.


zed zeek

July 26, 2001, 05:26 PM

have u noticed any bugs with the nv_evaluators extension when the level of tesselation is set to 8?
ive gotten no answer back from nvidia with this assumed bug.
i have an example on my site (under extensions->nv_evaluators) .
btw give the mesh some candy shininess zed


July 26, 2001, 05:34 PM

there are two ways: rendering LINES ( glBegin( GL_LINES ); ) or draw WIREFRAME, wich means glBegin( GL_TRIANGLES ) but drawmode is GL_LINE

the second one means that only the edges of the triangle are rendered ( AND CULLED IF FACE BACKWARDS AND YOU ENABLED IT, ITS A TRIANGLE ANYWAYS! )

the first one means rendering lines, wich is then really completely different

and, if you have lines wich fill the screen cause they are so much, it does not wonder, cause the lines are all 3 drawn per triangle, even if they are onto each other, would mean 3 pixels rendered for a one-pixel triangle. if it is filled, its one pixel drawn


July 26, 2001, 06:23 PM

I don't know exactly how they render lines but in all regular 3D-cards line drawing is extremely unoptimized since it is very rarely used in games and other apps that home-users normally uses. Professional cards like Quadro or FireGL are much better at drawing lines since there are actually much more hardware support for such things. Geforce and Quadro are the more or less the same chipset. However, in the regular Geforce all the advanced features present in Quadro are disabled.


July 26, 2001, 06:26 PM

Thats backface culling but that is not the reason he get's lower framerates in wireframe since says he renders both front and back faces.


July 26, 2001, 06:52 PM

It's the top-secret design for the next Wonder Bra!


July 26, 2001, 08:02 PM

The Geforce2 is very slow at wireframe, strangely the Geforce3 seems MUCH better. Now in my geometry limited app, wireframe and solid modes give the same performance.


July 26, 2001, 09:07 PM

Gee, these posts sure enlighten me to the finer things game developers spend filling their minds with.

:) An excellent program, if you're going to do updates you should probably make a site for similar projects of yours.

I look forward to seeing it's progress.



July 26, 2001, 10:45 PM

Slower line rendering is caused by the fact that the drivers available for the Geforce cards don't optimize line drawing at all and the hardware has a few switches turned. Nvidia has a professional video card solution called the Quadro which has all the line drawing optimizations because things like autocad and 3ds max need good wireframe rendering. The thing is that the Geforce and quadro chipsets are the same so Nvidia needs *some* reason to charge an arm and a leg for the quadro, hence the difference in wireframe rendering which doesn't affect gamers too much but will professional users.


July 27, 2001, 09:30 AM

I've put up an exe and the code for the patch class here

BTW, I forgot to mention that the exe that I used for the screenies was a debug build. I've changed the background colour of the demo in the zip to make it easier to see the whole patch.

Keys for the demo:
W wireframe/fill toggle
E display tesselation level
R decrease tesselation level
T increase tesselation level
F1 fullscreen/windowed toggle
F2 640x480
F3 800x600
F4 1024x768
ESC quit

I don't recommend changing to fullscreen or changing the resolution as it wrecks the lighting and the patches are rendered white.

The demo doesn't do error checking so if you try to run it on a machine that doesn't support the NV_evaluators extension it will crash. You have been warned ;).

And, yes, it is the design for the new wonderbra but our funding ran out before we could design the second cup :(.



July 27, 2001, 09:40 AM

Hey zed,

Just did a test with a tesselation level of 8 and there were no problems at all.



July 27, 2001, 11:00 AM

My ATI Rage Pro renders faster in wireframe... Maybe that's the ONLY thing it does well =(.


Nick Van Tassell

July 27, 2001, 12:43 PM

Wow, we need to put a pair of these for Laura Croft's next Tomb Raider episode!


July 27, 2001, 01:18 PM

Er, right. Anyone ever seen a bra before?



August 01, 2001, 03:14 AM

Just for a laugh I though I'd point out that a sphere does not have more than 6 sides, it has exactly 2: Inside and Outside. :)


August 10, 2001, 12:26 AM

have anyone here wear a bra before? :)

This thread contains 22 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.