PDA

View Full Version : Performance: Poly vs. Nurbs


iC4
01-15-2004, 01:36 PM
If you are using opengl for displaying polys/nurbs, and let's say you have a very very complicated mesh - would the viewport performance be better with nurbs or polys?

DanyX
01-15-2004, 03:43 PM
You can't really say - it depends on the resolution. Ultimately of course, only polygons can be displayed by graphiccards so you have to "tesselate" your nurbs into polygons for the gc. Since this process requires cpu time to do, most of the time nurbs would be slower EXCEPT for the cases in which you are vertex-bound which is rarely the case with modern hardware. One such example is this: if you use thousands of polies to approximate a surface that when modelled with nurbs and converted to polies takes only a few because you view it from far away, then nurbs could be faster. But as anything in programming concerning speed: 1) it all depends and 2) measure it. Do both in a real world scenario (your real world scenario, that is) and measure.

hth,
Daniel

iC4
01-15-2004, 05:39 PM
thx, so in my case polys will be faster.

maybe not the right place, but maybe somebody has an answer.

what do you think is faster, displaying a object (which is build with voxels) as voxels, or converting these voxels with the marching cube alogrithmn and display it as polys.

The object is only a "voxel-skin", so there are no voxels inside the object

DanyX
01-16-2004, 08:28 AM
How would you display voxels directly? Are the voxels opaque? Without this info it's hard to answer :). Marching cubes is relatively fast but beware that it is patented - there is an alternative somewhere I think, try a search in google or www.flipcode.com, I think I saw a post regarding this topic some (long) time ago there.

cheers,
Daniel

iC4
01-16-2004, 09:38 AM
well...that is the question I'm asking myself the whole day. How should I display them? They are not opaque.

The idea behind this is the following:

You will start and model some simple poly geometry. Then you smooth this geometry (at least if you want some organic shapes). Now you convert these polys into a Voxel object. This means you specify how much detail you want, and than the polyobject get "skinned" with voxels (only a voxel skin, there are no voxels inside the model). Now you can use various brushes to add, and remove voxels from the object. With this method it's possible to paint geometry or just add little details like wrinkles etc.

Now I'm not sure if I should convert the voxels into polys and display the polys (the problem is it will also slow down if you wanna see all little details) or if I should display the voxels.
For displaying the voxels I found two methods, first the simple raycasting method and second this method where you use those polyplanes (like 3d texturing)

I don't think I will use the marching cubes algorithm, it was just an example. Since I have no real volume I can come away with a simpler algorithm. Allready have something in mind....

DanyX
01-16-2004, 09:54 AM
Interesting idea but I see some problems here. First the resolution would have to be pretty darn high if you should be able to add wrinkles that way. Isn't it enough to paint displace maps? What about Metaballs? They are basically voxels and there are well known algorithms for converting them to polies.

cheers,
Daniel

CGTalk Moderation
01-17-2006, 04:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.