Re: [osg-users] How to Preserve FBX baked in textures when running running hardware skinning

2015-01-27 Thread Christian Buchner
The shader needs to receive a sampler uniform containing the integer value of a texture unit to use. The right way to do this would be to scan the subgraph of the model for state sets containing enabled texture units. Use a node visitor here. For each of these texture units, create a uniform

Re: [osg-users] How to Preserve FBX baked in textures when running running hardware skinning

2015-01-27 Thread Chris Hidden
Great thanks guys! This is the kind of lead I was looking for. Ill take a look at the shaderGen and I also have been poking around the fbxsdk which might help as well. Cheers! If I find a good solution and the time Ill try and post how I managed to get it working here later on. Thank

Re: [osg-users] How to Preserve FBX baked in textures when running running hardware skinning

2015-01-27 Thread Christian Buchner
hmm just googled osg ShaderGen and found this: http://trac.openscenegraph.org/projects/osg//browser/OpenSceneGraph/branches/OpenSceneGraph-3.2/src/osgUtil/ShaderGen.cpp This seems to create shader code based on some OSG states, but I have no idea how complete this implementation is. Also I have

Re: [osg-users] [Build error] GL_SEPARATE_ATTRIBS not declared

2015-01-27 Thread Robert Osfield
HI Sverre, On 27 January 2015 at 13:26, Sverre Aleksandersen sverre.aleksander...@gmail.com wrote: Shouldn't line 643 and 317 in osgTerrain/GeometryPool.cpp be GL_LINES_ADJACENCY_EXT instead of GL_LINES_ADJACENCT? That's how it's defined in GLDefines. Should really be the other way around,

[osg-users] SmoothingVisitor normals doesn't seem right

2015-01-27 Thread Ash Pat
Hi, I am trying to use the SmoothingVisitor to generate the normals. I am not explicitly setting the normals array. However, when rendered it appears as though the normals generated are flipped. The geometry consists of triangle and quad primitives. I tried it in two ways. Code:

Re: [osg-users] How to Preserve FBX baked in textures when running running hardware skinning

2015-01-27 Thread Chris Hidden
Ok so now back to the original intent with this question. So I can now attach a texture to my hand model with a vertex and fragment shader, which is great! I load the texture via its file path and send it along to the shaders. However I was hoping to find a way to do this in a different

Re: [osg-users] How to Preserve FBX baked in textures when running running hardware skinning

2015-01-27 Thread Trajce Nikolov NICK
Hi Chris, osg::ref_ptrosg::Texture2D texture = model-GetEmbeddeFBXTexture(); I think you have to write NodeVisitor that will traverse your model and extract the Texture from the StateSet. But you can also work with the texture that is mapped in your FBX model. I didn't followed your

Re: [osg-users] [Build error] GL_SEPARATE_ATTRIBS not declared

2015-01-27 Thread Sverre Aleksandersen
Hi, Shouldn't line 643 and 317 in osgTerrain/GeometryPool.cpp be GL_LINES_ADJACENCY_EXT instead of GL_LINES_ADJACENCT? That's how it's defined in GLDefines. Regards, Sverre A: On Sun, Jan 25, 2015 at 12:45 PM, Alexey Pavlov alex...@gmail.com wrote: 2015-01-23 20:21 GMT+03:00 Mattias Helsing