[osg-users] how to use unique color to pick object?
Dear friends: in openGL programming . there is a method to pick the object from the scene.rendering the scene in the back buffer, every object with an unique color . than , rendering second time in a normal way. when the user move mouse in the screen . read the pixel value under the mouse point . then find the color in an prepared hashmap. comparing the color , we can known which object is selected. i am wondering whether the osg can archieve the same goal ? because i want to implement an edit function with osg . i have a mountain model composite of hundreds of thousands of triangles . and my goal is putting high resolution digital image on the model, and fusion the image and model into a model with texture . now , the problem i face is that using the mouse to find the same points in the model and in the digital image. can some one give me an advice. Shawl___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Shadow size dont change when i change model size in vertex shader
Hi Umid nobody can help you if you don't explain more precisely your problem Cheer David 2012/8/30 Umid Shahmaliyev quza...@yahoo.com Hi, Hi all. I have some problem with shadow. I have 2 models in scene whith shadow. And when i change model size in vertex shader nothing happens with shadow. Are there any way to do this? ... Thank you! Cheers, Umid -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49671#49671 ___ 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] how to use unique color to pick object?
Hi Sawl, The easiest way to do picking is to use the LineSegmenetIntersector/IntersectionVistor as illustrated in the osgpick example. For models with large number of triangles you can generate KdTree's from the Geometry which vastly speeds up the intersection testing. See the include/osg/KdTree header for info on KdTree. Robert. On 30 August 2012 09:03, wh_xiexing wh_xiex...@sina.com wrote: Dear friends: in openGL programming . there is a method to pick the object from the scene.rendering the scene in the back buffer, every object with an unique color . than , rendering second time in a normal way. when the user move mouse in the screen . read the pixel value under the mouse point . then find the color in an prepared hashmap. comparing the color , we can known which object is selected. i am wondering whether the osg can archieve the same goal ? because i want to implement an edit function with osg . i have a mountain model composite of hundreds of thousands of triangles . and my goal is putting high resolution digital image on the model, and fusion the image and model into a model with texture . now , the problem i face is that using the mouse to find the same points in the model and in the digital image. can some one give me an advice. Shawl ___ 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] Shadow size dont change when i change model size in vertex shader
Hi Shadow technique itself uses either fixed function or its own shaders to draw shadow map, and know nothing about what are you doing in your shader. Easy way to go is apply whatever transforms you need with osg::MatrixTransform node in graph instead of doing it in shaders. If this is not possible - you should use your own shaders for drawing shadow map, so you can do same transformations yourself. Cheers. 30.08.2012, 09:38, Umid Shahmaliyev quza...@yahoo.com: Hi, Hi all. I have some problem with shadow. I have 2 models in scene whith shadow. And when i change model size in vertex shader nothing happens with shadow. Are there any way to do this? ... Thank you! Cheers, Umid -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=49671#49671 ___ 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] OSG merchandising
Hi all, I've set a merchandising section in the new osg website with an iframe pointing to the OSG cafepress shop. I believe there is a big amount of people unaware of this. So go to http://www.openscenegraph.com/index.php/community/merchandising and get your OSG T-shirt! :). Cheers. -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG merchandising
Are you serious about offering an OSG thong? ;) Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG merchandising
hehehe, I'm not managing the osg cafepress shop (I think it was Robert idea), I only have set the iframe in the new web, but... aren't you geek enough??? ;) 2012/8/30 Christian Buchner christian.buch...@gmail.com Are you serious about offering an OSG thong? ;) Christian ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
Hi everybody, I'm glad to announce osgAndroid (OpenSceneGraph for Android). It consists in a set of Java/JNI wrappers of OpenSceneGraph and some helper classes to easily develop OSG applications in Android. The code repository is hosted in Gitorious: https://gitorious.org/osgandroid I still don't have a complete documentation, but some quick start guidelines can be found here: https://gitorious.org/osgandroid/pages/Home The osgAndroid project has been initially funded by: IRTIC(http://smagris3.uv.es/irtic/) AI2(http://www.ai2.upv.es) MirageTechnologies S.L.(http://www.mirage-tech.com). But we all agreed in open the source code and try to make the life easier to all osg developers that want to migrate applications to Android. The project was initially developed with AR applications in mind, so you will not find too many interaction tools there, and of course has some limitations, but you can load and display a model with only a few lines of code: ... mView = new Viewer(this); mView.init(false, 16, 8); mView.setSceneData(ReadFile.readNodeFile(/sdcard/axes.ive)); mView.setDefaultSettings(); setContentView(mView); ... Some usage samples can also be found in the code, such as how to use the Android device Camera with an OSG scene with transparent background or how to mix osgAndroid and native code in an Android Activity, and much more will be added. I would also like to announce the project in the community news section of the new site (openscenegraph.com), is it possible? I really hope this will be useful to the community, and of course feel free to contribute! Cheers, Rafa -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
On Thu, Aug 30, 2012 at 2:02 PM, Rafa Gaitan rafa.gai...@gmail.com wrote: Hi everybody, I'm glad to announce osgAndroid (OpenSceneGraph for Android). It consists in a set of Java/JNI wrappers of OpenSceneGraph and some helper classes to easily develop OSG applications in Android. ... But we all agreed in open the source code and try to make the life easier to all osg developers that want to migrate applications to Android. The project was initially developed with AR applications in mind, so you will not find too many interaction tools there, and of course has some limitations, but you can load and display a model with only a few lines of code: Excellent! Thanks for not keeping this proprietary, it will certainly make it easier to get going on Android. Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
Hi Rafa, First of all congratulations, at the end you were able to opensource the project! I would also like to announce the project in the community news section of the new site (openscenegraph.com), is it possible? You have now publisher rights in the new web, so feel free to add a Community New in the openscenegraph.com. I think you might modify the page http://www.openscenegraph.com/index.php/community/projects written by Paul Martz to add the new project. Cheers. I really hope this will be useful to the community, and of course feel free to contribute! Cheers, Rafa -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
2012/8/30 Jan Ciger jan.ci...@gmail.com On Thu, Aug 30, 2012 at 2:02 PM, Rafa Gaitan rafa.gai...@gmail.comwrote: Hi everybody, I'm glad to announce osgAndroid (OpenSceneGraph for Android). It consists in a set of Java/JNI wrappers of OpenSceneGraph and some helper classes to easily develop OSG applications in Android. ... But we all agreed in open the source code and try to make the life easier to all osg developers that want to migrate applications to Android. The project was initially developed with AR applications in mind, so you will not find too many interaction tools there, and of course has some limitations, but you can load and display a model with only a few lines of code: Excellent! Thanks for not keeping this proprietary, it will certainly make it easier to get going on Android. Thank you Jan!, I have some AR examples that I want also release :) in the next days. If you find any problem using it feel free to tell me. I hope Robert does not mind that we use the osg-users list for these things. Rafa. Jan ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
Hi Jordi, 2012/8/30 Jordi Torres jtorresfa...@gmail.com Hi Rafa, First of all congratulations, at the end you were able to opensource the project! Thank you!, you are also a contributor so thank you to you too!. I would also like to announce the project in the community news section of the new site (openscenegraph.com), is it possible? You have now publisher rights in the new web, so feel free to add a Community New in the openscenegraph.com. I think you might modify the page http://www.openscenegraph.com/index.php/community/projects written by Paul Martz to add the new project. Perfect, I will start there and I will try not to make a mess with the page :). Rafa. Cheers. I really hope this will be useful to the community, and of course feel free to contribute! Cheers, Rafa -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Jordi Torres Fabra gvSIG 3D blog http://gvsig3d.blogspot.com Instituto de Automática e Informática Industrial http://www.ai2.upv.es ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG merchandising
On 30 August 2012 12:52, Jordi Torres jtorresfa...@gmail.com wrote: hehehe, I'm not managing the osg cafepress shop (I think it was Robert idea), I only have set the iframe in the new web, but... aren't you geek enough??? ;) I'm afraid the thong wasn't my idea, still it's a bit of fun. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
Hi Rafa, Congratulations to you and the rest of the team on the new osgAndroid project ;-) On 30 August 2012 13:21, Rafa Gaitan rafa.gai...@gmail.com wrote: Thank you Jan!, I have some AR examples that I want also release :) in the next days. If you find any problem using it feel free to tell me. I hope Robert does not mind that we use the osg-users list for these things. Mind, I'm delighted to see the community thriving and coming up with new stuff! Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [ANN] osgAndroid: Library for develop OSG applications in Android
On Thu, 2012-08-30 at 14:02 +0200, Rafa Gaitan wrote: Hi everybody, I'm glad to announce osgAndroid (OpenSceneGraph for Android). It consists in a set of Java/JNI wrappers of OpenSceneGraph and some helper classes to easily develop OSG applications in Android. Just out of curiosity, does this avoid the need to enable untrusted software sources or whatever it is Android calls it? The code repository is hosted in Gitorious: https://gitorious.org/osgandroid I still don't have a complete documentation, but some quick start guidelines can be found here: https://gitorious.org/osgandroid/pages/Home The osgAndroid project has been initially funded by: IRTIC(http://smagris3.uv.es/irtic/) AI2(http://www.ai2.upv.es) MirageTechnologies S.L.(http://www.mirage-tech.com). But we all agreed in open the source code and try to make the life easier to all osg developers that want to migrate applications to Android. The project was initially developed with AR applications in mind, so you will not find too many interaction tools there, and of course has some limitations, but you can load and display a model with only a few lines of code: ... mView = new Viewer(this); mView.init(false, 16, 8); mView.setSceneData(ReadFile.readNodeFile(/sdcard/axes.ive)); mView.setDefaultSettings(); setContentView(mView); ... Some usage samples can also be found in the code, such as how to use the Android device Camera with an OSG scene with transparent background or how to mix osgAndroid and native code in an Android Activity, and much more will be added. I would also like to announce the project in the community news section of the new site (openscenegraph.com), is it possible? I really hope this will be useful to the community, and of course feel free to contribute! Cheers, Rafa -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ 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] [ANN] osgAndroid: Library for develop OSG applications in Android
Hi Jeremy, 2012/8/30 Jeremy Moles cubic...@gmail.com On Thu, 2012-08-30 at 14:02 +0200, Rafa Gaitan wrote: Hi everybody, I'm glad to announce osgAndroid (OpenSceneGraph for Android). It consists in a set of Java/JNI wrappers of OpenSceneGraph and some helper classes to easily develop OSG applications in Android. Just out of curiosity, does this avoid the need to enable untrusted software sources or whatever it is Android calls it? Currently is only a library that you should download, compile and use it to develop your own Applications (.apk). It is not accepted as a downloadable SDK in the AVDManager :) (yet?, maybe in the future) I think that enable untrusted software sources is needed to install any application outside the Google Play store, i.e, any (.apk) application that you want to install by yourself. If you build an application with osgAndroid and it is accepted in the Google Play store then, AFAIK, then it will be distributed through a trusted software source. Maybe other Android developers with more experience in deploying applications could give more info here. Rafa. The code repository is hosted in Gitorious: https://gitorious.org/osgandroid I still don't have a complete documentation, but some quick start guidelines can be found here: https://gitorious.org/osgandroid/pages/Home The osgAndroid project has been initially funded by: IRTIC(http://smagris3.uv.es/irtic/) AI2(http://www.ai2.upv.es) MirageTechnologies S.L.(http://www.mirage-tech.com). But we all agreed in open the source code and try to make the life easier to all osg developers that want to migrate applications to Android. The project was initially developed with AR applications in mind, so you will not find too many interaction tools there, and of course has some limitations, but you can load and display a model with only a few lines of code: ... mView = new Viewer(this); mView.init(false, 16, 8); mView.setSceneData(ReadFile.readNodeFile(/sdcard/axes.ive)); mView.setDefaultSettings(); setContentView(mView); ... Some usage samples can also be found in the code, such as how to use the Android device Camera with an OSG scene with transparent background or how to mix osgAndroid and native code in an Android Activity, and much more will be added. I would also like to announce the project in the community news section of the new site (openscenegraph.com), is it possible? I really hope this will be useful to the community, and of course feel free to contribute! Cheers, Rafa -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ 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 -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com gvSIG3D Developer - http://gvsig3d.blogspot.com ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG merchandising
The thong came up as a joke idea when the cafepress page was started; I seem to recall Mike Weiblen had something to do with it. Didn't he bring one to a SIGGRAPH OSG BOF? He didn't wear it, thankfully! :-) -Paul On 8/30/2012 5:46 AM, Christian Buchner wrote: Are you serious about offering an OSG thong? ;) ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] how to use unique color to pick object?
As Robert says, use osgUtil for this. For starters, osgUtil easily lets you pick multiple triangles, even if they are grouped together in the same Drawable. osgUtil was designed for intersection testing / picking. The unique color method was devised to work around the slow OpenGL 1.x GL_SELECTION render mode, and is almost certainly much much slower than osgUtil. In other words, the color method is a hack. If you are forced to implement the color method, I would implement it in OSG as follows: - You could render and read from the back buffer, but an easier approach might be to render and read from an FBO attached to your Camera. Attach it to pick, unattach it to render normally. In either case, you'd probably do the read back in a post-draw callback attached to the Camera. - If all your pickable objects are in unique Drawables already, then you could toggle between the actual color and the pick color using BlendColor for the pick color and enabling blending when you want to pick. - If you have multiple pickable objects in the same Drawable, then I don't know an easy way for you to toggle between the actual color and the pick color, except possibly with shaders and vertex attributes. All things considered, osgUtil is the superior design decision. -Paul On 8/30/2012 2:03 AM, wh_xiexing wrote: Dear friends: in openGL programming . there is a method to pick the object from the scene. rendering the scene in the back buffer, every object with an unique color . than , rendering second time in a normal way. when the user move mouse in the screen . read the pixel value under the mouse point . then find the color in an prepared hashmap. comparing the color , we can known which object is selected. i am wondering whether the osg can archieve the same goal ? because i want to implement an edit function with osg . i have a mountain model composite of hundreds of thousand http://dict.bing.com.cn/?q=%e4%b8%ad%e5%9b%bd%e5%8d%9a%e5%a3%ab%e5%90%8eFORM=BDFD#thousands of triangles . and my goal is putting high resolution digital image on the model, and fusion the image and model into a model with texture . now , the problem i face is that using the mouse to find the same points in the model and in the digital image. can some one give me an advice. Shawl ** ___ 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] OSG merchandising
yes, I bought one. Beware, it is not one-size-fits-all -- mew On Aug 30, 2012 8:05 AM, Paul Martz pma...@skew-matrix.com wrote: The thong came up as a joke idea when the cafepress page was started; I seem to recall Mike Weiblen had something to do with it. Didn't he bring one to a SIGGRAPH OSG BOF? He didn't wear it, thankfully! :-) -Paul On 8/30/2012 5:46 AM, Christian Buchner wrote: Are you serious about offering an OSG thong? ;) __**_ osg-users mailing list osg-users@lists.**openscenegraph.org osg-users@lists.openscenegraph.org http://lists.openscenegraph.**org/listinfo.cgi/osg-users-** openscenegraph.orghttp://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] Help: is prerender camera regarded as slave camera during rendering traversal?
Hello everyone, I would like to know where the prerender camera is rendered in OSG. Is prerender camera regarded as slave camera during rendering traversal of viewer? Is there a way to directly render a prerender camera at any time I want ? That is, not at a tempo of 60 Frame per second. Thank you in advance! Best regards Shuiying ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] OSG merchandising
On Thu, Aug 30, 2012 at 2:42 PM, Michael Weiblen mike.weib...@gmail.comwrote: yes, I bought one. Beware, it is not one-size-fits-all -- mew I need bleach for my mind's eye now. -- Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Digital Imaging • GIS • GPS • Telemetry • Cryptography • Digital Audio • LIDAR • Kinect • Embedded • Mobile • iPhone/iPad/iOS • Android ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org