## Buzz’s Blog: On Web 3.0 and the Semantic Web

April 8, 2011  9:56 PM

## Perfect curves: Bezier, part 3

Profile: Roger King

There is a problem with embedding images in ITKE blogs (or at least I have been having problems), so please look at this posting on the website I maintain for my animation students at the University of Colorado in Boulder:

http://wordsbybuzz.com/?p=334

Specifying Curves.

In the previous two postings of this blog, we looked at the problem of unambiguously specifying a curve with a minimal amount of information using a technique credited to a French engineer named Bezier.

Brute force curve specification.

For a straight line, all we need are two points to uniquely define a line.  For a curve, we cannot do this.  But by specifying a begin and an endpoint for a curve, along with one or more “control” vertices (points in 2-space that are actually not on the curve but infer its shape) and also providing a polynomial to go with these control vertices, we can define a complete, smooth, unique curve.  The other choice would be to specify every single point along the curve, at the granularity of whatever mechanism we are using to record or view the curve (such as a computer display).

Bezier curves.

So, we see that by using Bezier mathematics, it is far easier for an engineer to pass the geometry of a curve to whoever is going to build the car, or for a 3D animator to design the curve in the face of a human character that will be displayed on a screen.

But what do we do with these curves in the real world?

Look at the image below:

Straight line 3D objects.

We have three “wireframe” objects in the figure, all created with Autodesk Maya, the highly popular 3D modeling and animation application.  The one on the left is a straight line model, a cube, which is easily specified by simply supplying the x, y, z coordinate of the cube in 3-space.

Smooth curve 3D objects.

The middle object is a sphere.  It has been specified with curved lines, using a technique called NURBS, which is closely related to Bezier mathematics.  If you look carefully, you can see that all of the lines in this model are curved.

Imagine how much data would have to be recorded and conveyed if we had to specify every point on every curved line.  Now, looking back at the previous two postings of this blog, and using Bezier or NURBS curves to represent the curved lines that make up the sphere’s wireframe, we see that it would demand radically less data.

Polygon 3D, curved objects.

Now consider the wireframe on the right.  This one consists entirely of straight lines and presents an alternative to either using the brute force technique of specifying every point on a curve or using Bezier/NURBS mathematics.  The surface of the sphere is built entirely out of two dimensional polygons. But to make this sphere look smooth, we would need a lot of very small polygons.

Two ways of building 3D objects.

In fact, these are the two ways we use to specify 3D objects.  NURBS/Bezier curves and what is called “polygon” modeling.  We don’t use the brute force method.

And, we note that while Maya is used largely to build entertainment or informal models, other applications that are used to create precise engineering and scientific models use these two approaches for the most part.

More next time.

April 1, 2011  12:37 AM

## Perfect curves: Bezier, part 2

Profile: Roger King

NOTE: ITKE’s WordPress software has serious problems with embedding images in a posting, so to get the blog entry below, along with its images, please go to the blog I create for my animation students at the University of Colorado:

wordsbybuzz.com

Creating curves.

In the previous posting of this blog, we considered the problem of uniquely specifying a curve with a minimal amount of information.  Curves are a core building block for engineers, product designers, and artists.

A straight line can be specified with two points, but how do we specify a curve, like the ones on the bodies of cars or soda bottles?

The answer is attributed to a French car designer named Bezier.

The naive approach.

Consider the obvious, brute force way of doing it.

You want a curve to start at one point and end at another.  How do you uniquely define it? You can’t just supply a beginning and an end point.  How about three points, a beginning, a middle, and an end point?

The problem.

If those three points were spread across a computer display, our immediate response would be that there are almost countless curves that could go through those points, and the only reason it isn’t literally countless is that there are only a finite number of pixels on the display.

To make the curve truly unique, it seems like you’d have to provide every single point along the curve, with the only limiting factor being the total number of pixels in the display.

That is a very tedious way for a designer to convey the shape of a curve to someone building a car.   For one thing, how many points are along a curve on a car?  It’s not a computer display with pixels.  It isn’t at all obvious how many points you would need.

But Bezier realized that by providing just a handful of points, along with mathematical expressions called polynomials, a curve could be completely, unambiguously defined.

An example.

