Sunday, December 18, 2005

Why NURBS are not the last secret

It has been suggested that my little excursion into new development techniques has left out the topic of NURBS. I am happy to comply. However, this is a bit of a difficult subject to get into. The very basic idea is this: Rather than using two-dimensional geometric units (like polygons), NURBS models are using curved lines as its basis. Unfortunately, no simple explanation I found was satisfactory to a lay audience (like myself). So let us start with a short step by step guide to NURBS modelling, courtesy of Brian J. Immel.
* Lets use the Birail 3+ tool to create our mountains. Create two curves in a semi circle shape. These will be our rail curves.
* Create a series of curves with varying heights to be the high and lows of the mountain.
* Hit the Birail 3+ tool and select all the riders in a clockwise motion, hit enter and select both the rails.
* Delete history on the NURBS surface.
* Create two more curves at the ends of the rail curves. These will be our mountain base curves.
* Select the curves that form the ends of the mountain and break them into two curves (Edit Curves > Detach Curve).
* Select the base curves and the two broken curves and hit Surface > Boundary. Repeat this step for the other end of the mountain.
* Create a layer and put the mountain in it. Name the layer Mountain and turn it to reference mode. Now our mountain is complete.
I am sure you understand how this differs significantly from polygon-based modelling. Joel has written a very basic description of what NURBS are and how they differ from polygons:
There are 3 types of geometry, Polygons, NURBS, and Subdivision Surfaces.

Polygons
are 2D shapes. Mainly Polygons are color filled 3 or 4 sided, triangles or squares. Polygons are put together in different angles in XYZ to create 'meshes'. A mesh is just a group of joined polygons. (...)

NURBS (...) are curvy lines. It is like the Pen tool in Adobe Illustrator or Photoshop. These make nice smooth surfaces, not good for making hard corners like a box.

Subdivision Surfaces (...) are polygons with special areas that are super detailed and look like NURBS.
Though good to get us started, this was also a little brief. There is a more detailed comparison of those three techniques to be found at WebRef, but the server seems to be down, so I had to copy the article from the page´s Google cache.

The same head shown (left to right) in NURBS, subdivision (sub-D) surfaces, and polygons. Note that the NURBS model still needs a lot of rebuilding to get the mesh down to a manageable size; the sub-D surface is almost automatically clean and has dialable resolution; the polygon surface is lightweight but coarse.

Games use polygonal models exclusively. A polygon mesh, in its simplest form, is made of nothing but triangles. To add more resolution or detail to a model, you simply use smaller triangles. All 3D rendering hardware uses triangulated meshes as its ultimate data format, so this is the fastest and most efficient way to deliver geometry to a game. Although triangle meshes are very simple, working with them is not. For example, there’s nothing particularly intuitive about defining the shape of a human with a bunch of triangles. This is especially true when you have to carefully limit the total number of polygons in a mesh, as you do in a real-time 3D game. Probably the most essential skill to building 3D models in polygons is learning to make the most of the available polygon budget and to optimize the appearance of low-poly surfaces to make the most of what you’ve got.

For many years, NURBS (nonuniform rational b-splines) were considered the standard modeling format for film—and in many studios, they still are. NURBS excel in their capability to accurately define curves and surfaces containing complex compound curves. NURBS are also very intuitive for texture mapping. The down side to NURBS is that they’re a digital equivalent of rubber sheets. While you can stitch multiple sheets together to make surfaces that are too complicated to represent with a single sheet, it’s sometimes impossible to hide these stitched edges, particularly if the surface goes through dramatic deformations. Although to some extent NURBS are resolution independent—meaning you can view them from any distance and still see a smooth, unfaceted skin—in practice, NURBS surfaces are displayed using approximation, which can break down, showing holes or seams when you get too close.

Subdivision (sub-D) surfaces are the latest development in modeling methods used in games, television, and films. They work by fitting a smooth NURBS-like surface to a coarse polygonal cage. This lets you model with polygons to generate realistic, seamless surfaces that avoid many of the pitfalls of NURBS, while keeping the ability to create organic shapes typical of NURBS. Studios have been relying on sub-Ds for some time, but using them to model real-world objects is a relatively novel technique. Increasingly, modelers use sub-Ds to create characters and other models for real-time games because the sub-Ds let them produce high-res models for prerendered artwork and generating normal maps, as well as low-res polygonal models for in-engine rendering. These sub-D models can also be easily converted back to polygon models for high or low poly count use.
So NURBS have some pretty major disadvantages. There are clear advantages over the other two techniques, but they appear very specific. Apple´s Philip J. Schneider writes:
They can represent very complex shapes with remarkably little data. For instance, approximating a circle three feet across with a sequence of line segments would require tens of thousands of segments to make it look like a circle instead of a polygon. Defining the same circle with a NURB representation takes only seven control points!
These were some advantages and disadvantages. But how do developers weigh them up? Just how widespread is the use of NURBS today? The Wikipedia entry explains:
At first NURBS were only used in the proprietary CAD packages of car companies. Later they became part of standard computer graphics packages, including the OpenGL Graphics Library.

