Hi Paul,

First up, just try to get multi-texturing working without shaders. The techniques I suggest are pretty advanced so rather than go the whole way in one leap try standard multu-texturing. 

To apply a detail texture over the whole terrain you don't need to get hold of any vertices, you can just let OpenGL compute the texture coordinates for you on the fly using eye linear glTexGen.  You can use osg::TexGenNode to set this up, and then decorate the scene with a StateSet that enables the texture on the second texture unit. 

The osgshadowtexture and osgspotline examples do multi-texturing in this way, albeit in a more complicated way as they are using pre-rendering for the texture, and you'll just need a standard static texture.  The TexGenNode they use is also more complex than you'll need as they update the position of the TexGenNode per frame, while you'll just have to set it up at start up.

One you have everything setup you'll basically just have to decorate your scene with your detail texture Group and any subgraph below it will automatically have th detail texture applied.  The nice thing is that you won't have to modify the underlying subgraph in any way, and it'll work just fine for paged datasets too.

Robert.

On 9/15/06, Paulp1 <[EMAIL PROTECTED]> wrote:
Hi,
 
I'm interested in using Multitexturing and Detail textures with osgDem. I can't seem to get Demeter 4.0
up and running so I'm going to try with osgDem, however texturing was much easier with Demeter and I would like to get
the same results using osgDem. Robert was talking about this in an earler thread:
 
 
I would like to be able to use shaders to apply multitexturing but I don't know how to grab the vertices from the osgdem generated mesh
and what does Robert mean about a texture atlas in the above thread ?
 
Kind Regards
 
Paul

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to