Hi Chirstoph, I'm surprised by you not getting any replies, guess everyone has been busy, or perhaps confused by what you are after.
It sounds like to me you just need to use the OSG's standard multi-texturing support, the OSG will manage handling of OpenGL versions/extensions for you so you won't need to worry about the OpenGL backend. All modern OpenGL hardware supports multi-texturing with the fixed function pipeline and with GLSL shaders, with GLSL you have greater flexibility and range of units that you can use. How many textures do you want to assign to a single mesh? W.r.t projective texturing examples have a look the OSG's osg::TexGen (which wraps up glTexGen), osg::TexGenNode and the examples that use TexGen. ~/OpenSceneGraph/examples$ grep TexGen */* -l osgcubemap/osgcubemap.cpp osgmultitexture/osgmultitexture.cpp osgoit/osgoit.cpp osgprerendercubemap/osgprerendercubemap.cpp osgspotlight/osgspotlight.cpp osgteapot/osgteapot.cpp osgtexture1D/osgtexture1D.cpp osgtexture3D/osgtexture3D.cpp osgtexturecompression/osgtexturecompression.cpp osgvertexprogram/osgvertexprogram.cpp osgvirtualprogram/CreateAdvancedHierachy.cpp osgvirtualprogram/CreateSimpleHierachy.cpp osgvirtualprogram/osgvirtualprogram.cpp osgvolume/osgvolume.cpp Robert. On 21 October 2012 12:17, Christoph Heindl <christoph.hei...@gmail.com> wrote: > Dear list members and OSG - Team, > > thank you for all the past and current efforts put into OpenSceneGraph! All > of my colleagues (including myself) enjoy using your product on a daily > basis. > > Currently, we are working on supporting texturing for product called > ReconstructMe (real-time 3d reconstruction). Basically what we'd like to > achieve is to use photos to texture a mesh. Our current state of development > allows us to generate UV coordinates for a single triangle mesh for each > photo (incorporates estimating camera position relative to mesh, determining > visible triangles, etc.). > > What we'd like to do next is to visualize the textured mesh. Since we are > all computer vision guys, we lack experience in computer graphics. Before > heading in the wrong direction, I'd wanted to discuss possible ways to > implement the visualization step with experts on this list. > > After a bit of research I stumbled upon the following approaches to > multi-texturing > - using ARB_multitexture extension. Seems to be limited by available > hardware units. > - using GPU multitexturing using separate texture units. Also limited by > available texture units on hardware > - using multi-pass rendering. Probably slower but not limited by hardware. > > Question 1: Is there a way to generically supply the textures and UV > coordinate sets and let OSG choose the best rendering technique from the > list above? > > Question 2: If not, how would I go about list item number 2 and 3? Are there > any samples around? > > Question 3: Since each photo covers only a portion of the mesh, I guess we > need to set texture coordinates for non-textured vertices to be outside of > the valid UV range (e.g. -1) and set a black-transparent border color? How > would one combine the textures in a such a way that either only the first > valid texture is applied to the mesh for any given triangle? > > Thanks in advance, > Christoph > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org