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

Submitted by Marco Kögler, posted on December 30, 2000

Image Description, by Marco Kögler

Here's my little contribution to the IOTD gallery. I just saw another teapot IOTD and thought I would add mine to the list. The screenshot is from a program I wrote for a university project. The project was about interactively rendering bezier surfaces with OpenGL. You can load up models, select patches, play with the control points of the patch (the blue boxes) and see how the objects shape changes. The goal of the program was to visualize some basic properties of (cubic) Bezier surfaces. This was my very first attempt at using the MFC and I was quite pleased with the results, although using MFC is a pain in the ass.

Anyways, from a technical side the program still has a bunch of shortfalls. For example, it doesn't care about preserving continuity at the seams of patches and it only uses a recursive subdivision algorithm for rendering (far from optimal regarding speed). One of the better ideas I implemented was scaling the level of subdivision down when the user wants to interact with the selected surface. The proggy tries to maintain at least 15 FPS. In essence, a very crude form of LOD.

Oh maybe a short description of what you see ... the red patch of the teapot is the selected patch, the yellow transparent thing is its control point net. The rest should be pretty self-explanatory.

- Marco Kögler (MK42)

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.

December 30, 2000, 05:37 PM

Sweet. It's not suprising the program runs a little slow, it looks like a lot of polys in that modal! I'm going to take a wild guess and say...6000? It definately looks cool.


December 30, 2000, 07:00 PM

Nice. But 15 fps by itself means nothing. What hardware ? I'm sure that on PIII 600 it would run faster.
Famous teapot ... You could show us more original model. Wouldn't be better idea to rotate your model with mouse ? In this case you could show us just one teapot and your frames would be better.
Thanks for attention.


December 30, 2000, 07:22 PM

Oh, yes you said it "TRIES to maintain at least 15 fps"... Sorry.

"scaling the level of subdivision down when the user wants to interact with the selected surface"
This sentence is quite mysterious. scalling LOS down when dragging or what ? I think that if user selected surface then he wants to interact with it.


December 30, 2000, 07:48 PM

Perhaps Marco meant scaling down the rest of the model while keeping the current patch nicely subdivided? After all you don't care what the rest of it looks like when you're editing a small part.

And not to forget the picture itself which looks good! I do like those teapots.


December 31, 2000, 12:31 AM

"Wouldn't be better idea to rotate your model with mouse ? In this case you could show us just one teapot and your frames would be better."

You should write to Kinetix, Wavefront, Lightwave and all the other manufacturers of modellers/renderers out there and let them know that too. Seriously though, editors and modellers generally like to have all of those views available to see what their edits are doing to the object from all planes. That's why its pretty much an industry standard. As far as originality of the model, I dont think thats what this one is about. Teapot is a great model for showing off bezier editing, that is probably why it is so famous.

Anyway, nice IOTD. What is the Datei dropdown menu? What is a Datei? I assume it is in another language?

Lion V

December 31, 2000, 02:03 AM

I`ve seen alot of modelers, and that one takes the cake for a non-company one.
Extremly good.
I assume by preserving continuity you mean no holes in the model ?


December 31, 2000, 03:49 AM

yeah, I really like the yellow transparent polys to distinguish the control points... cool


December 31, 2000, 06:46 AM

bit64: "Datei" is the german word for "file"


December 31, 2000, 06:47 AM

First of all, thanks for the replies.

The shot is showing 8192 Quads (so 16384 triangles) in each view for the entire teapot. That sure is a lot of triangles and they are always generated dynamically from the Bezier description ... that means the CPU has a lot of number crunching to do as well.

Because I use uniform subdivision (i.e. even flat patches are subdivided) I generate a lot of geometry. Now, if you want to drag the control points the app is always regenerating the geometry and updating the display. This can get very slow, very fast. So, when the app is dropping below 15 FPS I scale the subdivision level down until 15 FPS is reached. When the user releases the control point I go back up to the selected subdivision level.

BTW, the teapot ... it's the 'classical' example (just as bit64 said) and therefore was ideal for a university project.

Lion V:
Thanks, but the proggy doesn't deserve that much praise. It would still take a ton more features to make this a pleasant editting experience. It's just a viewer which allows you to play a bit with the shape of the object.

Regarding continuity ... the program can ensure that no holes between neighboring patches appear, but in order for the edges to 'look' good you would also have to make sure that the gradient is continuous.

Still, thanks for all your thoughts,

- MK42

PS: Darn ... almost made the last IOTD this year :)


December 31, 2000, 07:09 AM

In this case showing multiple views has little sense. It would be much more convenient to rotate it easily with mouse.
As you probably noticed(I hope) that usually there are few views, and one of them shows 3d picture, and others shows 2d view from different planes to make easier editing. But that's doesn't apply to that case.

About words from different languages: how do you think, what means thore words and in which language :
Pagalvok labiau ...
It's not bad words, just sometimes useful..


December 31, 2000, 07:16 AM

Teapot is nice, but it's quite boring to see it every time ... :)
I always try to be original, so I think little different... That's not always good of course.
MK42 thanks for explanation. I really like those yellow semi-transparent planes. That's really cool. And original enough...


December 31, 2000, 07:57 AM

Actually I *do* have 3 2D-views (orhtogonal projections) and one 3D view. The 3D view can be used to rotate the model. The 2D views are used to move the control points ... or am I missing something here?

- MK42


December 31, 2000, 11:53 AM

Datei is the german word for file :)


December 31, 2000, 01:42 PM

Hey, I think you did make it to the last IOTD =]. I doubt flipcode will update it today.

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