A popular form of a Bezier curve is is “cubic” curve, which requires only a beginning point, an end point, and two other points, along with two polynomials like the ones below:

The diagram below is characteristic of the Bezier approach, as well as several similar techniques.  The four points, including the two end points and the two points above the curve, along a couple of mathematical expressions, are all that is needed to create the curve in the diagram.

Yes, just four points and a little mathematics, and we get this curve:

This curve, by the way, was made with Rhino3D, a powerful and very elegant design application.

Next time, we’ll look closer at the intuition behind this – and at the magic it represents.

March 26, 2011  3:32 AM

## Perfect curves: Bezier, part 1

Profile: Roger King

Vector versus raster graphics.

There are two very different ways that computer programs can internally represent 2D images.  The first is the way a computer display presents images – as a 2D grid of pixels, each with properties that control its physical appearance.  We call this “raster” graphics.

The second is by using geometry.  An image is represented with lines, some of which might be straight and some of which might be curved.  We call this “vector” graphics.

But  here’s something very important and very intriguing…

Note that a straight line can be represented unambiguously with two points, a start and an end point.

But a curved line is far more complicated to represent.  It cannot be represented by a beginning and an end point – or at least we need more than this.  Three points won’t do it, either.  Or four.  You can lay down a large number of points, and there will be many, many curves that can go through them all.

This is a core problem underlying graphics and animation.

If we design a house using only straight lines, we know precisely how to specify the location of every line in 3-space.

But if we want to design, say, a car, there will be a lot of lines that are not straight.  Our car might have a lot of curves on it.  For that matter, our house probably has curves, too, maybe in a half moon window or the water heater or the bottom of a pool or the air conditioning ducts.

How do we tell the folks who build the car or the house precisely how to make those curved surfaces?

Bezier was an engineer who designed cars in France and he confronted this problem – and came up with an elegant, simple answer, one that requires a minimal amount of information that must be passed from designer to builder.

More next time…

March 19, 2011  12:55 AM

## A fantastic entry-level 3D modeling app

Profile: Roger King

3D graphics.

I teach 3D animation and use Autodesk Maya, arguably the most popular, powerful, and complicated general purpose 3D modeling/animation/rendering application available.  While there is a free and functionally complete student version, there is an investment of another kind – countless hours of frustration – that confronts the newbie.  And if you want to use it commercially, the cost is in the thousands of US dollars.

Simple, cheap, but powerful.

There are of course simpler 3D applications, and ones that are dramatically more affordable.  But I just came across one that is perhaps the perfect starting place for new 3D animators.  It is a modeling, texturing, lighting, and rendering application only, and does not have animation capabilities.

It’s a significantly scaled down version of an application that is in itself surprisingly easy to learn, despite its wide span of capabilities, Strata Design 3D CX.  While the full product runs about \$700, the cheaper version is \$50, and is called Strata Design 3D SE.

The SE version has a solid set of 3D polygon (straight line) modeling constructs, as well as Bezier (curved line) modeling primitives.  It also has a very good renderer and a nice set of materials that can be applied to models.  It is true, though, that some of the modeling, lighting, and rendering – and all of the animation – constructs of Strata Design 3D CX have been removed.

A crisp, clean interface.

Most importantly, its interface is very non-intimidating.  Its design was apparently highly influenced by the interface to Adobe Photoshop.  (The larger product, Strata Design 3D CX, has been built to interoperate tightly with Photoshop.)

Overall.

Strata Design 3D SE is perhaps the best compromise between power and simplicity.  It is a great place to start learning 3D modeling and rendering.  It is scaled down enough to learn relatively quickly, but can be used to create professional-looking models and renderings.  It is a lot of application to get for \$50.

I should note, however, that while the larger commercial product comes in both Mac and Windows versions, I couldn’t tell if there is a Windows version of SE.  (The Mac version can be bought at the Mac App store.)

And.

If you are interested, my Maya class website is: wordsbybuzz.com

March 12, 2011  12:47 AM

## An intriguing, mobile use of data management and data mining technology

Profile: Roger King

Help for people suffering from depression.

I have a friend who is working on his Ph.D. in clinical psychology.  He’s been studying a fascinating application of cell phone-based data management and mining.  It has to do with using cell phones to monitor the moods and behaviors of people with bi-polar depression.  This research started at Oxford University.

