Hi Seth, The OSG doesn't have this "general morph" capability that you are looking for. It's not something that is something that can easily be done with blending geometries as you'd need as working out the correspondence will be none trivial.
The way to tackle it would be to leverage the exisiting MorphGeometry functionality that uses two geometries with the same number of vertices and primitives to do the actual animation, these two end geometries you'd compute from your source geometries. With the source geometries you'd need to insert vertices (and associated texcoords etc) that correspond to both end geometries and split up primitives to make a single geometry that can be morphed to be compatible with the two end source points. One will also need to handle any differences in state in a compatible way - such as using multi-texturing to blend between different textures. The other way to approach it would be to using alpha blending to blending between the two versions. This is quite different effect though, but will be more flexible in terms of handling different types of objects and different types of state. Robert. On Mon, Feb 7, 2011 at 9:57 PM, Seth Berrier <[email protected]> wrote: > I'm looking to implement geometric morphing between two non-identical objects > (with different ploy and vertex counts). I stumbled upon > osgAnimation::MorphGeometry and have been playing with it a bit but have come > to the conclusion that it cannot do something this general; that it > implements Morph Target Animation and not general geometric morphing. Is > this correct? I say this as all the examples given morph between objects > with identical vertex and poly counts. Also, I see no mechanism in the > MorphGeometry class to establish correspondence points or vertex groupings > which would surely be necessary to solve this problem in general. > > The trick with morphing is mapping the vertices from one target to another. > That's kind of free when the targets are this similar (identical vertex > counts and identical vertex ordering for each object). I'm interested in the > case where it's not obvious, where vertex counts are different and more > information is needed to create and control that mapping as the object is > tweened. > > Anyways, is there anything that solves this more general problem in OSG? If > I were to implement this, would it be of interest to other (i.e. should I do > it in OSG and I should I do it carefully so that others could at least > attempt to take advantage of it ... as opposed to just hacking it together) > ;-) > > Seth > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=36443#36443 > > > > > > _______________________________________________ > 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

