Re: [Maya2osg-users] Normal mapping
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-05-04 22:38:27
|
Hi J-S, I just tested the bump mapping and you're right. It is not working. I haven't used it in the last months and meanwhile Peter Particle, that is working on the osgAnimation exporter did some changes in the geometry export process. Maybe it is causing the problem you are noticing. The description of your shading network sounds as it is ok. Actually, there are some test scenes in the directory tests/project/scenes such as test_glsl_lambert_bump.ma that were working fine and now they are not :( I'll take a look at it as soon as possible and let you know. Thanks for reporting. Regards, On Wed, May 4, 2011 at 6:31 PM, Jean-Sébastien Guay <jea...@cm...> wrote: > Hello, > > I'm wondering what is needed to get normal mapping correctly exported. > In the log file, I currently always get the "No File Texture attached to > Surface Shader Bump Map Attribute !" message, which I can see is output > in mesh.cpp around line 380. The result I get is that the .osg file > contains a shader for normal mapping but the model does not have a > tangent vector array, so it looks all black. > > In my scene I connected a File texture to the "Bump Mapping" input of a > blinn material. In HyperShade I can see that blinn1.normalCamera is > connected to bump2d1.outNormal, and then bump2d1.bumpValue is connected > to file1.outAlpha. > > From the code, I can see that the plugin is looking at the normalCamera > input of the surface shader to get the bump2d node, and then the > bumpValue input of the bump2d node to get the file texture. That all > seems correct to me. > > I've added some debugging code in mesh.cpp around line 368. What I get > is that mBumpTexture has type kDependencyNode, not kFileTexture. Why? I > know too little about the Maya SDK at this time to know what to do about > this. Can a File Texture be extracted from the dependency node? (i.e. > there would be one level of indirection more than the plugin code expects) > > I can send the scene if you want. Hopefully my description above is good > enough. > > The other thing I think should happen is that if this code detects there > is no normal map (even if it is erroneous right now) then in some other > place in the plugin code, the shader used should not try to do normal > mapping. It seems that the test to see if normal mapping is used is not > the same. I can correct this later. > > Thanks in advance, > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jea...@cm... > http://www.cm-labs.com/ > http://whitestar02.dyndns-web.com/ > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > -- Javier Taibo |