Nurbs 3D engine?

Hi All,

AFAIK, 3d engines only render polygon based models. Is there such thing as a 3D engine that renders other types of models such as nurbs surfaces?

I don’t know of any engines that render NURBS directly, but most engines support converting NURBS into polygons (sometimes on-the-fly) and rendering those polygons.

In particular, Panda3D can render NURBS either pre-converted or on-the-fly, though it doesn’t do an adaptive tesselation (you have to specify the tesselation parameters yourself).

David

So if you had a highly detailed model with one version entirely nurbs and the other polys, which is more expensive on the cpu/gpu to render? In general, are many people using nurb surfaces/models in their games?

NURBS don’t lend themselves to rendering directly, by their nature. Triangles are the fundamental unit of rasterization; that’s why all 3-d engines (to my knowledge) convert the NURBS to polygons first before rendering polygons, as I just said above.

The advantage to having a highly detailed model in NURBS is that you could easily use this model to generate multiple versions of the same model in polygons, at various levels of detail. Some engines might do this for you automatically without your having to think about it, or even being aware that it is being done (though I’m not aware of any engines that actually do this). Panda will do it for you, but not automatically.

David

Most games try to minimize on polygons and introduce most of the detail that you think comes from nerbs via normal maps.

Nerbs surfaces are not even really consider for real time graphics. They do appear is in rendering for movies using raytraceing.

They are also using during production of the model. But normally the 3d artist converts them to polygons during the 3d modeling process.

hmmm, im wondering me about, why nurbs arnt used in game engines since years ago too…

nurbs would have some amazing positive points:
changed cv´s on the fly,
surface simulations,

negative:
texturing,
maybe shaders (mostly you have nurbs patches at more complex models),
obejct count overhead,

i think the most artist cant handle nurbs modeling, thats why nearby no engine support nurbs regulary without converting it. or is the object overhead the problem, i dont know…
:unamused:

in the end the gpu still renders triangles only. you could try to write a geometry shader to create the triangles from the nurbs on the gpu on the fly,thought.

Actually, thinking back to before subdivision surfaces was a buzzword (so like 8 years ago) I remember when NURBS modeling was all the rage. Back then people used NURBS objects for most smooth organic models because that was pretty much the only way to do smooth organic models. I never liked the NURBS approach to modeling however and much preferred the then obscure mesh smoothing tools, based on a polygon smoothing technique developed back in the late 70s.

Eventually however people discovered mesh smoothing tools, branded them “subdivision sufaces,” and now barely anyone models with NURBS (anyone doing animation anyway; NURBS objects are still the favored modeling approach for more drafting oriented work like car design.)

I don’t really know why people who aren’t that knowledgeable about 3D modeling think NURBS modeling is so great. I guess its because the model looks smooth right from the start and so it’s more straightforward to begin a new model that way. Ultimately however modeling with NURBS is a pretty painful process, because getting beyond the basic beginning is a major hassle. There’s a reason all the top modelers these days (I’m referring to people who do movies, where they don’t have to worry about the restrictions of a game engine) work in polygons.

yes its true that the gpu is only displaying tris. so tools like maya did this years ago, but why arnt using game engine this way? wouldnt it make it easier to touch the geometry for programmers and scripter? example: at the curve surface with nurbs you only have to touch a less of count of points for changing the curve, with polygons you have to touch lots of verteces. and yes sure the engine needs to touch, after converting, every vert.

Well, you’d need to talk to the graphics card manufacturers for that, it’s not the job of the game engine - the job of a game engine is to pass tris to the GPU.
Sure, you could send NURBS surfaces to the GPU instead but you’d need to write your own geometry shader which converts that into tris (which isn’t a bad idea actually). Geometry shaders are only available on the CVS head of panda yet, though.

the big point why nurbs brings mostly greater meshes is, they are exact or they could be exact.

its not true that all great modelers are using polygons for modeling.

at modeling side, some parts are faster to build with polygons and some are faster in nurbs.

and i dont think its a painful process, it just a bit more advanced process :wink: and if you understand the way how to do, it fasten up your work on some parts that much.

They are only exact if what you want to model happens to be a simple shape involving a nice, smooth, third-degree curve. A sphere can be exactly modeled with a NURBS. So can any of the Euclidean conic sections.

Other things are approximations. You can make a pretty convincing apple with a NURBS, but it’s not precisely what a real apple looks like. You can also make a pretty convincing apple with polygons, of course.

At the end of the day it comes down to artist preference. The VR Studio also went through a NURBS phase, in the late 90’s. It had its pro’s and con’s from a technical standpoint. For whatever reason, our artists prefer to use polygons today. Polygons also have pro’s and con’s.

If you have an artist that likes to models in NURBS, then you will need a way to render those NURBS. Do you know such an artist?

David

then the artist is called maya, yes you can render nurbs with maya, hallejulia! :wink: sorry

there lot of artist which are working with nurbs on this tinny ball called earth.

mostly designer are using nurbs for prototyping, a powerful and handsome tool -> studiotools. i had never the chance to observe a apple in nurbs :frowning: me included i never did a apple, shame on me. oh maybe i should do a fruitpot :smiley: a tradionelle eyes kill - stillife.

but from the coding side, it must be more handsome and efficent to touch a nurbssurface then polygons. sure you could do the same transformations with polygons, if you spend lot of time into deep mathematic functions and this everytime when you touching a polygon surface. but if the engine would be able to interpret the nurbs as nurbs you dont have to mind this.

again, a diplomatic answer: both ways are great, it just depends on what you plan to build.

if im speaking as a artist, why i have to mind the limitations of a engine, if i know that both ways would work?im fine with polygons, i never had a problem with, its only the logic which scream in me -> WHY?!?!? as a artist you need to have the skills to do everything, but why im not getting the right tools (engine)?

so, peace on nurbs and polygons!

peace&greetz
dirk

I appreciate the adding of geometry shaders. What about other newer Cg features (Keywords like noperspective, texture arrays, …)?

Actually, Panda just runs the shader through the Cg compiler, so those things should work fine, I think. (Just make sure you’re using a newer profile and basic-shaders-only is false.) The problem will be passing those things to the shader - setShaderInput only supports textures, matrices and 4-dimensional vectors.

Ok good to know. Then the Cg is updated to 2.1 in Panda3D 1.6.3? (I will try then to add at least array support if nobody is already doing this, maybe applying tons of uniforms is faster than aswell).

Cg is already 2.1 in the latest version. I think I upgraded it before 1.6.1 (not entirely sure though).

Adding array support shouldn’t be too hard, just a few data structures to store them in shader.cxx/shader.h and to pass them to the shader in glShaderContext_src.cxx. And of course the relevant accessors to ShaderInput.

shrug as you wish

Maya also converts NURBS to polygon just before rendering. It’s called “Tessellation”.

I remember reading about some nurbs (or just bezier curves?) support in dx9… or maybe it was dx11? Didn’t bother enough about it to actually remember where or when.

You can always model with NURBS then turn them into poly (but you’ll need to optimize the hell out of them), but try doing that the other way around!

And there are just some things that you can’t do with splines so a engine would have to do both poly and nurbs.