Real-time, interactive rendering of NURBS curves and surfaces were first made available on Silicon Graphics workstations in 1989. In 1993, the first interactive NURBS modeller for PCs, called NöRBS, was developed by CAS Berlin, a small startup company cooperating with the Technical University Berlin. Today most professional computer graphics applications available for desktop use offer NURBS technology, which is most often realized by integrating a NURBS engine from a specialized company.
So they are in widespread use, but not so for real-time graphics. Developers like Adger express the choice between polygons and NURBS like this:
According to most people, it's easier to model things like characters using polygon-related tools, as you don't have that pesky 'rectangluar topography' limitation that NURBS have. But later you get problems with texturing and animation.

NURBS are more suited to modeling real things, as you work with precise curves and lines instead of screwing around with polygons, and most products you see were designed using something that uses NURBS. NURBs parametric nature allows EXACT specification of curviture etc. Very handy for modeling exact things like boats, cars etc.
It should be clear from the above excerpts that NURBS are an interesting alternative to polygons in some fields, but will most likely not be used in any videogame console.

* NURBS are good for modelling curves but not so for corners and edges.
* Connecting planes using NURBS is difficult and leaves seams.
* Most developers work with polygons. Forcing them into NURBS-based modelling may not seem too attractive to developers and may not help third party support.

If anything, subdivision surfaces seem to be a promising technique that we may see more of in the future. But I am sure that the Nintendo Revolution will not force developers into non-polygon based modelling. For further reading that gets into the mathematical equations underlying NURBS modelling, I suggest this and this page.

Sources: Brian J. Immel, Joel, WebRef (Google cache), Philip J. Schneider, Wikipedia, Adger
Image sources: Brian J. Immel, WebRef (Google cache)

28 comments:

Anonymous said...

So if i get this right..Revo is least powerful from the rest BUT it has all kinds of tricks to make the graphs look bad ass in ordinary TV? =/

_Iceleaf

Falafelkid said...

Hi Iceleaf. Well, I think it is obvious that the Revolution will make up for the apparent lack in pure hardware power somehow. Let us not forget: Nintendo deliberately built the console this way. Though the lack of horse-power is also partly due to its size, they could easily have built a console that would have had terraflops of computational power. Why didn´t they? Because they believe they will be able to make up for pure power some other way. How? Well, there are not many aspects that may qualify here.

1.) innovation and originality: Offer people some new way of playing games. The Rev controller falls into this category, as does the DS.

2.) hardware solution Overcome a lack in hardware power by means of a more efficient hardware architecture. Both the Hollywood and Broadway chips may be able to deliver just this.

3.) software solution Overcome a lack in hardware power by means of a more efficient development process or technique. Nintendo´s patents regarding some kind of cube, parallax or displacement mapping would feature here.

4.) price Obviously, less hardware capabilities automatically means lower manufacturing costs means lower pricing. And a lower price makes a product automatically more attractive to consumers.

So which of these is it going to be? If you ask me, all of them. Regarding the subject of this post, though, NURBS will not feature here.

Anonymous said...

I think the best thing to me is price. I think im using the "classic" pad not remote so much..that goed for DS. I played advance wars with pads rather than touch screen. Ive heard that PS3 has like 70$ games (from 1up) and thats huge.And PS3 is costing like heck. +making games to PS3 costs like heck. And dont forget true backwards compapility. And sony said stuff like: PS3 can use 120fps but there isnt enough good TV's yet. But its totally useless cos eye can only see 50 =/ but after 5 years the PS3 graphs are looking like PS2 does now. When the jump from ps1->ps2 had same "wow realistic graphs" thing.

_Iceleaf

Anonymous said...

Nurbs sounds much more related to the creation of 3D objects than it does the end result; the final result as far as I can tell just translates into many more smaller polygons, while it would seem constructing the figure out of polygons from the start would require basically creating the object in reverse, piece by piece. If one could use the Nurb tech to create the model and then go in and lower the polygon numbers it would mean the ease of development using Nurbs but without the hastles.

I can't get over thinking that the Nurbs could add up to be more taxing on the CPU than going with polygons and texture effects; I maybe wrong.

Everytime I read about Nurbs I think of the Novint Falcon; I hope you know what I'm talking about. It is essentially the revmote with no buttons, it's not wireless, but it features force feedback which makes it perfect for carving 3D models inside the computer. It beats the hell out of a 2D mouse without any force feedback; and the device is suppossedly cheap. Nothing is stopping Nintendo from using the revolution remote as a 3D mouse to ease development on their console despite the lack of haptic feedback.

Anonymous said...

Nintendo has always taken a "minimalist" approach to their consoles, and the same is true of the Revolution. They have paid out I don't know how many millions of dollars to ATI, not to make some multi-core monstrosity but to create a graphics chip that includes only that which is absolutely necessary for next-gen graphics (and perhaps optimized for mapping tricks and the like).

