what do u think about catmull clark

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

what do u think about catmull clark

Post by vectorcorpse »

i don't have time nor skill at the moment to try implement this on irrlicht engine, but i think irrlicht could gain with this. I'v been using catmull clark in blender and noticed that when activating catmull clark without applying it give out a nice realtime preview without adding poligons (it almost looks like 3d vector graphics since the line connecting the poligons bend), it's true that it get a little bit slower but it is nothing compared to when i apply it (a 600 poly mesh with a lvl 3 catmull clark can get to 20000 poly resulting in a slow render) i was using my laptop (radeon 9100 igp) and the diference os speed is huge but the look is the same the only diference is that without the extra polygons we can't add more detail to the mesh so the idea was using blender catmull clark preview to smooth low poly meshes.
take a look at blender and als found this sites on the net:
http://en.wikipedia.org/wiki/Catmull-Cl ... on_surface
http://www.gamasutra.com/features/20000 ... rp_pfv.htm
http://www.math.sunysb.edu/~sorin/onlin ... x2615.html
this one have an opengl example with source
http://prideout.net/projects.html
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

i think this is also called realtime tesselation.

i read ati and nvidia has hardware solutions for that, tho do not know the links to those at the moment.

try this link: http://forums.e-mpire.com/archive/index ... 6-p-6.html
Image
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

i think i was not very clear on my point, i mean, was referring to the optimization used on the camull preview, from what i understand they used Bézier and Non Uniform Rational B-Splines (NURBS) curves and surfaces.
check this out:
http://www.blender.org/documentation/htmlI/c3627.html
and this is a faster method to smooth geometry than adding more polygons like in tessellation or displacement mapping and it runs on old hardware with only a small impact on performance, also this could be combined with displacement mapping, tessellation and other future features, but for now it would give a great improvement on looks, almost for free :) i don't know if it is easy to implement, but this is only a suggestion.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

This technique only works for solid geometry and as our meshes are triangle lists rather than polyhedrons they have no volume or inside/outside information. So we'd need a whole new mesh format for this, it would make a cool custom scene node though
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

ya a whole new mesh format or .blend format would be cool, but not necessary, if we could for example load a normal b3d and then create a duplicate the same way we do to get normals from tangent space but in this case with the needed informations and apply the smooth with curved lines assingned automaticly (no need for configured by hand Bézier curves) has blender uses and discard the original mesh from memory would be enough and awsome. :D
in blender a low poly models looks so difrent with and without it, u have to try it out i think it is and noptimisation over the catmull clark effect rather the catmull itself since it gets the lines to bend before applying the catmull and adding extra poligons so i think when i mentioned catmull i made the topic a bit confusing, also the link on my previews post mantioning bezier is not also 100% acurate has what i ment is the effect ony blender that bend ths lines conecting the poligons without adding extra poligons and thus saving alot on performance while improving alot on visual.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

i just read about it a few hours ago. gpugems 2 has a chapter about it.

the idea of catmull-clark running on an irrlicht looks pretty awesome.

well, the idea is...polygons must be quads coz doing a subdiv on them is easier, just drop vertices in the middle of the quad and one at the middle of each edge. then check for flatness, do not tesselate on flat patches, only on non-flat polys.

it could be implemented using a custom scene node, though the mesh loader would have to be code reviewed and verified if they're loading quads. i know obj loader has four vertices in the face (f) tag, not sure about the others.
Image
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

well this is what i ment:
Image
Image
Image
and it is produced with this:
http://www.sgi.com/products/software/op ... bezcurve.c
http://www.sgi.com/products/software/op ... /bezsurf.c
http://www.sgi.com/products/software/op ... /bezmesh.c
u also have this:
Image
http://www.sgi.com/products/software/op ... /surface.c
both this, catmull clark and realtime tesselation are really apealing
but this one is 1st on my wish list since it works on old hardware and are not so power hungry.
sio2
Competition winner
Posts: 1003
Joined: Thu Sep 21, 2006 5:33 pm
Location: UK

Post by sio2 »

Google for "ati truform"
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

done, but i didn't understand your point!
was it a suggestion, a warning, is there any technical issue?
all i now is that blender can do curved lines in the wireframe in realtime without loosing much performance and works on all hardware i'v seen (ati, nvidia or intel on both linux or windows) (including an old radeon 9100 igp) and i think it would be cool to have it on irrlicht has an option and found those examples on sgi tutorials that seams to be the same method used on blender
from what i understand from blender docs they on catmull clark then used a non realtime subdiv and on the preview they used besier equations + nurbs
on realtime. correct me if i am wrong since i also want to understand better how they did it and if we could take advantage of it on irr. :D
has for ati true form, well i do have 1 radeon 9100 igp on my laptop and a brand new radeon HD4850 on my desktop, and it looks cool but if in fact ati true form is an ati only feature it doesn't seam to be a good idea to implement it.
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

it's not free anyway, either way you'll have to pay in order to get it.

it's just a matter of time and money, really.

hardware-wise, lod-ing is available in-hardware already, it's just a matter of paying for it, usually big houses will go for that, then i'm not sure about the masses.
Image
vectorcorpse
Posts: 86
Joined: Thu Feb 14, 2008 7:30 pm
Location: Portugal

Post by vectorcorpse »

I'v been studding how blender works, and a possible approach could be performing a simple subdiv has dlangdev mentioned and then use the created extra vertices has control points to apply nurbs on the mesh the more subdivs the better it will look but it will have some impact on the performance however i don't predict it to be all that bad since control points are not displayed, instead they are used to better deform the mesh.

One thing i am not sure about is if it will be posible to apply shaders over it since on blender it only shows a subsurf with catmull-clark on wireframe, solid shaded or textured and never saw with for example bump mapping witch would open up for other possibilities has using a normal texture map or a wight map to act on the nurb control points to get a pseudo displacement mapping. That could be combined with the current parallax mapping to smooth the edges of a low polly model.
Post Reply