It works like this.

Patients (actually, he calls them clients) are issued smart phones.  Each client periodically receives a text message telling them to fill out a brief survey.  The goal is to get a real-time measure of the client’s bouts of mania and depression.

The underlying assumption is that clients tend to give very inaccurate answers if they are questioned after the fact, perhaps at the end of a day or week. By getting results in real time during the day and night, the psychologist can far more accurately diagnose the client’s illness and provide effective treatment.

An uplift for clients.

And, simply by being actively involved in their own medical care, clients are emotionally bolstered.

Compliance.

Early research results indicate that there is a high level of compliance – of people filling out the electronic surveys in a timely fashion.  This should be especially true for most young patients, to whom texting is already a part of their daily lives.

Mining the data.

The collected data is processed and graphs are automatically generated and made available to the clinician.  Patterns are detected and the hope is that triggers for mania and depression can identified.

It is anticipated that the same technique could also improve the diagnosis and treatment of people with schizophrenia and personality disorders, and for people with addictions to alcohol and other substances, as well as for people with eating disorders.

Sounds exciting to me.

March 5, 2011  10:39 PM

## Thanks, gamers, for the killer machine: Powerful hardware mass produced

Profile: Roger King

My old Dell.

Until recently I had a Dell desktop with a fast processor, a very good graphics card, a lot of memory.  It was not a high end machine, but I would have paid a lot more for it, if it had been necessary.  I teach 3D animation, using Autodesk Maya, and I also make desktop/voice video captures of my lessons, so that students can later download lessons and see exactly how specific tasks can be performed with Maya.

The high demands of animation and video.

The problem is that these two programs, Maya and the (extremely good) Camtasia desktop video capture application, together create a huge demand on my machine.  I used to have trouble running them both at once, and often my machine would bog down or lock up.

A new generation of amazing machines.

But something changed in the computing industry a couple of years ago.  Widely available computers meant for homes and small offices started shipping with dual core processors, 64 bit operating systems, four or so GB of fast memory, powerful graphics cards with a half gig or more of onboard storage, and disk drives cranking at 7200 rpm.  With this, consumer computing crossed over a critical line.  Suddenly, everyone could do graphics and animation.  My students stopped having to come into the university lab to run Maya on school Macs.

For me, the big issue was that I no longer had to budget in top of the line or highly upgraded hardware.

Why are they so cheap?

It’s because of gamers, that vast community of people who need extremely powerful machines that can render video in real time as they weave through battlefields and race car tracks.  The amazing part is that gaming demands are so high that I no longer have to buy high end machines.  That Dell of mine was a middling machine, one that was mass produced and found its way into the homes of people who do little more than browse, email, and edit.

My new Dell.

Things have continued to improve, of course, and one day that old Dell of mine, that I though was so magnificent, blew itself out.  It was still under extended warranty, and Dell sent out three waves of repair guys who were unable to make it boot.  Dell kept its word and shipped me, free of charge, a reconditioned machine.  This one is amazing.  I won’t spill out all the details, but let’s just say that it can run my resource-hog software, with every screenful popping up in a blink of the eye.

And to think that Dell actually has a line of machines that are more powerful than this one.  They are the ones that they market for gamers.

Thanks.

I’d like to thank the gamers for using their combined buying muscle to keep prices down and raise the standards for mass produced, at-home computers.

I’d also like to thank Ashish and Nathan at Dell for shipping me one hell of a replacement machine.

February 28, 2011  12:49 AM

## Moving to the next generation of computing technology: But the current one doesn’t work yet!

Profile: Roger King

The sorts of predictions you read about the soon-to-emerge new generation of personal computing technology include three interrelated

concepts.

1. Taking the weight off your shoulders and putting it in the cloud.

The vast majority of desktop and notebook computer users do not have the skills or the patience to maintain their machines.  When an application won’t install, when a machine freezes or won’t boot, when a new version of an operating system won’t run a critical application, most people spend a lot of time trying to make things work and often have to seek costly help.  Hardware is durable for the most part.  The problem is software, including operating systems, applications, and data.

