Re: [osg-users] Unzip big data size problem!
Hi, Robert Thank you so much! Cheers, Nguyen -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69338#69338 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World to local coordinates
Hi,Thanks for your help and robert can u give your number where in whatsapp i can ask more doubts about osg. ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69337#69337 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Oculus DK2 and intersections
aldaril_kote wrote: > Hi Robert, > > You've mentioned that osgViewer in OSG 3.4 has support of coordinates > remapping: > > > robertosfield wrote: > > > > In the svn/trunk and OSG-3.4 branch of the OSG there is support in > > osgViewer for remapping coordinates when the viewer has slave Camera's that > > do distortion correction via texture coordinates, > > > > > Could you name entities (classes, methods, etc.), which are responsible for > this functionality? > > Cheers, > Maxim Hi Maxim, I'm trying to do the same thing. Did you work out a solution? Cheers, Matt -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69336#69336 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] blending with shader
yeah basically you want to use un-warped coordinates for your blending image, and warped coordinates for your scene image. If not you would have to warp your blending image, which may be easier for you depending on process. As per passing your texture width, you can use the function textureSize, that will get the dimensions of the image: https://www.opengl.org/sdk/docs/man4/html/textureSize.xhtml Do keep in mind, you need to set the version number in your shader to use this. In our case case we basically hard coded texture width as we generated the shader code with our blending image, as well as a few parameters for color correction and a few other other things. You can also query the size of your texture and do a text replace on your shader code before loading it. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69335#69335 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgUtil::Delaunay* question (where is the triangulation of the constraints?)
Hi Community, I hope you will help this time too. Struggling again :-). I am trying to add cultural features to terrain models, nothing fancy (yet! :-) ) it is simple. Code will describe it more how I am doing it but it is the very basic, elevations array to be triangulated with some constraints. And it works nicely. However when I want to cut the triangulated constraint from the terrain, and add this cut triangles as separate primitive set, constraint->getTriangles() is empty. Based on the doxygen in the header I am expecting to have these triangles there: /** Get the filling primitive. One: * triangulate must have bneen called and * two: triangle list is filled when * DelaunayTriangulator::removeInternalTriangles is called. * These return the triangles removed from the delaunay triangulation by * DelaunayTriangulator::removeInternalTriangles. */ inline const osg::DrawElementsUInt *getTriangles() const { return prim_tris_.get(); } No triangles when calling this and this is the snippet: osg::ref_ptr triangulator = new osgUtil::DelaunayTriangulator; osg::ref_ptr polyline = getPolylineVertices(line); osg::ref_ptr polylineEdges = getEdges(polyline); constraint->setVertexArray(polylineEdges); constraint->addPrimitiveSet(new osg::DrawArrays(GL_LINE_LOOP, 0, polylineEdges->size())); triangulator->addInputConstraint(constraint); triangulator->setInputPointArray(_points); triangulator->triangulate(); triangulator->removeInternalTriangles(constraint); osg::ref_ptr geometry = new osg::Geometry; geometry->setVertexArray(_points); geometry->addPrimitiveSet(triangulator->getTriangles()); // triangles with constraint cut geometry->addPrimitiveSet(constraint->getTriangles()); // no triangles Thanks a bunch as always! Nick -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World to local coordinates
Hi Rambabu, Robert is right. We all learn from the OSG examples and from reading the code and when we struggle we fire questions on this list and the community responds - that is how we all gain and share OSG knowledge. It is normal that you have to do your homework first - to look for it in the examples code - trust me, often I find myself "lazy" and "paranoid" so I shoot questions fast too ;-) Have a look at the osgsimulation example code. It flies the cessna model around the planet. That is what you need I think and you will see there how to properly use osg::EllipsoidModel. Give it a try Cheers! Nick On Fri, Nov 11, 2016 at 10:14 AM, Robert Osfieldwrote: > On 11 November 2016 at 09:07, Rambabu Repaka > wrote: > > Thanks robert and Iam working on the EllipsoidModel. > > One Doubt Is it possible to view the osg model like cessan.osg using > latitude and longitude readings at exact position. > > Stop being so lazy and read the code examples, read the headers, it's all > there. > > If you have a problem with your specific implementation then post the code. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- trajce nikolov nick ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] blending with shader
Hi David, thanks it works! Here are my vertex and fragment shaders: Code: varying vec2 texCoord; void main(void) { gl_Position = ftransform(); texCoord = gl_MultiTexCoord0.xy; } Code: uniform float width; uniform float height; uniform float gamma; uniform sampler2D sceneTexture; uniform sampler2D blendTexture; uniform sampler2D blackTexture; varying vec2 texCoord; void main(void) { vec4 sceneColor = texture2D(sceneTexture, texCoord); vec2 fragCoord = vec2(gl_FragCoord.x/width, gl_FragCoord.y/height); vec4 blendColor = texture2D(blendTexture, fragCoord); vec4 blackColor = texture2D(blackTexture, fragCoord); vec4 gammaVector = vec4(gamma, gamma, gamma, 1.0); gl_FragColor = pow(pow(sceneColor*blendColor, gammaVector) * (1.0 - pow(blackColor, gammaVector)) + pow(blackColor, gammaVector), 1.0/gammaVector); }; I had to use fragCoord for blending images because those images must not be distorted. Is that code correct? I mean, it works but maybe there is a cleaner way to implement that. In particulare, is there a way to avoid passing "width' and "height" variables to the shader? Regards, Gianni[/img] -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69332#69332 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Visual Studio 2015 3rd_party
Thanks Bjorn for the osg-3rdparty-cmake project. It really helped alot. I got stuck on getting libtiff working with osg though and found out after banging my head against the wall for quite some time with the version linked to from the readme on github: libtiff(dot)org Not sure if that site is getting moved or something but the last tested version you mention, 4.0.6 is not available from that site and there's many broken links on libtiff(dot)org. I actually got 4.0.6 from herelinuxfromscratch(dot)com which I found searching for libtiff and 4.0.6 (can't post links) I thought I could build libtiff myself from libtiff site (v 3.8.2) but I failed to get rid of linking errors when building osg using it. I tried to build dlls for libtiff but I failed to get rid of the linking problems. When switching to v4.0.6 from the link above, it worked right away. Maybe something to note in the readme on github for others that come across the project. Hi, ... Thank you! Cheers, Björn -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69318#69318 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to implement pagedLOD without reading from files?
Thanks Robert. I think I should use the PluginDataMap to provide pointers to classes or structures. Right? Thanks again. Very quick and good help! - Werner - Am 11.11.2016 um 12:47 schrieb Robert Osfield: > Hi Wener, > > On 11 November 2016 at 11:32, Werner Modenbach >wrote: >> just one more small question. >> As to my understanding the ReaderWriter classes are instantiated >> automatically >> according to the "file extensions". So I get no hands on the instances of >> the reader. >> How can I give the reader class a reference to my data structures? > You can pass data into a plugin via the osgDB::Options object that you > can pass along with the string used for the filename. The Options > object can store user data as well be subclassed. > > Robert. > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- *TEXION Software Solutions*, Rotter Bruch 26a, D-52068 Aachen Phone: +49 241 475757-0 Fax: +49 241 475757-29 Web: http://texion.eu eMail: i...@texion.eu ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to implement pagedLOD without reading from files?
Hi Wener, On 11 November 2016 at 11:32, Werner Modenbachwrote: > just one more small question. > As to my understanding the ReaderWriter classes are instantiated > automatically > according to the "file extensions". So I get no hands on the instances of > the reader. > How can I give the reader class a reference to my data structures? You can pass data into a plugin via the osgDB::Options object that you can pass along with the string used for the filename. The Options object can store user data as well be subclassed. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to implement pagedLOD without reading from files?
Hi Chris, just one more small question. As to my understanding the ReaderWriter classes are instantiated automatically according to the "file extensions". So I get no hands on the instances of the reader. How can I give the reader class a reference to my data structures? Thanks - Werner - Hi Chris, thanks a lot. I knew it must be easy somehow but I was blind for the solution. Yes, I have to subclass ReaderWriter and that's it. Wow! - Werner - Am 09.11.2016 um 18:43 schrieb Chris Hanson: > Basically you make a custom URI scheme to name each "file" in the > PagedLOD object, like > > 12345567890.werner_texion_tile > > Then you create and register a pseudoloader that accepts requests for > "files" ending in the ".werner_texion_tile" extension. But when your > pseudoloader is called to "load" one of these "files", you simply > parse the "filename" to get the tile ID from it, and then construct > the resulting subgraph using the assets already available in memory > (or over a network, or however you wish to get the real data to make > the subgraph) and return it as if you had just loaded it from disk. > > There's nothing "disk" specific about the URI system in the PagedLOD > subsystem. > > > > > ___ > 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 mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Unzip big data size problem!
Hi Nam, I have unpacked your model and then zipped then ran: osgviewer DL.ive.zip This works fine with OSG-3.2.1 through to git master. The models loads without any errors or warnings. This under 64bit Linux. I can't rule out a Visual Studio specific issue, perhaps other under Windows can test your model. As a general note, on the topic of encryption the way you can do it is by reading data from disk decrypt the data into a memory buffer that you stream into the plugin that does the loading via a std stream buffer. This topic has been covered before on osg-users mailing list/forum so just search for the topic in the archives. In essense the zip plugin uses this approach already for loading the model files. This thread is not the appropriate place to discuss this as though so would suggest asking questions on this one of the existing threads or starting a new one. Meanwhile this thread should be just kept to the issue of trying load a zip file. On this I can't personally do anymore, it'll be up to yourself or others who use Windows/VisualStudio to sort out whether there are specific problems here or whether it's just a built/usage mistake on your side. Robert. On 11 November 2016 at 03:23, Nguyen Quang Namwrote: > Hi, Robert > > Sorry for my mistakes. > > Today I upload my .ive file from my PC. This file is not of mine so I can not > change extension. > > osgVersion: 3.2.1 and 3.4.0, I built it myself in windows 10 x64, compiler > Visual Studio 2010 x86. > > When I try to load another zipped file which has the size below 100Mb it is > OK. > > As I said before, my programing and 3D is limited so I can not find any > notices to show you. I try go to openscenegraph Source code and insert > osg::Notify to know zip doing is success. But then I only see "badalloc" > notice from a popup ( with osg 3.4.0 nothing is display, but with osg 3.2.1 > is show error). > > My purpose is using zip with password to protect my sensitive data from > danger. Now I 've not find any methods with my bad knowledge. > Thank you! > > Here is my data, please help me to detect the problem. > > > Code: > http://www.mediafire.com/file/b3v5fm5noz2qzta/DL.7z > > > > Thank you, > Nam > > -- > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=69314#69314 > > > > > > ___ > 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] World to local coordinates
On 11 November 2016 at 09:07, Rambabu Repakawrote: > Thanks robert and Iam working on the EllipsoidModel. > One Doubt Is it possible to view the osg model like cessan.osg using > latitude and longitude readings at exact position. Stop being so lazy and read the code examples, read the headers, it's all there. If you have a problem with your specific implementation then post the code. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText setColor problem
On 11 November 2016 at 06:58, Rambabu Repakawrote: > Hi,Iam new to osg can anyone help me in setting a color to the 2d text. Just look at the code. The osgtext example for instance. It was written *exactly* for this purpose. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World to local coordinates
Hi, Thanks robert and Iam working on the EllipsoidModel. One Doubt Is it possible to view the osg model like cessan.osg using latitude and longitude readings at exact position. ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69325#69325 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] World to local coordinates
On 11 November 2016 at 07:01, Rambabu Repakawrote: > I saw the osg/CoordinateSystemNode but iam unable to to locate the model > according to latitude and longitude readings.Please share code if anybody > knows. You have access to all the source code you need - the OpenSceneGraph/examples directory contains over 170 examples, what is missing is your effort at searching for relevant materials. I am not going to give you the answer as you need to develop the skill at finding answers without needing the community to hand hold every line of code. You've been given the hint EllipsoidModel so go and do a search in the OSG examples for usage of this class i.e. cd OpenSceneGraph/examples grep EllipsoidModel */*.cpp You'll get: osgautocapture/osgautocapture.cpp: csn->getEllipsoidModel()->convertLatLongHeightToXYZ(lat, lon, alt, eye.x(), eye.y(), eye.z()); osgfadetext/osgfadetext.cpp:csn->setEllipsoidModel(new osg::EllipsoidModel()); osgfadetext/osgfadetext.cpp:osgText::Text* createText(osg::EllipsoidModel* ellipsoid, double latitude, double longitude, double height, const std::string& str) osgfadetext/osgfadetext.cpp:osg::Node* createFadeText(osg::EllipsoidModel* ellipsoid) osgfadetext/osgfadetext.cpp: csn->addChild(createFadeText(csn->getEllipsoidModel())); osggpx/osggpx.cpp:osg::ref_ptr em = new osg::EllipsoidModel; osggpx/osggpx.cpp:osg::ref_ptr em = new osg::EllipsoidModel; osggpx/osggpx.cpp:osg::ref_ptr em = new osg::EllipsoidModel; osgintersection/osgintersection.cpp://osg::EllipsoidModel* em = csn ? csn->getEllipsoidModel() : 0; osgmultitexturecontrol/osgmultitexturecontrol.cpp: osg::EllipsoidModel* em = csn->getEllipsoidModel(); osgposter/osgposter.cpp:csn->getEllipsoidModel()->convertLatLongHeightToXYZ( osgsimulation/osgsimulation.cpp:csn->setEllipsoidModel(new osg::EllipsoidModel()); osgsimulation/osgsimulation.cpp:osg::EllipsoidModel* ellipsoid = csn->getEllipsoidModel(); This should give you plenty of code to look at. Run these examples and see if any function in the way you want. Also have a look at the CoordiateSystemNode and ElipsoidModel headers, there are methods that do exactly what you need, you just need to be able to read C++. Spend the time with these headers and examples and you'll learn a lot about these particular classess, but even more important you'll develop your skill as programmer, a key one is being able to understand 3rd party code. Robert. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to validate the value of height Above Terrain
Hi Sebastian, Thanks for the link. ... Thank you! Cheers, Suraj -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69323#69323 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [3rdparty] QVR: Virtual Reality library that supports OSG with Vive, Rift, OSVR, and others
Hi, I clarified the statement in the README: QVR applications do not need to care about threads, but are still free to implement any threading model. (QVR uses threads internally, but does not expose them to the application.) Cheers, Martin -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69322#69322 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgText setColor problem
Hi,Iam new to osg can anyone help me in setting a color to the 2d text. ... Thank you! Cheers, Rambabu -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69316#69316 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to validate the value of height Above Terrain
Hi Paul, https://en.wikipedia.org/wiki/List_of_GIS_data_sources might be good starting point. cheers Sebastian Hi, I checked it out. I am missing DTED data for the terrain! Any sources where i can get any terrain model and its corressponding DTED data? ... Thank you! Cheers, Suraj -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69320#69320 ___ 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] World to local coordinates
Hi, I saw the osg/CoordinateSystemNode but iam unable to to locate the model according to latitude and longitude readings.Please share code if anybody knows. ... Thank you! Cheers, Rambabu :) :) :) -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69315#69315 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to validate the value of height Above Terrain
Hi, I checked it out. I am missing DTED data for the terrain! Any sources where i can get any terrain model and its corressponding DTED data? ... Thank you! Cheers, Suraj -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=69320#69320 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org