Re: [osg-users] IVE Maximum File Size?
Hi John, I don't know of a reason why the .ive format should be size limited, everything is allocated dynamically on demand by the plugin. I haven't seen reports from the community w.r.t size issues with ive either, your experience is the first I've seen pop up. To investigate further try the sequences: 1) Write large model to .ive to result in a file exceed 1GB 2) Write same model to .osg 3) Load model into osgviewer to confirm that issue exists for this model. 4) Load model into osgviewer to confirm that issue does not happen. 5) use osgconv to convert the .ive model to second .osg file 6) Load .ive - .osg version of model into osgviewer, does it behave the same as the original .osg file, or the .ive? 7) Use a diff tool to compare the original .osg and the .ive-.osg version so see if anything has been lost in translation. Hopefully the above will give us a bit more information about the nature of the problem. Robert. On Tue, Mar 1, 2011 at 12:32 AM, John Kua j...@eecs.berkeley.edu wrote: Hi, We've been generating rather large IVE files which exceed 1GB in size and at some point when we attempt to open them in osgviewer, there's nothing there. However, if we write to the ASCII OSG format, we've been able to write larger files without problem. Is there some limitation in the IVE format? We're running OSG 2.8.3, compiled in 64-bit Windows on VS2008. -John ___ 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 definition lost
Hi Kim, I have attached the screenshot ( http://tinypic.com/r/wwnqmp/7%20http://tinypic.com/r/wwnqmp/7) of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, Hi Kim, I have attached the screenshot of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, On Wed, Feb 23, 2011 at 10:11 AM, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, Sorry, i'm not at work, i can only send you on tuesday next week :( , thanks for your support. On Wed, Feb 23, 2011 at 10:06 AM, Kim Bale kcb...@googlemail.com wrote: Can you send a screenshot, it might shed some light on the matter. Kim. On 22 February 2011 16:33, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, i wrote a really simple shader, which does nothing but assign red color to the model, but i see water like reflections on the model, thats why i'm confused :( , however, if i run the program with --disableShaders argument, then i loose all the nice effects and also the specular highlights on the model. Regards, On Tue, Feb 22, 2011 at 5:27 PM, Kim Bale kcb...@googlemail.comwrote: Hi Mahendra, Regardless of whether there are any other shaders at work, if you attached a shader to your model it should override any other shaders bound before it. I don't really know what else to suggest, there are too many unknown variables for me to diagnose the problem. I don't know what shader you used, or what material properties your model has etc. Regards, Kim. On 22 February 2011 15:54, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, still no result :( , i wrote two shaders and attached it to my model, and disabled useDefaultShader flag, but still i see specular hightlight on the model, exactly like in the water, still some shader working somewhere?? Regards, On Tue, Feb 22, 2011 at 2:57 PM, Mahendra G.R mahen...@mahendragr.com wrote: Yes, i will do that, thanks for your support Regards, On Tue, Feb 22, 2011 at 2:35 PM, Kim Bale kcb...@googlemail.comwrote: If you are disabling the default shader then the lighting effects you see will be the result of the fixed function shading. You should look at the specular properties of the light and the material and check that they are not too high. K. On 22 February 2011 13:29, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, I disabled the default scene shader and now the model looks very specular, though i see some color, does light source has any effect here?, Thanks, Regards On Tue, Feb 22, 2011 at 2:09 PM, Mahendra G.R mahen...@mahendragr.com wrote: Hello Kim, Thanks for the reply, i dont think its the problem with the shaders, but somehow the stateset of my model is being changed (i guess), Is there way to overcome this problem without disabling the shaders and loosing all those nice effects, basically my material ONLY has some color properties and nothing more!, btw, im using the osgOcean example file to load my model (does it matter?). Thanks, Regards On Tue, Feb 22, 2011 at 1:55 PM, Kim Bale kcb...@googlemail.comwrote: Hi Mahendra, osgOcean uses shaders for most of it's rendering techniques. By default osgocean will apply a default shader to all children that are added to ocean scene. Certain effects like the glare and depth of field shaders and fogging rely on a shader implementation to ensure that the relevant render targets are filled. The default shader provided by osgocean is very basic as I cannot anticipate everyone's shader needs. Thus if you want the default shader to take into account particular material properties you can either override the defuault shader or attach shader directly to the node you wish to render. Alternatively you may choose to disable the default shader, ( http://code.google.com/p/osgocean/source/browse/trunk/include/osgOcean/OceanScene#599) however you will lose the DOF, glare and fogging effects if no other shader implementation is provided. Regards, Kim. On 22 February 2011 10:28, Mahendra G.R mahen...@mahendragr.com wrote: Hi all, I'm using osgOcean and placing a model in the middle of the ocean, this model has some material properties (its basically a .ive file), when i load the model with osgViewer, its fine, i see all the colors etc. but when i render it placing it inside the ocean, i loose the features of the model. I read somewhere in the forum to try disabling the shaders and recompile osgOcean (though i felt it had nothing to do with the shaders, just gave a try), did anyone else try loading models in osgOcean ?? Regards, Mahendra -- http://www.mahendragr.com ___ osg-users mailing list osg-users@lists.openscenegraph.org
Re: [osg-users] [build] x64 library Dependencies for VC9sp1
Hi Craig, Hmm, at a short firtst glance the server and its raid seems to be ok... I'm not shure if I have the V3 package oin my laptop, so today evening I'll do a testbuild with a fresh downloaded 3rdParty Package. That will explain if you have a problem with you tools or if the packages are realy corrupted. Has anmyone else problems with the package? Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37188#37188 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] material definition lost
Hi Mahendra, This look like you haven't taken into account the glare rendering in your shader. If you want the glare pass to ignore your model you need to set the value in the glare buffer to zero See: http://code.google.com/p/osgocean/source/browse/trunk/resources/shaders/terrain.frag#119 (From the trunk version which uses MRT). Regards, Kim. On 1 March 2011 09:14, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, I have attached the screenshot ( http://tinypic.com/r/wwnqmp/7 ) of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, Hi Kim, I have attached the screenshot of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, On Wed, Feb 23, 2011 at 10:11 AM, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, Sorry, i'm not at work, i can only send you on tuesday next week :( , thanks for your support. On Wed, Feb 23, 2011 at 10:06 AM, Kim Bale kcb...@googlemail.comwrote: Can you send a screenshot, it might shed some light on the matter. Kim. On 22 February 2011 16:33, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, i wrote a really simple shader, which does nothing but assign red color to the model, but i see water like reflections on the model, thats why i'm confused :( , however, if i run the program with --disableShaders argument, then i loose all the nice effects and also the specular highlights on the model. Regards, On Tue, Feb 22, 2011 at 5:27 PM, Kim Bale kcb...@googlemail.comwrote: Hi Mahendra, Regardless of whether there are any other shaders at work, if you attached a shader to your model it should override any other shaders bound before it. I don't really know what else to suggest, there are too many unknown variables for me to diagnose the problem. I don't know what shader you used, or what material properties your model has etc. Regards, Kim. On 22 February 2011 15:54, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, still no result :( , i wrote two shaders and attached it to my model, and disabled useDefaultShader flag, but still i see specular hightlight on the model, exactly like in the water, still some shader working somewhere?? Regards, On Tue, Feb 22, 2011 at 2:57 PM, Mahendra G.R mahen...@mahendragr.com wrote: Yes, i will do that, thanks for your support Regards, On Tue, Feb 22, 2011 at 2:35 PM, Kim Bale kcb...@googlemail.comwrote: If you are disabling the default shader then the lighting effects you see will be the result of the fixed function shading. You should look at the specular properties of the light and the material and check that they are not too high. K. On 22 February 2011 13:29, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, I disabled the default scene shader and now the model looks very specular, though i see some color, does light source has any effect here?, Thanks, Regards On Tue, Feb 22, 2011 at 2:09 PM, Mahendra G.R mahen...@mahendragr.com wrote: Hello Kim, Thanks for the reply, i dont think its the problem with the shaders, but somehow the stateset of my model is being changed (i guess), Is there way to overcome this problem without disabling the shaders and loosing all those nice effects, basically my material ONLY has some color properties and nothing more!, btw, im using the osgOcean example file to load my model (does it matter?). Thanks, Regards On Tue, Feb 22, 2011 at 1:55 PM, Kim Bale kcb...@googlemail.com wrote: Hi Mahendra, osgOcean uses shaders for most of it's rendering techniques. By default osgocean will apply a default shader to all children that are added to ocean scene. Certain effects like the glare and depth of field shaders and fogging rely on a shader implementation to ensure that the relevant render targets are filled. The default shader provided by osgocean is very basic as I cannot anticipate everyone's shader needs. Thus if you want the default shader to take into account particular material properties you can either override the defuault shader or attach shader directly to the node you wish to render. Alternatively you may choose to disable the default shader, ( http://code.google.com/p/osgocean/source/browse/trunk/include/osgOcean/OceanScene#599) however you will lose the DOF, glare and fogging effects if no other shader implementation is provided. Regards, Kim. On 22 February 2011 10:28, Mahendra G.R mahen...@mahendragr.com wrote: Hi all, I'm using osgOcean and placing a model in the middle of the ocean, this model has some material properties (its basically a .ive file), when i load the model with osgViewer, its fine, i see all the colors etc. but when i render it placing it inside the ocean, i loose the features of
Re: [osg-users] [osgOcean] White bar present in underwater scenes using unmodified osgocean 1.0.1 and osg 2.9.11
Hi Tim, Could you send a screenshot, as it's hard to picture the issue from the description. Cheers, Kim. On 25 February 2011 23:26, tim paige tpa...@interfacedisplays.com wrote: Hi, When moving underwater at long last... found that upon using the '-' key to move underwater... a white bar (which seems to accumulate from the shimmering surface when first going to the sub-surface) appears in the middle of the screen. I am using Win 7 and have compiled with MS vs 2010 and osg 2.9.11 source. What would cause such an anomaly? It ruins what would be a very nice scene... Thank you! Cheers, tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37154#37154 ___ 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] [osgOcean] Shader again.
Hi Bawenang, You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. I'm not familiar with Delta3D but last time I heard about the osgOcean actor that was generated for it, it was using osgOcean 1.0. The version in the trunk now contains quite a few changes. The glare RTT camera simply takes the view and projection matrices from the main camera, so it shouldn't be behave any differently from your main camera. The glare is then rendered as a post render in a full screen quad. You can see an example of how to include additional elements into the scene in the OceanExample exe, take a look at the terrain and examine the shader that is attached to it. The shader shows you how to deal with the glare passes. Note: the version in the trunk is best for this. Regards, Kim. On 28 February 2011 06:25, Bawenang Rukmoko ben...@cs.its.ac.id wrote: No reply yet? I guess I've got to do this the hard way, researching them myself. :( Thanks anyway guys. Thank you! Cheers, Bawenang quot;There's no place like 127.0.0.1quot; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 ___ 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] [osgOcean] Shader again.
You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. *shouldn't K. On 28 February 2011 06:25, Bawenang Rukmoko ben...@cs.its.ac.id wrote: No reply yet? I guess I've got to do this the hard way, researching them myself. :( Thanks anyway guys. Thank you! Cheers, Bawenang quot;There's no place like 127.0.0.1quot; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 ___ 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] Render to texture for IPhone
hi, Sergey, Thank you for your help. I used Texture2D, not use mipmap. I need to render the camera frame to the whole size of viewer. Do you think it will improve my program's efficiency to use mipmap? TANG hybr wrote: Hi, Tang First thing that comes to mind - check if you disabled resizing of non power of two textures on texture with image from camera, as well as mipmap generation. Cheers, Sergey. 28.02.2011, 13:30, Tang Yu : Hi, I also met the same question about rendering to texture on iphone. I tried to render the video frame, captured from iphone's camera continually, as 2D texture of the viewer's background, but the speed is very slowly. How can i fix it? Thank you for your any help! Cheers, Tang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37168#37168 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37194#37194 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] material definition lost
Hi Kim, Still im getting the glare effect, this is my fragment shader.. // varying vec3 v_V; varying vec3 v_N; uniform bool osgOcean_EnableGlare; void main() { vec3 N = normalize(v_N); vec3 V = normalize(v_V); vec3 R = reflect(V, N); vec3 L = normalize(vec3(gl_LightSource[0].position)); //vec4 ambient = gl_FrontMaterial.ambient; //vec4 diffuse = gl_FrontMaterial.diffuse * max(dot(L, N), 0.0); //vec4 specular = gl_FrontMaterial.specular * pow(max(dot(R, L), 2.0), gl_FrontMaterial.shininess); //gl_FragColor = ambient + diffuse - specular; if(osgOcean_EnableGlare) { gl_FragData[1] = vec4(0.0); } gl_FragData[0] = vec4(1.0,0.0,0.0,1.0); } // Am i missing something?. Regards, On Tue, Mar 1, 2011 at 10:20 AM, Kim Bale kcb...@googlemail.com wrote: Hi Mahendra, This look like you haven't taken into account the glare rendering in your shader. If you want the glare pass to ignore your model you need to set the value in the glare buffer to zero See: http://code.google.com/p/osgocean/source/browse/trunk/resources/shaders/terrain.frag#119 (From the trunk version which uses MRT). Regards, Kim. On 1 March 2011 09:14, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, I have attached the screenshot ( http://tinypic.com/r/wwnqmp/7 ) of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, Hi Kim, I have attached the screenshot of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, On Wed, Feb 23, 2011 at 10:11 AM, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, Sorry, i'm not at work, i can only send you on tuesday next week :( , thanks for your support. On Wed, Feb 23, 2011 at 10:06 AM, Kim Bale kcb...@googlemail.comwrote: Can you send a screenshot, it might shed some light on the matter. Kim. On 22 February 2011 16:33, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, i wrote a really simple shader, which does nothing but assign red color to the model, but i see water like reflections on the model, thats why i'm confused :( , however, if i run the program with --disableShaders argument, then i loose all the nice effects and also the specular highlights on the model. Regards, On Tue, Feb 22, 2011 at 5:27 PM, Kim Bale kcb...@googlemail.comwrote: Hi Mahendra, Regardless of whether there are any other shaders at work, if you attached a shader to your model it should override any other shaders bound before it. I don't really know what else to suggest, there are too many unknown variables for me to diagnose the problem. I don't know what shader you used, or what material properties your model has etc. Regards, Kim. On 22 February 2011 15:54, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, still no result :( , i wrote two shaders and attached it to my model, and disabled useDefaultShader flag, but still i see specular hightlight on the model, exactly like in the water, still some shader working somewhere?? Regards, On Tue, Feb 22, 2011 at 2:57 PM, Mahendra G.R mahen...@mahendragr.com wrote: Yes, i will do that, thanks for your support Regards, On Tue, Feb 22, 2011 at 2:35 PM, Kim Bale kcb...@googlemail.comwrote: If you are disabling the default shader then the lighting effects you see will be the result of the fixed function shading. You should look at the specular properties of the light and the material and check that they are not too high. K. On 22 February 2011 13:29, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, I disabled the default scene shader and now the model looks very specular, though i see some color, does light source has any effect here?, Thanks, Regards On Tue, Feb 22, 2011 at 2:09 PM, Mahendra G.R mahen...@mahendragr.com wrote: Hello Kim, Thanks for the reply, i dont think its the problem with the shaders, but somehow the stateset of my model is being changed (i guess), Is there way to overcome this problem without disabling the shaders and loosing all those nice effects, basically my material ONLY has some color properties and nothing more!, btw, im using the osgOcean example file to load my model (does it matter?). Thanks, Regards On Tue, Feb 22, 2011 at 1:55 PM, Kim Bale kcb...@googlemail.com wrote: Hi Mahendra, osgOcean uses shaders for most of it's rendering techniques. By default osgocean will apply a default shader to all children that are added to ocean scene. Certain effects like the glare and depth of field shaders and fogging rely on a shader implementation to ensure that the relevant render targets are filled. The default shader provided by osgocean is very basic as I cannot anticipate everyone's shader needs. Thus if you want the default shader to take into account particular
[osg-users] Multitextures with alfa channel
Hi, i would like to apply 2 textures on the same quad, 2nd texture is type format of .inta with alfa channel. Could you help me how o set these textures to correct mixing on the same quat? First image is my solution of correct texturing on the quad. [Image: http://www.imgshare.cz/images/multiplete.jpg ] Second image is screenshot from viewer. [Image: http://www.imgshare.cz/images/multipeie.jpg ] osg code: create - screenQuad; init - sourceSceneTexture (osg::Camera::PRE_RENDER) init - mirrormask1 (.inta file) osg::StateSet *quadState = quadGeode-getOrCreateStateSet(); quadState-setTextureAttributeAndModes(0, sourceSceneTexture, osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); osg::TexGen* texgen = new osg::TexGen; texgen-setMode(osg::TexGen::SPHERE_MAP); osg::TexEnv* texenv = new osg::TexEnv; texenv-setMode(osg::TexEnv::BLEND); texenv-setColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); quadState-setTextureAttributeAndModes(1, mirrormask1, osg::StateAttribute::ON); quadState-setTextureAttributeAndModes(1, texgen, osg::StateAttribute::ON); quadState-setTextureAttribute(1,texenv); //prerender camera osg::ref_ptrosg::Camera textureCamera = new osg::Camera; ... //ortho camera osg::ref_ptrosg::Camera orthoCamera = new osg::Camera; orthoCamera-setProjectionMatrix(osg::Matrix::ortho2D(0, ms_setupview.vi[i].width, 0, ms_setupview.vi[i].height)); orthoCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); orthoCamera-setViewMatrix(osg::Matrix::identity()); orthoCamera-setViewport( ... ); orthoCamera-setRenderOrder(osg::Camera::POST_RENDER); Thank you! Cheers, Petr -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37197#37197 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] material definition lost
Hi Kim, Thank you very much, i found out the problem, i had to disable the glare in my code as well. Regards, On Tue, Mar 1, 2011 at 10:48 AM, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, Still im getting the glare effect, this is my fragment shader.. // varying vec3 v_V; varying vec3 v_N; uniform bool osgOcean_EnableGlare; void main() { vec3 N = normalize(v_N); vec3 V = normalize(v_V); vec3 R = reflect(V, N); vec3 L = normalize(vec3(gl_LightSource[0].position)); //vec4 ambient = gl_FrontMaterial.ambient; //vec4 diffuse = gl_FrontMaterial.diffuse * max(dot(L, N), 0.0); //vec4 specular = gl_FrontMaterial.specular * pow(max(dot(R, L), 2.0), gl_FrontMaterial.shininess); //gl_FragColor = ambient + diffuse - specular; if(osgOcean_EnableGlare) { gl_FragData[1] = vec4(0.0); } gl_FragData[0] = vec4(1.0,0.0,0.0,1.0); } // Am i missing something?. Regards, On Tue, Mar 1, 2011 at 10:20 AM, Kim Bale kcb...@googlemail.com wrote: Hi Mahendra, This look like you haven't taken into account the glare rendering in your shader. If you want the glare pass to ignore your model you need to set the value in the glare buffer to zero See: http://code.google.com/p/osgocean/source/browse/trunk/resources/shaders/terrain.frag#119 (From the trunk version which uses MRT). Regards, Kim. On 1 March 2011 09:14, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, I have attached the screenshot ( http://tinypic.com/r/wwnqmp/7 ) of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, Hi Kim, I have attached the screenshot of the image, can you please tell me why am i getting these water like highlights on the model, my shaders for the model just set a red color. Regards, On Wed, Feb 23, 2011 at 10:11 AM, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, Sorry, i'm not at work, i can only send you on tuesday next week :( , thanks for your support. On Wed, Feb 23, 2011 at 10:06 AM, Kim Bale kcb...@googlemail.comwrote: Can you send a screenshot, it might shed some light on the matter. Kim. On 22 February 2011 16:33, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, i wrote a really simple shader, which does nothing but assign red color to the model, but i see water like reflections on the model, thats why i'm confused :( , however, if i run the program with --disableShaders argument, then i loose all the nice effects and also the specular highlights on the model. Regards, On Tue, Feb 22, 2011 at 5:27 PM, Kim Bale kcb...@googlemail.comwrote: Hi Mahendra, Regardless of whether there are any other shaders at work, if you attached a shader to your model it should override any other shaders bound before it. I don't really know what else to suggest, there are too many unknown variables for me to diagnose the problem. I don't know what shader you used, or what material properties your model has etc. Regards, Kim. On 22 February 2011 15:54, Mahendra G.R mahen...@mahendragr.comwrote: Hi Kim, still no result :( , i wrote two shaders and attached it to my model, and disabled useDefaultShader flag, but still i see specular hightlight on the model, exactly like in the water, still some shader working somewhere?? Regards, On Tue, Feb 22, 2011 at 2:57 PM, Mahendra G.R mahen...@mahendragr.com wrote: Yes, i will do that, thanks for your support Regards, On Tue, Feb 22, 2011 at 2:35 PM, Kim Bale kcb...@googlemail.comwrote: If you are disabling the default shader then the lighting effects you see will be the result of the fixed function shading. You should look at the specular properties of the light and the material and check that they are not too high. K. On 22 February 2011 13:29, Mahendra G.R mahen...@mahendragr.com wrote: Hi Kim, I disabled the default scene shader and now the model looks very specular, though i see some color, does light source has any effect here?, Thanks, Regards On Tue, Feb 22, 2011 at 2:09 PM, Mahendra G.R mahen...@mahendragr.com wrote: Hello Kim, Thanks for the reply, i dont think its the problem with the shaders, but somehow the stateset of my model is being changed (i guess), Is there way to overcome this problem without disabling the shaders and loosing all those nice effects, basically my material ONLY has some color properties and nothing more!, btw, im using the osgOcean example file to load my model (does it matter?). Thanks, Regards On Tue, Feb 22, 2011 at 1:55 PM, Kim Bale kcb...@googlemail.com wrote: Hi Mahendra, osgOcean uses shaders for most of it's rendering techniques. By default osgocean will apply a default shader to all children that are added to ocean scene. Certain effects like the glare and depth of field shaders and fogging rely on a shader implementation to ensure that
Re: [osg-users] Multitextures with alfa channel
Hi, could you explain what the texgen is for? You could also try osg::TexEnv::DECAL instead of BLEND. This should make the bottom texture appear in all transparent regions. You might have to set a border with 0 alpha for the mask texture depending on the tex coordinates generated. jp On 01/03/11 12:07, Petr Srom wrote: Hi, i would like to apply 2 textures on the same quad, 2nd texture is type format of .inta with alfa channel. Could you help me how o set these textures to correct mixing on the same quat? First image is my solution of correct texturing on the quad. [Image: http://www.imgshare.cz/images/multiplete.jpg ] Second image is screenshot from viewer. [Image: http://www.imgshare.cz/images/multipeie.jpg ] osg code: create - screenQuad; init - sourceSceneTexture (osg::Camera::PRE_RENDER) init - mirrormask1 (.inta file) osg::StateSet *quadState = quadGeode-getOrCreateStateSet(); quadState-setTextureAttributeAndModes(0, sourceSceneTexture, osg::StateAttribute::ON|osg::StateAttribute::PROTECTED); osg::TexGen* texgen = new osg::TexGen; texgen-setMode(osg::TexGen::SPHERE_MAP); osg::TexEnv* texenv = new osg::TexEnv; texenv-setMode(osg::TexEnv::BLEND); texenv-setColor(osg::Vec4(1.0f,1.0f,1.0f,1.0f)); quadState-setTextureAttributeAndModes(1, mirrormask1, osg::StateAttribute::ON); quadState-setTextureAttributeAndModes(1, texgen, osg::StateAttribute::ON); quadState-setTextureAttribute(1,texenv); //prerender camera osg::ref_ptrosg::Camera textureCamera = new osg::Camera; ... //ortho camera osg::ref_ptrosg::Camera orthoCamera = new osg::Camera; orthoCamera-setProjectionMatrix(osg::Matrix::ortho2D(0, ms_setupview.vi[i].width, 0, ms_setupview.vi[i].height)); orthoCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF); orthoCamera-setViewMatrix(osg::Matrix::identity()); orthoCamera-setViewport( ... ); orthoCamera-setRenderOrder(osg::Camera::POST_RENDER); Thank you! Cheers, Petr -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37197#37197 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Texture Problem with AT Radeon Mobility!!!!
Hi, I have an osg based application that was working fine with Nvidia card. I have a serious problem, I have recently purchased a pc with ATI Mobility Radeon 5730 and the textures do not appear correct or not appear at all!!! Any ideas? Thank you! Cheers, Nectarios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37201#37201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [vpb] Need Efficient mesh data structures
Hi, I am looking for an efficient general mesh data structure. Having feature like Generating normal arrays and texture coordinate for model,Parameterization of Triangulated Surface Meshes ; texture mapping and that can easily integrate with OSG. I know some of them like : openMesh osgmodeling CGAL I need better solution which one is most suitable or there some other library which can be helpful to me. I had hoped that someone might have used it before. ... Thank you! Cheers, manish -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37202#37202 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] rendering subset/subcamera views
Joel Skelton writes: Hi, I'm looking for alternate ideas on how to achieve a particular result. I've figured out a couple of ways to do it but each has issues. What I'd like to end up with is a scenegraph that renders something that is sort of like a web page with a 3D rendering inset into the middle of the page. Sort of like this: Code: +-+ pseudo-scenegraph | My Cow Page Title | | on white background | paper-camera | +---+ | /\ | | | |/ \ | |3D osg | | /\ | | | | / \ | | chrome cow | | /\ | | | |text nodes group \ | | rotating| | 3D-camera | | | | \ | +---+ | \ | |cow-group | More text on white | +-+ (ugh, my bad ascii art in the code block has every 2nd space char drawn as diamond in the preview. I hope its just my machine and everyone else can see this okay) So the paper of the web page would always be rendered through an ortho camera and you could zoom in and out which would change the onscreen size of the text on the page _as well as_ the size of the inset 3D view. The 3D view itself would behave like a regular OSG 3D perspective view which I could roam, zoom, and rotate just like a regular OSG View. As a final constraint, I'd like to be able to print this out at very high resolutions in a way similar to what is demonstrated in the osgposter example. So far I've figured two ways to do this: 1. The first would be by insetting one osg::View on top of another osg::View inside an osg::Viewer. The problem I have with this is that it wouldn't all be one scenegraph and I'd have to track the scaling of the paper view and use that to adjust the onscreen size of the 3D view. It would also be a chore to do hardcopy printing as demonstrated in the osgposter example, but not impossible. 2. The second idea is to prerender the 3D subview to a texture and apply that to a quad that is in the group under the paper camera. This seems like a mostly good idea except that if I wanted to print high resolution hardcopy then I would have to support tiled textures for the 3D view's textured quad and while not horribly difficult it would add a complexity to it all that I hope to avoid I hope I'm just missing some sort of obvious features of OSG like a subset view node or some such. In fact, if it turns out to be too obvious and simple then I'll punish myself for my own cluelessness by having my wife, a talented cartoon artist, draw an embarrassing picture of me in a tutu and I'll post it here. Thank you! Cheers, Joel I'm not sure about the printing part, but for those heterogeneous kind of scenes, maybe you can try the CompositeViewer, so it's more straightforward to have one viewer and several scenes inside it. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ive file format
Anders olofsson writes: Hi, Is there some specification for the file format? I was thinking about using the same files I use for my meshes for collision/physics too but dont know how to parse out the triangles. There isn't, except for the code. Anyway, for parsing purposes it is easier to use the text format, osg. Or you can use OSG to load the .ive and then do your stuff. -- Alberto ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Problem with AT Radeon Mobility!!!!
Hi, Nectarios There are bug on some ATI drivers versions that mess texture coodrinates when using display lists. It is fixed in recent drivers. Try update drivers or try turn off display lists to see if it is same problem. Cheers, Sergey. 01.03.2011, 14:24, Nectarios Pelekanos nectarios.peleka...@armes-tech.com: Hi, I have an osg based application that was working fine with Nvidia card. I have a serious problem, I have recently purchased a pc with ATI Mobility Radeon 5730 and the textures do not appear correct or not appear at all!!! Any ideas? Thank you! Cheers, Nectarios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37201#37201 ___ 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] [vpb] coordinate system in terrain
Hi Shayne, Ralf, Thanks for the suggestion. I generated osg terrain with and without geocentric options and compared. In geocentric terrain ellipsoid modal is there so I assume it is ECEF terrain. In flat database the center point lat lon are matching with acutal lat lon but z value is something which i don't know how to convert it to meters using delta3d/osg. Can you tell me how to convert that. Thank you! Cheers, Vijeesh -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37205#37205 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Texture Problem with AT Radeon Mobility!!!!
Hi Nectarios! We recently debug an osg application that have an issue with textures only in ATI cars. Our problem is that we render the same texture for different geometries and some of them have a texture matrix applied. We debugged our application with gDEBugger and notice that the mipmaps are not recomputed after apply the texture matrix. This old midmaps produce some errors in visualization. To disable hardware mid map generation you can set setUseHardwareMipMapGeneration(false) in your textures. This works fine in our application. You can use gDEBugger to show your texture mipmaps and detect if the error is there. Cheers, Maria. On Tue, Mar 1, 2011 at 12:24 PM, Nectarios Pelekanos nectarios.peleka...@armes-tech.com wrote: Hi, I have an osg based application that was working fine with Nvidia card. I have a serious problem, I have recently purchased a pc with ATI Mobility Radeon 5730 and the textures do not appear correct or not appear at all!!! Any ideas? Thank you! Cheers, Nectarios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37201#37201 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- María Ten Rodríguez gvSIG 3D Blog: http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] ive file format
Hi, .ive is deprecated. The new formats are .osgt, .osgb and .osgx. These youe the serializer function, whhich should make it possible to parse it because you can learn on .osgt or .osgx files and then use it also for your binary (.osgb) file. If you have your model/database only in .ive format you could maybe convert it into osgb with osgconv Cheers, Torben -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37206#37206 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture for IPhone
Hi, Tang Camera frame texture is likely to be not power of two size. Osg by default resize textures to be power of two size, this can take a lot of time each frame in your case. You can disable resizing by calling setResizeNonPowerOfTwoHint(false) on your texture. Also use linear filtering as setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR) setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR) to disable mipmap generation. If you currently use filters with mipmaps, osg will re-generate mipmaps on texture change, which will reduce fps. Cheers, Sergey. 01.03.2011, 12:37, Tang Yu tangy...@yahoo.com.cn: hi, Sergey, Thank you for your help. I used Texture2D, not use mipmap. I need to render the camera frame to the whole size of viewer. Do you think it will improve my program's efficiency to use mipmap? TANG hybr wrote: Hi, Tang First thing that comes to mind - check if you disabled resizing of non power of two textures on texture with image from camera, as well as mipmap generation. Cheers, Sergey. 28.02.2011, 13:30, Tang Yu : Hi, I also met the same question about rendering to texture on iphone. I tried to render the video frame, captured from iphone's camera continually, as 2D texture of the viewer's background, but the speed is very slowly. How can i fix it? Thank you for your any help! Cheers, Tang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37168#37168 ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37194#37194 ___ 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] Texture Problem with ATI Radeon Mobility!!!!
Hi, @Sergey, I am using the latest drivers for the GPU and the ltest version of Catalyst 11.2 @Maria, I will try to test that, but i load thmodels in osg in .obj and 3ds format, i dont draw them in osg. Thank you! Cheers, Nectarios -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37212#37212 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multitextures with alfa channel
J.P.,thanks for answer, your post make me to check texture coords, i have added tcoords for second texture (same as for the first texture), what a simple: screenQuad-setTexCoordArray(0, tcoords); screenQuad-setTexCoordArray(1, tcoords); and result: [Image: http://www.imgshare.cz/images/multipqmq.jpg ] Textures ok, but scene still very dark ... changes in code: 1) replace: texenv-setMode(osg::TexEnv::DECAL); //texenv-setMode(osg::TexEnv::BLEND); 2) rem this line: //quadState-setTextureAttributeAndModes(1, texgen, osg::StateAttribute::ON); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37213#37213 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Multitextures with alfa channel
Hi, if you don't set texenv for texture unit 0, the osg default is MODULATE which will then modify the underlying geometry's colour. Do you set a colour for the geometry? If not, set it to white. Otherwise change the texture unit 0 to DECAL too. cheers jp On 01/03/11 14:39, Petr Srom wrote: J.P.,thanks for answer, your post make me to check texture coords, i have added tcoords for second texture (same as for the first texture), what a simple: screenQuad-setTexCoordArray(0, tcoords); screenQuad-setTexCoordArray(1, tcoords); and result: [Image: http://www.imgshare.cz/images/multipqmq.jpg ] Textures ok, but scene still very dark ... changes in code: 1) replace: texenv-setMode(osg::TexEnv::DECAL); //texenv-setMode(osg::TexEnv::BLEND); 2) rem this line: //quadState-setTextureAttributeAndModes(1, texgen, osg::StateAttribute::ON); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37213#37213 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture for IPhone
Hi Tang, just some tips: * disable the autoresizing of NPOT-images via texture-setResizeNonPowerOfTwoHint(false); * set the internal format of the image to GL_RGBA and the format of the image to GL_BGRA, so the conversion is done by hardware/driver. image-setInternalTextureFormat(GL_RGBA); image-allocateImage(w, h, 1, GL_BGRA, GL_UNSIGNED_BYTE); HTH, Stephan Am 01.03.11 08:08, schrieb Tang Yu: Hi, dear sth, 30-45fps?!! It is so attractive!! i used Texture2D to render my camera frame to the whole size of viewer, i set the image buffer to the texture directly. But it still ran very very slowly on my iphone4. I attached my code files and hope for your advices. PS. my osg libraries are compiled from git's iphone project. Best regard, Tang sth wrote: Hi, Am 28.02.11 11:30, schrieb Tang Yu: I also met the same question about rendering to texture on iphone. I tried to render the video frame, captured from iphone's camera continually, as 2D texture of the viewer's background, but the speed is very slowly. How can i fix it? Without seeing any code, we can't help you, as the question remains too fuzzy. I can display a live video feed of the iphone-camera (3gs) as a osg-texture with about 30-45fps. cheers, Stephan ___ osg-users mailing list http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Post generated by Mail2Forum -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37184#37184 ___ 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] Multitextures with alfa channel
problem solved [Image: http://www.imgshare.cz/images/multipyty.jpg ] osg::StateSet *quadState = quadGeode-getOrCreateStateSet(); osg::TexEnv *texenv = new osg::TexEnv; texenv-setMode(osg::TexEnv::DECAL); quadState-setTextureAttributeAndModes(0, sourceSceneTexture, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED); quadState-setTextureAttributeAndModes(1, mirrormask1, osg::StateAttribute::ON | osg::StateAttribute::PROTECTED); quadState-setTextureAttribute(0,texenv); quadState-setTextureAttribute(1,texenv); changes in code: 1) remove texgen block 2) add: osg::Vec4Array* colors = new osg::Vec4Array; colors-push_back(osg::Vec4(1.0, 1.0, 1.0, 1.0)); colors-push_back(osg::Vec4(1.0, 1.0, 1.0, 1.0)); colors-push_back(osg::Vec4(1.0, 1.0, 1.0, 1.0)); colors-push_back(osg::Vec4(1.0, 1.0, 1.0, 1.0)); screenQuad-setColorArray(colors); thank you j.p. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37216#37216 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Android Development Plans
Update: We are sending the Cmake/android to osg-submissions in two steps. As it is right now the Osg Cmake Script the code changes in the script made it hard to mantain so we decided to propose new OSG Cmake script which could be more cleaner and better in handling platform issues. If that is accepted then we will use it to make accesible in a second submission the Android macros. As for today we are publishing a note on the gvsig3d page and some videos of HTC Nexus One and Archos 70 IT runing my examples. Also we are publishing an apk for the people to test. It will be great to know issues on different kinds of devices. The example only has a triangle, and if you can put under //mnt//storage//sdcard// a file cessna.osgt (properly converted) you will see it visible. I'm working in an apk with file integration for better testing. Also i'm working in combining Android ui elements and the ndk code. Gvsig3D news post(youtube) http://gvsig3d.blogspot.com/2011/03/openscenegraph-running-on-android.html Test Apk http://www2.ai2.upv.es/difusion/OSG_Android/osgViewerGLES1.apk.zip 2011/2/26 Jorge Izquierdo Ciges jori...@gmail.com I'm not missing, just stupid fails in my testing have delayed my initial planning. If there are no more fails (I hope so) in no time i'll present the cmake and a modified viewer example for you to rip it and test it. 2011/2/21 Thomas Hogarth thomas.hoga...@gmail.com Hi Jorge The current Status is... aparently fully functional. Great news, well done to you and your team, I hadn't progressed far at all. I decided to make the jump to linux and then got rather side tracked :). I'd be more then happy to do some testing etc for you guys once you've finished your tidy pass Congrats again Tom ___ 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] Android Development Plans
Hello Jorge, As for today we are publishing a note on the gvsig3d page and some videos of HTC Nexus One and Archos 70 IT runing my examples. Also we are publishing an apk for the people to test. It will be great to know issues on different kinds of devices. This is really good news! I will try it out tonight as my USB cable is at home... Test Apk http://www2.ai2.upv.es/difusion/OSG_Android/osgViewerGLES1.apk.zip Will you be testing the OSG GLES2 path as well? I guess it should compile well once the initial bits are in place for GLES1... Thanks for all your hard work, J-S -- __ Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Android Development Plans
Hi Jean-Sébastien, 2011/3/1 Jean-Sébastien Guay jean-sebastien.g...@cm-labs.com: Hello Jorge, Will you be testing the OSG GLES2 path as well? I guess it should compile well once the initial bits are in place for GLES1... Yes of course :) but we first want to submit the changes so anyone can test other GLES paths! :). I made the first submission of cmake mods, I hope finish the cleanup job this week and submit the android support. Rafa. Thanks for all your hard work, J-S -- __ Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com http://www.cm-labs.com/ http://whitestar02.webhop.org/ ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares Instituto de Automática e Informática Industrial http://www.ai2.upv.es http://gvsig3d.blogspot.com Ciudad Politécnica de la Innovación Universidad Politécnica de Valencia ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Using AutoTransform as a Label
Hi all, I was wanting to use an AutoTransform as a label for 3D elements in my scene. I have been able to create the Autotransform and add text, etc. However when I try to draw a line between the position of the autotransform and the bound of the object, I don't see any line drawn. I found this puzzling and couldn't figure out why. Any help on this issue would be much appreciated. Just to double check: For the purpose of creating labels, is a Billboard more suitable or an auto transform? (code realted to autotransform is pasted at the end of my post) Thanks. Sincerely, Sanat Code: //create Auto transform to use as a label osg::ref_ptrosg::AutoTransform at1 = new osg::AutoTransform(); osg::Geode* at1Geode = new osg::Geode(); //create txt node osgText::Text* text1 = new osgText::Text(); text1-setFont(timesFont); text1-setCharacterSize(30.0); text1-setText(Pipe1 Owner= DTE); text1-setAlignment(osgText::Text::CENTER_CENTER); //add text to geode at1Geode-addDrawable(text1); at1-addChild(at1Geode); //setup auto transform's properties: at1-setPosition(osg::Vec3d(276377.22, 4685748.0, 1000.0)); at1-setAutoScaleToScreen(true); at1-setAutoRotateMode(osg::AutoTransform::ROTATE_TO_SCREEN); //draw line from autotransform to geometry object //create geode and geometry: osg::ref_ptrosg::Geode lineGeode = new osg::Geode(); osg::Geometry* lineGeometry = new osg::Geometry(); //vertex array osg::Vec3Array* vertexArray = new osg::Vec3Array(2); vertexArray-push_back(at1-getPosition()); osg::Vec3 vertex2 = osg::Vec3 (276377.22, 4685748.0, 800.0); //color array osg::Vec4Array* colorArray = new osg::Vec4Array(2); osg::Vec4 yellowColor = osg::Vec4(1.0, 0.0, 0.0, 1.0); colorArray-push_back(yellowColor); //add arrays to geometry lineGeometry-setVertexArray(vertexArray); lineGeometry-setColorArray(colorArray); lineGeometry-setColorBinding(osg::Geometry::BIND_OVERALL); lineGeometry-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, vertexArray-size())); //attach geometry to geode lineGeode-addDrawable(lineGeometry); lineGeode-getOrCreateStateSet()-setMode(GL_LIGHTING, osg::StateAttribute::OFF); //add the geode to the at1 at1-addChild(lineGeode); //add pipe1 node to group group1-addChild(pipe1.get()); group1-addChild(at1.get()); -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37224#37224 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Reading OSG images from streams?
I was perusing the source code and was surprised to see that in osgDB/ReaderWriter there are stub functions for reading images from streams but that they are all disabled, returning ReadResult(ReadResult::NOT_IMPLEMENTED). Is it the case that nobody has needed this functionality yet, or are there other technical reasons for this? I am interested in reading image streams over the network using sockets, and to do that I'll probably create a class that will derive from std::streambuf to read information over sockets. Is anyone else doing this sort of thing? ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Getting height data of a terrain(flt file)
Hello Everyone, im using .flt files to load terrain. i loaded a sample terrain from the OSG data.(Joedirt.flt). i was wondering if there is a way to obtain the heightfield/heightmap for the terrain? i googled for .flt file format. i could not get any information on it. Could ot be a closed format? Could anyone please suggest how i could obtain the height data? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37228#37228 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Reading OSG images from streams?
Hi Eric, The functions are virtual, so it is up to each loader to override it and implement the functionality. Most of the image loaders should support reading from streams. I have been using this feature for a long time now and it works really well. Cheers, Farshid On Tue, Mar 1, 2011 at 9:09 AM, Eric Sokolowsky esok@gmail.com wrote: I was perusing the source code and was surprised to see that in osgDB/ReaderWriter there are stub functions for reading images from streams but that they are all disabled, returning ReadResult(ReadResult::NOT_IMPLEMENTED). Is it the case that nobody has needed this functionality yet, or are there other technical reasons for this? I am interested in reading image streams over the network using sockets, and to do that I'll probably create a class that will derive from std::streambuf to read information over sockets. Is anyone else doing this sort of thing? ___ 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] controlling osg::Cone pivot point...
Hi, i want to create some cone shapes in different part of my scene. and i want them rotate according to incoming orientation data on their translated places. But when i added my scene a simple osg::Cone with a radius 10 and height 100 at (0,0,0) that cone is drawn with tip at upper and base at bottom side around (0,0,0). (0,0,0) point is i think is at the weight center of that cone. What i need is to put tip of that cone at (0,0,0) (or to any point on the scene) and rotate base part according to orientation data.. How can i control the pivot point of that cone shap? Thx in advance.. :) ... Thank you! Cheers, strongbutshy.. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37225#37225 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] More than one ClipNode and ClipPlane
Hi Andrea, Positional state like clip planes are handled in a special way by the OSG as they have to be assigned a particular modelview matrix to position them correctly, and this means that you can't arbitarily state sort them and have any modelview matrix current when they are applied. The solves this problem by using a positional state node, and in the case of clip planes its the osg::ClipNode. The OSG also limits the setting of cliplanes so that a one clip plane can only be in one place at one time, and in OpenGL terms this means clip plane 0 can only be set once per rendering stage. OpenGL supports multiple clip planes, 6 being the minimum that OpenGL drivers have to support, so the OSG allows also allows you to assign each one of these clip planes at the same time - you just can't reuse the same GL clip plane index more than once. In you case it sounds like you are using multiple clip nodes and multiple clip planes which is perfectly safe usage, but the mistake is in not assigning a different clip plane number to each of the clip planes so they don't overlap in usage. Another important thing is that the ClipNode positions the (gl/osg::)ClipPlane while you'll need enable the appropropriate GL_CLIPPLANEi mode on the subgraphs that you want the clip plane to take effect. Robert. On Tue, Mar 1, 2011 at 6:30 PM, Andrea Martini martini.and...@gmail.com wrote: Hi, i would like to use more than one clipnode in my application. I use two different clipnode in the scene, each relating to a different 3D object such as a cube and a cylinder. I created the first clipnode (CN_A) and I've associated with the tree of the cylinder, and the other clipnode (CN_B) the structure of the cube. Then I created a plane and a clipplane for each clipnode like this : ... // cylinder : osg::ClipNode* cnCylinder=new osg::ClipNode(); cnCylinder-addChild(cylinderModel); groupCylynder-addChild(cnCylinder); clipPlaneForCylinder=new osg::ClipPlane(); planeForCylinder=new osg::Plane(NormalCylinder,CenterCylinder); clipPlaneForCylinder-setClipPlane(planeForCylinder); cnCylinder-addClipPlane(clipPlaneForCylinder); cnCylinder-setCullingActive(false); . // ... cube osg::ClipNode* cnCube=new osg::ClipNode(); cnCube-addChild(cubeModel); groupCube-addChild(cnCube); clipPlaneForCube=new osg::ClipPlane(); planeForCube=new osg::Plane(NormalCube,CenterCube); clipPlaneForCube-setClipPlane(planeForCube); cnCube-addClipPlane(clipPlaneForCube); cnCube-setCullingActive(false); My application allows me to move each plane (in a separate way) in order to see how 3D model is cutted. BUT If i work with only one model and clipnode, it works correctly. If i use two models and two clipnodes i see only one cut effect on a 3D model and the other 3D model completely disappears. I.e. : If i apply clipnodes simultaneosly on CUBE and CYLINDER, i see the CUBE cutted and don't see CYLINDER. When i disable clipnode on CUBE, suddenly i see again the CUBE with the CUT effect. Again, if i apply clipnode on CYLINDER, i don't see anything. So , my question is : Is it possible to use more than one clipnode? Thank you! Cheers, Andrea -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37226#37226 ___ 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] Getting height data of a terrain(flt file)
Hi Mukend, OpenFlight just stores terrain and meshes, not height fields. Robert. On Tue, Mar 1, 2011 at 7:08 PM, Mukund Keshav osgfo...@tevs.eu wrote: Hello Everyone, im using .flt files to load terrain. i loaded a sample terrain from the OSG data.(Joedirt.flt). i was wondering if there is a way to obtain the heightfield/heightmap for the terrain? i googled for .flt file format. i could not get any information on it. Could ot be a closed format? Could anyone please suggest how i could obtain the height data? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37228#37228 ___ 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] [osgOcean] OceanExample - MakeTransform - Much different results with different boat model
Hi, I need help understanding what may be at play here... With the testCollision option to secure a boat for myself on the ocean, I promptly used a different boat I got from a collada dae file (a wooden dory from google sketchup 3dwarehouse), and ignored the one coming with the example because it was white and devoid of interesting texture. Iwas surprised to see my boat (finally when I figured out where it was) merrily bouncy along... not on the ocean surface, mind you... but moving up and down what would look like 20 feet in the air. So... please help me understand what I will have to watch out for using different models... and how to allow for and correct for these differences? I tried changing the scale returned from GetOceanSurfaceHeightAt(), and to no avail... then I tried just using 0 in the makeTranslate just to shut it up... and was surprised when it just ignored me and kept bobbing up and down in the air. I guess something else is responsible for positioning the boat on the surface? And NOT the node update visitor boatPositionCallback? search google's 3d warehouse for A wooden rowboat complete with oars, oar holders, beverage cabinet, and seats I would like to know how to get this boat out of the air, and into the water. It seems so strange. Thank you! Then... I'd like to keep water out of my boat... but first things first! ...Seeking UNDERStanding in an UnderWaterWorld Cheers, tim -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37232#37232 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Android Development Plans
Hi Jorge Downloaded the example apk 'OSG Viewer GLES1 example'. The triangle example runs fine and my single touch input is working to rotate the view. I also get a file saved.osgt on my sdcard containing the following #Ascii Scene #Version 71 #Generator OpenSceneGraph 2.9.11 I can't however get the cessna.osgt file to load. I converted the standard cessna.osg using osgconv to .osgt and placed on my sdcard (same location the saved.osgt file was written to), but doesn't seem to load it. Maybe I need to zoom out but can't? I'm running Archos 43 Android 2.2.1 Latest firmware (2.1.8 I think) All in all worked great, congrats on getting the demo out, lets hope the code release goes as smoothly :) Cheers Tom ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting height data of a terrain(flt file)
Hi Robert, Thanks for the reply. Could you please tell where i can find the exact file format for flt files? Thanks, Mukund -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37234#37234 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Render to texture for IPhone
Hi, Stephan and Sergey Thank you for your helps!!! Finally i got a good fps on my iphone4 according to your advices. It is so great!!! Now I can go on working on my mobile AR project. Appreciate you very much again! Cheers, Tang -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37235#37235 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting height data of a terrain(flt file)
On 3/1/2011 7:54 PM, Mukund Keshav wrote: Hi Robert, Thanks for the reply. Could you please tell where i can find the exact file format for flt files? FLT isn't really an OSG format, it's a MultiGen format. Documentation on it is very poor and sparse. I wouldn't pursue this unless you REALLY need to look into the format. Grown men have been known to be reduced to tears trying to understand FLT. Thanks, Mukund -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. Contracting. There is no Truth. There is only Perception. To Perceive is to Exist. - Xen ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [osgOcean] Shader again.
Thanks for the reply. Well I know I shouldn't and I wouldn't if I don't have this artefact of the tip of the ship was not culled. I noticed that you're replying as a guest, not a member of this forum, so I'm not sure that you can see all of my screenshots that I've put here. If not, then I'll give you an illustration. Imagine a quake clone game. You've got a part of the weapon's model visible at the bottom of the screen, near the HUD, that will also move along with your first person camera. Now, in my application, that weapon will be culled and won't be rendered perfectly, even invisible at times, based on that camera's (and model along with it) translation and rotation. Now if I disabled near / far computation, the screen turns blank because the glare shader is also enabled. If I disable both the near / far computation and the glare shader, the scene seemed normal and right. However there's another artefact. The above water fog isn't implemented correctly. Even when there are two objects with the same distance with the camera, one of them can be rendered as if it's inside a fog and one of them is not. As for the missing model if I enabled glare, I've found the answer. It seems like osgOcean hates targa. One of my model's textures is a targa image file and that's why it wasn't rendered. When I changed it to a jpg, it worked just fine. Maybe you should put this as a warning somewhere in the documentation or such. Thanks again. Kim Bale wrote: You should need to use osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR. *shouldn't K. On 28 February 2011 06:25, Bawenang Rukmoko () wrote: No reply yet? I guess I've got to do this the hard way, researching them myself. :( Thanks anyway guys. Thank you! Cheers, Bawenang quot;There's no place like 127.0.0.1quot; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37165#37165 (http://forum.openscenegraph.org/viewtopic.php?p=37165#37165) ___ osg-users mailing list () http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org) -- Post generated by Mail2Forum quot;There's no place like 127.0.0.1quot; -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37237#37237 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Getting height data of a terrain(flt file)
Hi Mukund, OpenFlight is quite complicated yes, but actually more well documented nowadays. However, if you want to extract a regular terrain height raster from an OpenFlight database, I would say the best solution is to write an OSG application that simply intersects vertically with the terrain at equal distances and puts the result in a raster that you write to disk. Also, this would of course be a general file format-agnostic solution. Regards, Andreas On 2 mar 2011 04:53 Chris 'Xenon' Hanson xe...@alphapixel.com xe...@alphapixel.com wrote: On 3/1/2011 7:54 PM, Mukund Keshav wrote: Hi Robert, Thanks for the reply. Could you please tell where i can find the exact file format for flt files? FLT isn't really an OSG format, it's a MultiGen format. Documentation on it is very poor and sparse. I wouldn't pursue this unless you REALLY need to look into the format. Grown men have been known to be reduced to tears trying to understand FLT. Thanks, Mukund___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org