Hi Robert, I used the addBindAttribLocation to the program but it generated an error. Because the compiling of the program gave another location to put my data. Anyway i will a another try to test it.
Cheers, Cedric -- +33 659 598 614 Cedric Pinson mailto:[email protected] http://www.plopbyte.net On Wed, 2009-10-21 at 13:51 +0100, Robert Osfield wrote: > HI Cedric, > > I can't add to the discussion on skinning specifically but general > notes about bounding box and vertex attribute location as something I > can chip in with. > > First up, the bounding box issue is something I'd be lazy and > conservative with - basically estimate the bounding box for the > largest possible extents of the skinned geometry. You can use the > osg::Drawable::setInitialBound() to provide the base. The actual code > and API in Drawable w.r.t actually needs a bit of revist, but as it > stands should be enough to get your going. > > W.r.t vertex attrib location & osg::Geometry, I've been doing a lot of > work on osg::Geometry and vertex attributes this month. osg::Geometry > itself hasn't had to have it's API modified, but the internal > implementation has been change substantially w.r.t supporting both > OpenGL and OpenGL ES 2.0, and now in conjunction with several > supporting classes provides automatic conversion of the standard > vertex arrays to vertex attrib equivalents. The arrays alias defaults > to using the same attribute locations as set out in the original > ARB_vertex_program extension, and these locations are bound to vertex > shader attribute names by osg::Program's support for assigning names > to attribute locations. Curiously to get it to work properly I've > had to disable display lists, so it does look like the driver is using > the osg::Program values to reassign the vertex attrib locations > dynamically. > > Anyway, the work I've done shouldn't effect the skinning side too > much, but I can say that it's perfectly doable to use vertex > attributes in osg::Geometry as they stand right now (even before my > changes) along with an appropriately set up osg::Program (via > program->addBindAttribLocation(name, index)) as long as you disable > display lists. There isn't any need to use a modified version of > osg::Geometry - and should be possible with OSG-2.8. > > Robert. > > On Wed, Oct 21, 2009 at 1:37 PM, Cedric Pinson > <[email protected]> wrote: > > Hi Andrey, > > > > I did a proof of concept to put needed elements to osg. The main problem > > is that currently there is no way to automatically get the location to > > put the vertex attrib data. > > The things i tried is to run the program once and dump the attrib > > location and then edit the program to assign it. But it's hard coded and > > not manageable for real use. The other stuff that would need some work > > is the way to compute the bounding box. We can have different strategy: > > - Define a specific bounding box, can be use when you just want to cull > > without small detail so you setup a maximized bounding box. > > - Define a low res skinning (software) and use the result to compute the > > bounding box. > > > > Currently the software implementation compute the bounding box from the > > original vertex transformed. It can consume too much time and if you > > have a lot of vertex and you just want to approximate the bounding box. > > > > There is a thread that talk about it > > Subject: [osg-users] Using vertex attributes > > Date: 08/10/09 04:12:14 (Sun, 09 Aug 2009 20:12:14 -0600) > > > > > > Anyway if you want to look to what is working, you can get my branch > > at hg clone http://hg.plopbyte.net/osg-trunk/ > > the code is disabled but can be enabled to try it. I wait Paul Martz > > submit its work about a new osg::Geometry that would be able to get the > > attrib location. > > > > Cheers, > > Cedric > > > > -- > > +33 659 598 614 Cedric Pinson mailto:[email protected] > > http://www.plopbyte.net > > > > > > On Wed, 2009-10-21 at 14:14 +0200, Andrey Krekhov wrote: > >> Hi, > >> > >> Currently I'm working on my Bachelor thesis within a project using osg > >> (and osgAnimation). One of my tasks will probably be to accelerate > >> osgAnimation by using the GPU. Thus, probably i will have to implement > >> Hardware Skinnig. Now my question: You mentioned that hardware skinnig > >> is one of your short-term goals. What are your current status concerning > >> this? Depending on that, I want to decide whether to wait for your > >> release or implement it by my own (shader or Cuda based). > >> > >> Thanks in advance, > >> > >> Greetings, > >> Andrey > >> _______________________________________________ > >> osg-users mailing list > >> [email protected] > >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >> > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
signature.asc
Description: This is a digitally signed message part
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

