[osg-users] Combining Textures
Hi, I am trying to combine two or more Textures. I read an OSG File in. After that I try to add a new Texture Attribute to my StateSet. E.g. the first Texture is a RGB Texture in the second one has some Alpha values. As result I want to see only the first texture at the texel where texture two the alpha value is set to transparent. Are there any Examples or can someone help me out? Cheers Ming __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Combing Texture
One Additional Information the only thing I see is that texture one is half transparent, but cannot see anything from texture two!! Why!! __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] adding Texture State
Hi, I'am trying to add a texture attribute to a existing stateSet. If I try to add the attribute with setTextureAttributeAndModes the list size increased but the Image I set is null. How do I correctly add a texture attribute?? Thanks Ming __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] adding Texture State
Hi Robert, I read in a OSG file. After that I want to add new Textures to Objects. One object can have more than one Texture. If I cannot add a new Texture. Here is some Code: osg::Texture2D* osg_texture = new osg::Texture2D; osg_texture-setImage(tImg); std::cerrTexture osg_texture-getTextureHeight()std::endl; //this is null!! But the Image File isn't null stateSet-setTextureAttributeAndModes(myTextureNumber, osg_texture, osg::StateAttribute::TEXTURE); Some Ideas? Ming Hi Ming, What do you mean by the image I set is null? If you want examples of how textures are set up have a look at the OSG examples - just do a search for texture2D. For instance osggeometry has a textured quad. Robert. On Fri, Jul 18, 2008 at 9:43 AM, ka Ming [EMAIL PROTECTED] wrote: Hi, I'am trying to add a texture attribute to a existing stateSet. If I try to add the attribute with setTextureAttributeAndModes the list size increased but the Image I set is null. How do I correctly add a texture attribute?? Thanks Ming Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. ___ 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 __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osg::Texture and stateSets
Hi, I am already looked at the optimizer. But still I cannot access my Texture ;(. stateset.getTextureAttributeList() is always null. Why? I can call the geode Name. I can call the Geometry - but no Texture!!! My OSG File: Geode { DataVariance DYNAMIC name cube.osg nodeMask 0x cullingActive TRUE num_drawables 6 Geometry { DataVariance DYNAMIC StateSet { DataVariance DYNAMIC rendering_hint OPAQUE_BIN renderBinMode INHERIT GL_CULL_FACE OFF GL_LIGHTING ON textureUnit 0 { GL_TEXTURE_2D ON Texture2D { DataVariance STATIC file images.jpg wrap_s CLAMP wrap_t CLAMP wrap_r CLAMP min_filter LINEAR_MIPMAP_LINEAR mag_filter LINEAR maxAnisotropy 1 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply FALSE internalFormatMode USE_IMAGE_DATA_FORMAT } } } .. Some Ideas?? 冯晨 wrote: Hi, I think osgUtil::optimizer::TextureVisitor should solve your problem.:) Good luck. 在2008-07-09 22:53:21,ka Ming [EMAIL PROTECTED] 写道: Hi, I got a Probel with osg Files, the File structure looks like: Group{ Geode{ Geometry{ StateSet{ Texture{ } } } } Geode{ Geometry{ StateSet{ Texture{ } } } } } The problem is if I try to traverse my SceneGraph I get the names of my geodes, but if I check the TextureAttributeList osg::StateSet::TextureAttributeList texAttrList = stateSet- getTextureAttributeList(); this list is empty. Why is this List empty, did I forget something? I want to access all Textures!! Thanks Ming Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. 网易首款免费3D网游“天下2”,6月6日激情公测 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osg::Texture and stateSets
Hi, I got a Probel with osg Files, the File structure looks like: Group{ Geode{ Geometry{ StateSet{ Texture{ } } } } Geode{ Geometry{ StateSet{ Texture{ } } } } } The problem is if I try to traverse my SceneGraph I get the names of my geodes, but if I check the TextureAttributeList osg::StateSet::TextureAttributeList texAttrList = stateSet- getTextureAttributeList(); this list is empty. Why is this List empty, did I forget something? I want to access all Textures!! Thanks Ming __ Unglücklich mit Ihrer Mail-Adresse? Millionen neuer Mail-Adressen - jetzt bei Yahoo! http://de.docs.yahoo.com/mail/wunschmailadresse/index.html___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] combining Opacity Maps with Effects
Hi, again the question, In front of my bump Map i got an opacity map. Bump map works. Opacity maps works also. But on the transparent areas in my opacity map, I cannot see the Bumpmap instead of that the I the background color is displayed. Here is an excerpt of the osg File: Group { nodeMask 0x cullingActive TRUE num_children 2 Geode { UniqueID Geode_0 name MyName nodeMask 0x cullingActive TRUE num_drawables 1 Geometry { StateSet { DataVariance DYNAMIC rendering_hint DEFAULT_BIN renderBinMode INHERIT GL_CULL_FACE ON GL_LIGHTING ON GL_DEPTH_TEST ON GL_BLEND ON Material { name mmaterial ColorMode OFF ambientColor 0.2 0.2 0.2 1 diffuseColor 0.8 0.8 0.8 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 shininess 0 } textureUnit 0 { GL_TEXTURE_2D ON Texture2D { file my OpacityMap wrap_s REPEAT wrap_t REPEAT wrap_r REPEAT min_filter LINEAR_MIPMAP_NEAREST mag_filter LINEAR maxAnisotropy 1 borderColor 0 0 0 0 borderWidth 0 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply FALSE internalFormatMode USE_IMAGE_DATA_FORMAT resizeNonPowerOfTwo TRUE } } } GEOMETRY DATA } osgFX::BumpMapping { nodeMask 0x cullingActive TRUE num_children 1 Geode { UniqueID Geode_1 name MyBumpMap nodeMask 0x cullingActive TRUE num_drawables 1 Geometry { StateSet { rendering_hint DEFAULT_BIN renderBinMode INHERIT Material { name bmaterial ColorMode OFF ambientColor 0.2 0.2 0.2 1 diffuseColor 0.8 0.8 0.8 1 specularColor 0 0 0 1 emissionColor 0 0 0 1 shininess 0 } textureUnit 0 { GL_TEXTURE_2D OFF Texture2D { file mytextureFile wrap_s REPEAT wrap_t REPEAT wrap_r REPEAT min_filter LINEAR_MIPMAP_NEAREST mag_filter LINEAR maxAnisotropy 1 borderColor 0 0 0 0 borderWidth 0 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply FALSE internalFormatMode USE_IMAGE_DATA_FORMAT resizeNonPowerOfTwo TRUE } } } GEOMETRY DATA } enabled TRUE selectedTechnique AUTO_DETECT lightNumber 0 diffuseUnit 1 normalMapUnit 0 Texture2D { UniqueID Texture2D_3 file textureFile wrap_s REPEAT wrap_t REPEAT wrap_r CLAMP min_filter LINEAR_MIPMAP_LINEAR mag_filter LINEAR maxAnisotropy 8 borderColor 0 0 0 0 borderWidth 0 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply FALSE internalFormatMode USE_IMAGE_DATA_FORMAT resizeNonPowerOfTwo TRUE } Texture2D { UniqueID Texture2D_4 file BumoMaP wrap_s REPEAT wrap_t REPEAT wrap_r CLAMP min_filter LINEAR_MIPMAP_LINEAR mag_filter LINEAR maxAnisotropy 8 borderColor 0 0 0 0 borderWidth 0 useHardwareMipMapGeneration TRUE unRefImageDataAfterApply FALSE internalFormatMode USE_IMAGE_DATA_FORMAT resizeNonPowerOfTwo TRUE } } } Any Ideas?? What is wrong??? Thanks Ming __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] combining Opacity Maps with Effects
Hallo, I got a Problem with a BumpMap und a OpacityMap. In my SceneGraph there two Nodes. A BumpMapping Node, this already works fine. But in Front of this Node is an additional Node, which should be an Opacity Map. Can I combine the Opacity Map with the behind Node? The problem is that i'm needed two Texture for a Opacity Map, right? And I cannot access the Bump Map Nodes as one Texture to combine this with my Opacity Map, right? Thanks for some help!! Ming __ Gesendet von Yahoo! Mail. Dem pfiffigeren Posteingang. http://de.overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgFx Effects
Hallo, I have problem to get the effects of my Objects. I read in a 3ds File. I know, that in this file bumpmapping is used. Now I want to traverse my scenegraph and wanted to know which object have a bumpmap (or another effect). How can I implement that? I trying to cast the Group or Node to an Effect, but this won't work. Any suggestions!! Regards __ Gesendet von Yahoo! Mail. Mehr Möglichkeiten, in Kontakt zu bleiben. http://de..overview.mail.yahoo.com___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org