Perhaps in the near future, much of this will be offloaded from the shoulders of individual users.  Much of the software we depend on will be off-site, on servers maintained by professionals.  What’s left in our hands or in front of us will be dramatically less complicated.

2. Bridging the border between handheld devices and desktop/notebook devices.

We tend to use multiple devices and they vary in their computational and data management capabilities.  But they are all computers.  Handheld and touch screen devices generally have cutdown operating systems, but they can do much of what a desktop or notebook machine can do.  Most of us would prefer to only have to master one kind of operating system, one way of managing applications and data.

3. Having the context of our work follow us from device to device.

So, the natural question is whether we will be able to move smoothly through the day from device to device and have our work move smoothly with us.  Perhaps we will be relieved from the tedious job of reconstructing the state of our work with each movement, as we go from home to office to handheld to public places.

But…

We tend to develop and adopt technological innovations before the old ones are perfected.  Is this good?  You could argue that the problems with the current technology inspire us to toss them aside and move on to better things.

Or you could argue that we compulsively grab onto whatever is new because somehow newness in itself is a natural and worthy goal.  We don’t want to be seen as left behind, behind the curve.  Quite frankly, some of us might be happier to simply have desktop and notebook machines that always boot, can automatically fix themselves when they break.  We might be better off with stable technology, rather than always-new technology.

February 19, 2011  9:28 PM

## Hey, go ahead and reuse my hair: What’s wrong with 3D modeling

Profile: Roger King

I teach introductory 3D animation at the University of Colorado in Boulder.  I was putting a lesson together the other day and was poking around some professional books I have, looking for ideas and tips.  I came across something that is not at all odd, at least not to someone who knows about 3D modeling.  But it might seem strange to someone who is not.

It has to do with hair.

Modularity is critical.

The tip comes from a book called Mastering Autodesk Maya 2011 by Eric Keller, a very solid and comprehensive introduction to the popular 3D animation application Maya: “It is common practice to create a nonrendering scalp surface that can be parented to a character’s head and then apply the hair to the scalp surface rather than directly to the character’s head.”

Now, this makes a lot of sense.  One of the most important reasons is reuse; realistic hair can be a tedious thing to construct, and if it is attached to a moveable scalp, the same hair can be used on multiple characters (with perhaps some changes).

This is one, small example of the often very unnatural process that animators must endure while creating an animated scene.  In order to fully leverage their efforts, animators have to use a far more modular approach to building characters than nature uses.

Complex mathematics under the covers.

But this is only a very modest example of the often extremely indirect way in which highly complex 3D modeling and animation applications must be used.  A primary, subtle reason for this is that under the covers, hidden from animators, are very sophisticated mathematical computations that are necessary in order to mold geometric shapes into humans, horses, houses, and explosions.  What seems like almost arbitrary steps that must be performed to create animated projects are often a result of an animator’s imprecise and often highly inaccurate understanding of what is going on inside a modeling and animation application.

Tricks.

There’s more.  Professional animators learn countless tricks that can be used to create various desired visual effects.  The result is often very unintuitive ways of getting the job done.

Chaotic growth.

And 3D modeling and animation applications grown incrementally over the years as professional animators request more and more capabilities.

Frightening complexity.

The net effect of all of this is that these applications have massive, intricate interfaces that non-high powered users, as well as amateurs and hobbyists find daunting, and in fact, often intractably complex.  They take many years to master.

The hair is nothing.

So this little trick with hair is nothing compared to the overall overwhelming process of learning to master applications like Maya.

More next time…

February 12, 2011  1:07 AM

## WordPress spam: spoiling the fun and effectiveness of blogging

Profile: Roger King

My teaching blog.

I teach 3D animation at the University of Colorado at Boulder.  I maintain a website (see wordsbybuzz.com) for my students.  I create combined computer screen and voice capture videos of my lessons. I post the videos on the blog along with an overview of what each video covers. The idea is that using a 3D animation application is an extremely intricate exercise, and there is no way students can watch a demonstration in class and later remember how to reproduce a given technique when doing their projects.

By the way, if you have never used an application like Autodesk Maya, Luxology Modo, SideXF Houdini, or NewTek Lightwave, you might be blown away by the vastness and intricacies of their user interfaces.  (In my opinion Modo has the most intuitive interface of the applications in this list.)

Blog spam.