Take digital cameras for example. You can get a 5 megapixel camera for hundreds of dollars less than an 8MP camera. Yet the visible difference in the pictures is minimal to the average person (particularly in standard size prints). Perhaps a strange example, but the point is that with high-end products you are paying a lot more for the small and often insignificant advantages that it offers.

Nintendo has has paid ATI to produce a streamlined graphics chip that, yes, is inferior to the competition's, but also supports the important next-gen graphical features at half the cost.

Anonymous said...

Sigh.

Here we go again.

NURBS is slowly being phased out from most design studios. It was once a great way for modelling organic sufraces but was quickly replaced by subdivisin surfaces (polygons).

It's also a pain in the ass to unwrap and texture. Creating additional local detail also involves adding a whole new isoparm around the model. This creates unnecessary detail in other areas.

You have to understand that NURBS will not be the "secret" that Nintendo is holding. In fact, NURBS has been around for over 15 years. It's a modelling tool. Plain and simple.

- Skwurl

Falafelkid said...

Hi Skwurl. Exactly my point. I trust you weren´t sighing in my direction...? ;)

Anonymous said...

Hey,

Don't worry. I wasn't sighing at you. I was sighing at the mininformed bunch who are still clinging on this theory.

Nurbies, I mean...newbies.

- Skwurl

Anonymous said...

"Remember ps1 FMVs those animations were made of Nurbs, 'cause playstation couldn't push 75,000,000 polys at that time, unlike now 250,000,000 polys and 120fps."

Doh.

Do you even know what a FMV is? It stands for Full Motion Video - AKA: Pre-rendered - AKA: Not real time.

The studio may have used NURBS for the FMV, but there was no 'real time' crunching going on.

My 386 could have played the FMV.

- Skwurl

Anonymous said...

I want to start a debate: do you think a visor is the last secret and is it a good idea

Anonymous said...

i was just wondering if the Hollywood chip done, anyone.

Anonymous said...

does noone read anything anymore

Anonymous said...

how about using two controller has that feature being talked about or that was a thing in the video, with the guy playing the drums.

Anonymous said...

What is up with all the hate?

I've posted this before but here is the man's quote in whole.

"People's idea that video games were American grade school kids with their face pressed up against the TV made us want to design the new controller. Boring things will become interesting. But, I can't say any more."

RGB said...

With all due respect D, we've seen that quote over and over too.

Anonymous said...

For fucks sake this one was too dumb man. Why would anyone use NURBS?
They are difficult to model with and no matter what they split into many small polygons anyway.


Not really. NURBS are hard to animate with, but they're great for modeling. At least, as with all modeling techniques, for certain things.

As for the last "secret", who knows.

I do hope they build a microphone into the controller though. I know my sisters would be way more likely to buy a Revolution if they could play Karaoke Revolution Revolution without shelling out for a microphone. Though maybe an addon would be a better way to go for that.

Anonymous said...

"With all due respect D, we've seen that quote over and over too."

I only posted it again because people were acting like children. I didn't really feel like looking it up again.

I guess we can blame the media for passing on the quote out of context.

Anonymous said...

NURBS in videogames are nothing special, however one might want to look at it. NURBS (or subdivs) are a method of modeling. However, NO renderer renders NURBS directly, ALL of them translates them into polygons before rendering. The nice thing about NURBS and subdivs is that the render can automatically rise or decrease the number of polygons in the translation depending on the level of detail that the each frame requires. But in the end, they are still polygons, and the machine is still capped by how many polygons it can output.

So all this junk hype of how PSP, Revolution or whatever can use NURBS in their games, is just non-sensical marketing hype.

4d ultrasounds said...

Nice site! I enjoy a couple of from the articles which have been written, and particularly the comments posted! I will definitely be visiting again!

find doctor list said...

I agree with your opinion. Your article is excellent. I have been examination out some of your stories and i can state pretty nice stuff. I look forward your next article. Its a great post.

Best Graphic Design Site said...

I am looking forward for your next post; I will try to get the hang of it!

Anonymous said...

The expectations of life depend upon diligence, the mechanic that would perfect his work must first sharpen his tools. See the link below for more info.

perfect @
www.inspgift.com

Anonymous said...

I like your post a lot! You should write some more on this!Great job coming with such terrific post!


alchemist
www.inspgift.com

aislinn said...

i must thank you for the efforts you've put in penning this blog. excellent blog post .

www.n8fan.net

alitaptap said...

hey there! i just want to give you a big thumbs up for the excellent information you have got right here on this post. and the rest of the website is good i'll share this to some friends. cheers!

www.joeydavila.net

Anonymous said...

smokeless cigarettes, e cigarettes, vapor cigarette, electronic cigarettes, best electronic cigarettes, electronic cigarette starter kit

andrea chiu said...


I was so impressed with your post and i want to see more of your write ups .Please keep posting. You can also visit my site. Thank you.

triciajoy.com

www.triciajoy.com

nikkisa889 said...

Can I just say what a relief to find somebody who actually is aware of what theyre speaking about on the internet. You definitely know learn how to bring a problem to mild and make it important. More people have to read this and perceive this aspect of the story. I cant consider youre no more fashionable since you positively have the gift. casino real money