Search In
• More options...
Find results that contain...
Find results in...

# Technical question for Zaldron

## Recommended Posts

What the hell are NURBs, and what are they good for ?

They are part of the mammalian reproductive system. Both sexes have them although they only serve a purpose on the female. To continue, lets talk about milk.... oh, NURBS. Oh, oh. Whoops.

I am not Zaldron but I know one :)
NURBS are "theorical" surfaces placed in space. They can't be rendered, they are just mathematical alghoritms to calculate a single point of the surface in a "pretty fast" way. Quake 3 engine uses NURBS, what it does it very simple, it calculates many of this points using the equations, and then fills the rest of the surface by approximation, joining this points to create a lot of triangles. If your machine is powerful enough, you can order the Q3A engine to calculate many more points, making the curve much more smooth. Maybe in 2002-2003, computers will be fast enough to render Raytraced NURBS, those are NURBS where ALL the visible pixels of the curve at this moment are rendered, making them perfect (inside the limits of your current resolution).
In the nearby future we'll see models rendered with NURBS, so, expect VERY smooth bodies and weapon cannons, just to name a few.

OK, I'm still not sure I fully know what they are but thanks anyway.

They are part of the mammalian reproductive system. Both sexes have them although they only serve a purpose on the female. To continue, lets talk about milk.... oh, NURBS. Oh, oh. Whoops.

can we still talk about milk¿

If you check Dima´s reply, you´ll see that´s one of my older posts, when someone asked me exactly the same question. Anyway, I´ll try to make it easier to understand.

NURBS stands for non-uniform rational bezier splines. Now, that´s just a pretty name, let´s go for the real thing. Imagine a simple rectangle, not made by triangles, but from points. Make a grid on top of this rectangle, with whatever X whatever points. This are called "controller points".

Bezier was some guy who invented a set of algorythms that draws smooth curves between 2 points, taking in mind that there´s a vector on each point that specifies from where the curve "touches" the point. This is used for camera scripting, for example, where you have really complex curves where the camera body and pivot displaces. Another use´s on the creation of car´s blueprints, or complex architecture, etc. This are 2D curves, but the calculations can be adapted to work in real space.

The bezier "patches" (the rectangle) work the same way, move the points, and the surface will adapt to ALWAYS touch the control points, but mantain a perfect curvature. "Perfect" means "slow" in PC´s.

Imagine that you´re making a game where you use NURBS, as you can imagine, the bezier algorythms are pretty complex, a lot of trigonometry, some 2 unknow variables equations, etc...
If you had a NURBS on scene, right in front of your eyes, taking for example 400 pixels from the monitor, you´ll have to calculate 400 times this heavy algorythms each jiffie (1/60 of second) to get nice framerates. Obviously this is really slow in most machines.

So what Carmack did was known as aproximation. Instead of calculating the positions of every visible point of the surface all the time, the map files has just the results of SOME of the points, more or less scattered uniformily across the surface. Now, instead of processing 80,000 pixels, you have for example, 300. Now, the engine forgets everything about NURBS and those complex equations. It grabs the points and draw triangles, lots of triangles. Drawing 300,400 triangles it´s not big deal, since it´s just another brush. The process get´s even faster with LOD, since many of the points are removed while seeing these "pseudo-NURBS" from great distance.

Check every movie done with CGI. Those characters have always rounded surfaces. They´re made of NURBSs. When the artists make previews and testings, the 3D packages use this method to make things faster to visualize. When they´re rendering the real, master video, they switch to "Render raytraced surfaces", making each pixel of the surface recalculated for optimal quality.

NURBSs just a couple of algorythms, that based on the x,y,z coords of the "control points" allow you to calculate the position of whatever point of a theorical curved surface you want.

Phew. Thanks.