Original message
| Lord FlatHead  lordflathead@yahoo.com 112071624
| "Technical question for Zaldron" , posted Tue 27 Mar 09:10  
What the hell are NURBs, and what are they good for ?
-- "If fighting is sure to result in victory then you must fight even though the ruler forbid it; if fighting will not result in victory then you must not fight even at the ruler's bidding." -- Sun Tzu the Art of War
www.geocities.com/lordflathead
| | Replies:
|
| Zaldron  avengerz66@hotmail.com 18477495
| "Re(1):Technical question for Zaldron" , posted Tue 27 Mar 17:13  
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.
__________________________ _ _ _ "There are three kinds of death in this world. There's heart death there's brain death and there's being off the network."
|
| | Lord FlatHead  lordflathead@yahoo.com 112071624
| "Re(2):Technical question for Zaldron" , posted Wed 28 Mar 03:46  
Phew. Thanks.
-- "If fighting is sure to result in victory then you must fight even though the ruler forbid it; if fighting will not result in victory then you must not fight even at the ruler's bidding." -- Sun Tzu the Art of War
www.geocities.com/lordflathead
|
| Dima  alexsok@netvision.net.il 77090113
| "Re(1):Technical question for Zaldron" , posted Tue 27 Mar 12:19:  
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.
"We've been doing hacks and tricks for years but now we'll be able to do things we've been wanting to do for a long time" Carmack said. "For instance every light has its own highlight and every surface casts a shadow like in the real world. "Everything can behave the same now and we can apply effects for every pixel."
[this message was edited by Dima on Wed 28 Mar 23:37] |
| | Lord FlatHead  lordflathead@yahoo.com 112071624
| "Re(2):Technical question for Zaldron" , posted Tue 27 Mar 12:31  
OK, I'm still not sure I fully know what they are but thanks anyway.
-- "If fighting is sure to result in victory then you must fight even though the ruler forbid it; if fighting will not result in victory then you must not fight even at the ruler's bidding." -- Sun Tzu the Art of War
www.geocities.com/lordflathead
|
| deadnail  deadnail@yahoo.com 4957448
| "Re(1):Technical question for Zaldron" , posted Tue 27 Mar 09:25  
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.
_____________ ____ ___ __ _ http://www.deadnail.f2s.com "Call your damnable hunt. We shall see whom I drag screaming to hell with me."
|
| | masterhassan  jedimasterhassan@aol.com
| "Re(2):Technical question for Zaldron" , posted Tue 27 Mar 15:49  
can we still talk about milk¿
"Hassan chop"
"why are you late?" "my dog caught on fire and my house ran away."
"So a guy walks into a bar and says "ouch" " bum dum chi
|
|
|