Building this website introduced me to a whole new world of spam.  I get maybe two hundred pieces of email spam a day and it has caused me to use rather aggressive spam filters.  The end result is that mail that I would have liked to read promptly and responded to gets dealt with only when I have time to scan my spam folders.  Or in the worst case, the mail disappears forever.

WordPress, the software I used to build my class site has proven to be just as much of a spam target as my email.  Before shutting off the ability to leave comments on my blog, I received hundreds, actually thousands, of fake comments posted on my blog.

Cutting off discussion.

Why?

But why are they doing it?  Why spam blogs?  They know I couldn’t possibly be reading these junk comments and certainly the folks who read my blog don’t read the comments.

It’s those URLs embedded in the spam comments.  Each of those comments gets embedded on my blog webpages, and these comments contain links back to the folks who sent them out. It’s not necessary for anyone to read my blog and actually click on those comments.  All that is needed is to have their links appear on my pages.  And by thus artificially ramping up the counts of of webpages that link to their pages, they make search engines deduce that these are very popular sites and should be prominent in search engine results.

Some help.

If you are having trouble with spam on WordPress, consider two plugins:

Akismet learns what’s bad – This one works like mail spam filters.  As you mark things as spam, it learns what to reject in the future.

Delete Pending Comments – This one will delete all pending comments at once.

But…

It’s too bad we can’t  have open conversations on blogs.  Greedy creeps steal the opportunity from us.

February 7, 2011  4:14 AM

## The Maxwell Renderer and the gray zone of 3D modeling

Profile: Roger King

3D modeling and rendering.

The huge success of Google SketchUp, the 3D vector drawing program, has spawned an emerging generation of 3D renderers.  While most other popular 3D surface modelers, like Autodesk Maya, Luxology Modo, SideFX Houdini, NewTek Lightwave, and Blender (which is free), have their own high quality renderers, SketchUp does not.  Several impressive renderers, which operate as either plugins to SketchUp or as importers of Sketchup models, are available.  Most of them can also work with other 3D modelers, like Maya.

The border between modeling and rendering.

There’s a soft border between modeling and rendering, and it has to do with the way materials respond to light.  Creating a object with a 3D surface modeler starts with the building of its geometry as a mesh that consists of straight lines and/or curved lines.  The most prominent straight line modeling is called polygon modeling because the surface of an object is built out of a system of 2D polygons.  You have to use a lot of polygons to make a surface that is not flat look smooth.  Curved line modeling is more complex mathematically and consists of building 3D surfaces out of a network of 2D curved lines.  Consider two u-shaped curves, with one sitting behind the other; by “lofting” between the two curved lines, we can create the hull of a boat.

The gray zone.

The gray zone happens when we take up the second part of the job, which consists of assigning “materials” to the surfaces of objects.  A new car would have a highly polished, reflective surface.  A hunk of granite would have a duller, speckled surface.

A third phase – and these three phases do not typically occur in a linear fashion, as 3D modeling is a highly subjective and iterative process – consists of adding lights to a scene, things like the sun and desk lamps and ambient light.

The fourth phase consists of rendering objects by letting the renderer calculate the movement of light as it reflects off of and refracts through objects.  In other words, the magic behind rendering, the  process that can make a very flat, dull SketchUp model look like a photograph, is highly dependent on the way materials in a scene interact with light.  The renderer controls this.

Combined materials and rendering applications.

This means that obtaining a powerful rendering, something that a grabs the eyes of a viewer, depends on the interaction between the materials applied in the modeler (such as SketchUp) and the way the movement of light is calculated in the renderer.  This has led the developers of many renderers to create their own materials editor, so that they can have total control of what happens when light hits the surfaces of objects in a scene.

This means that the modeler is used to create the outer skeleton out of straight and/or curved lines, but that its materials might not be used.  Rather, the assignment of materials and the creation of lights is done within the user interface to the renderer. Often, there are two separate programs, one is the materials editor and the other is the renderer, and they can be accessed through a common interface.

My favorite materials and rendering application is called Maxwell.  One way to look at it is that a modeler that does not come with a companion renderer might find its materials editor losing its starting position in the big game of 3D graphics.  It becomes a geometry engine and the rest of the job is done by a different product.

More next time…