Re: [osg-users] About Viewer->updateTraversal()
HI Rambabu, Your post is pretty meaningless so far, essential it's a vague something's wrong, somewhere vaguely related to update traversal possibly. Without further information there is nothing others can comment. Repeating the same completely vague information won't change this, you have to provide more information. The best thing you can do is run your application in a debugger and when it "blocks" stop the application in the debugger and found out what is "blocking". FYI, the update traversal doesn't block in normal function, I don't even recall anyone reporting such an issue. There is clearly something odd that you have done at your end, but until you provide more information there is nothing we can suggest what you might have done wrong. You have all the code, you are the only one right now with any chance of diagnosing what the problem is. Before you post please think about information you need to provide to explain what the problem is, we aren't gods that can peer inside your computer and know what is going on, you have to tell us or provide example code that we can run ourselves to see the problem first hand. Robert. On 27 December 2016 at 12:05, Rambabu Repakawrote: > Hi,Iam using osg 3.5.1 version Viewer->updatetraversal() blocking the output > means output becomes strucked. > > ... > > Thank you! > > Cheers, > Rambabu > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69773#69773 > > > > > > ___ > 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
Re: [osg-users] Material Properties to Change the Normal Intensity
Am 26.12.2016 um 23:56 schrieb Rômulo Cerqueira: Hi Sebastian, Are you planning on using the bump-maps alpha channel, or which alpha do you plan to use. I wanna to pass a reflectance value to be multiplied by the normal map (normNormal in fragment shader) to simulate real situations. For example, a steel cube (e.g. reflectance = 1.12) should reflect more than a plastic cube (e.g. reflectance = 0.6) for a real sonar. In this case, I need to pass this "reflectance" value to shader for each object present in the scene. Ok, then apply your normal-map and perform your calculation. Pass the reflectance either as 1) vertex attribute 2) uniform 3) in any fixed-state attribute (e.g. misuse the gl_FrontMaterial (via osg::Material)) So the simplest way is to add a float-uniform to the object to be modified and multiply your result with its value. The osgshaders example shows how to transport these values between the application and the shader. But this works properly only if you structure in a way that you can control the individual state-sets. What kind of input geometries do you use? Are the objects with the different reflectances models or can one model have multiple parts with different reflectance values? Any kind of geometries: cubes, spheres, cones, structures... Initially all parts of the same object will have an unique reflectance model. Ok, maybe my question was unclear: How are the parts strucured in terms of osg-nodes? In case you want to control per-object state you need to have it separated so it has its own stateset. Cheers Sebastian ... Cheers, Rômulo[/quote] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69770#69770 ___ 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
Re: [osg-users] Check if sampler2D is valid in fragment shader
Hi Rômulo, Hi, is there a way to check if a texture (as uniform sampler2D) is valid in fragment shader? There is no direct way. If you need shaders with and without texturing you should bind different programs to the affected geometries. Also OSG has the pragmatic-shadercomposition which allows you to use #defines to be set in the OSG-code. See the osgshadercomposition for reference. This is my current code: Code: if (textureSize(myTexture, 0).x > 1) { // do something with the texture } else { // process without texture information } You shouldn't use this. AFAIK there is no rule how the driver evaluates non-bound samplers, so this might lead to undesired behavior. Even if it is working it will cost some amount of performance. Cheers Sebastian ... Thank you in advance! Cheers, Rômulo -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69772#69772 ___ 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
Re: [osg-users] About Viewer->updateTraversal()
Hi,Hi,Iam using osg 3.5.1 version Viewer->updatetraversal() blocking the output means output becomes strucked. How can i eliminate this ? ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69774#69774 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] About Viewer->updateTraversal()
Hi,Iam using osg 3.5.1 version Viewer->updatetraversal() blocking the output means output becomes strucked. ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69773#69773 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org