Just a stupid question : if the bottleneck is the update of the hose, what would you think about using VBOs ?
Laurent Di Cesare a écrit : > Jean-Sébastien Guay wrote : > >> Hello, >> >> For now, we are creating some geometry (quad strips, specifically) to >> display the cables, and assigning texture coordinates to that geometry, >> on the fly. >> >> > (...) > >> I know the cable display needs to be optimized because if I just set the >> cables' nodemasks to 0, the draw times go from 6.6ms to 2.2ms (for the >> same view). And there are not *that* many cables... There's a lot of >> other geometry in the scene which is still drawn in the 2.2ms time... >> >> So I would appreciate some pointers. I would have assumed quad strips >> are pretty fast, so perhaps something else is the problem? >> >> There's the fact that the geometry is dynamic, which could mean that OSG >> is trying to recreate display lists each frame, but I tried >> setUseDisplayList(false) on the geometry and the cables just did not >> display anymore... Is there something else I need to do in that case? >> >> > I have a somewhat similar situation myself. I use capsules to display > hoses, > which aren't textured but just have a color, and use display lists. > Capsules are just cylinders and half spheres, but these are made of a > lot of vertices. > I ran at something like 1-2 fps(!) when I was redrawing the whole hose > everytime the hose changed. > When no geometry changed, I shot back to around 25 fps. > I got three times faster when I limited myself to changing only the end > of the hose, thus keeping the same capsules rather than replacing them > with new ones with the same coordinates, color, etc. > I then got another factor 3 by making sure I drew as few capsules as I > needed. > In my case too, the capsules are not that many, I have tens of animated > characters moving around, plus a scene to render, but the dynamic shapes > ate way more than anything else. > I'm not sure if this helps a lot, but I just did this today, and > optimizing the geometry was clearly a big win for me. > If your app doesn't change all the cables at once, only one part of one > cable at a time (a given frame), keeping the geometry should give you a > decent boost. > > If anyone else has other suggestions, I'm interested to hear them too. > > Sincerely, > Laurent Di Cesare. > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > --------------------------------------------------------------------------------------- > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > > > -- Remy Deslignes Ingenieur Developement / Software Engineer Tel: +33 (0)1.53.90.11.19 =========================================== Silicon Worlds S.A. 224, rue Saint Denis 75002 Paris France Tel: +33 (0)1.53.90.11.11 Fax: +33 (0)1.53.90.11.12 http://www.silicon-worlds.fr =========================================== _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

