Hi Alexandre, if you want to disable the texture that is bound to unit 1, you have to write a NodeVisitor that will traverse the statesets of the nodes where the texture to unit 1 is set, and simply switch that attribute to StateAttribute::OFF
Nick On Thu, Feb 5, 2015 at 8:03 PM, Alexandre Vaillancourt < alexandre.vaillancourt.l...@gmail.com> wrote: > Robert, > > This appears to be exactly the situation. Is there a way to see where this > feature is enabled and is there is a way to disable it? > > Thanks a lot! > > -- > Alexandre Vaillancourt > > 2015-02-05 13:54 GMT-05:00 Robert Osfield <robert.osfi...@gmail.com>: > > Hi Alexandre, >> >> It sounds like might be talking about a pre-rendered shadow texture >> rather than a shadow map. The OSG by default handles multi-texturing by >> simply blending them - this is part of the OpenGL fixed function pipeline, >> so it's not a case of enabling "shadow map", but simply blending a shadow >> texture on texture unit 1 with the base texture on texture unit 0. >> >> However, I'm just guessing, only you have the data and application in >> front of you. >> >> Robert. >> >> On 5 February 2015 at 18:28, Alexandre Vaillancourt < >> alexandre.vaillancourt.l...@gmail.com> wrote: >> >>> Gentlemen, >>> >>> Thank you for your replies. >>> >>> It turns out that the node is not bumpmapped with a shader (I've used a >>> nodevisitor to check if a program was loaded on a node's stateset and >>> didn't see any). However, the node seems to be having a shadow map. In our >>> model editor (Creator) there is an "extended material" on the node, and the >>> material has, among other things a surface modifier that has shadow map on >>> texture unit 1. Looking at the exported osg file, I don't see how this >>> texture is used as shadow map (I would assume a shader could need to use >>> it, but we're not adding any shader for now (I'm debugging)). >>> >>> Could it be that upon loading, the plugin for the .osg files assumes >>> that texture unit 1 would be the shadow map and enables it right away or >>> something like that? >>> >>> Thanks for your help! >>> >>> >>> -- >>> Alexandre Vaillancourt >>> >>> 2015-02-05 4:26 GMT-05:00 Robert Osfield <robert.osfi...@gmail.com>: >>> >>> Hi Alexandre, >>>> >>>> Does the scene graph code you have inherited contain use of >>>> osgFX::BumpMapping? >>>> >>>> osgFX::BumpingMapping It's a really ancient bit of the OSG so it's >>>> really how I'd tackle it these days but it provides the old style >>>> osg::VertexProgram and FragmentProgram. Have a look at the >>>> OpenSceneGraph/src/osgFX/BumpMapping.cpp so see what it's doing. >>>> >>>> Robert. >>>> >>>> On 4 February 2015 at 23:57, Alexandre Vaillancourt < >>>> alexandre.vaillancourt.l...@gmail.com> wrote: >>>> >>>>> Hi All, >>>>> >>>>> I'm not too knowledgeable in the field of shaders and bump map, but >>>>> lately I've had the task of fixing something related to it in our >>>>> software. >>>>> >>>>> The issue is that some faces in our software are bumpmapped (I see the >>>>> 3 different texture units used in the .osg file, as well as in the >>>>> original >>>>> .flt model), but the node itself does not seem to have an osg::Program >>>>> (nor >>>>> osg::VertexProgram or osg::FragmentProgram) part of its stateset's state >>>>> attributes. >>>>> >>>>> The question is this: is it possible that there is a way that a chunk >>>>> of code of OSG could set up bump mapping on a node by itsefl and NOT add >>>>> an >>>>> osg::Program to it? For instance, if it finds more than one texture units >>>>> in the .osg file, it would find a way to add a shader to enable the bump >>>>> maping..? >>>>> >>>>> I'm really wondering how that node could be bump mapped... >>>>> >>>>> Thanks >>>>> >>>>> -- >>>>> Alexandre Vaillancourt >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org