Re: [osg-users] osg-users Digest, Vol 135, Issue 28
1. Re: osgQt include files (Michael W. Hall)2. Re: Advice requested: Is OSG what I need for my project?(Johny Canes)3. Re: Procedural terrains in oder to dig it. (Johny Canes) jonasydy jonas...@gmail.com 签名由 网易邮箱大师 定制 On 9/25/2018 04:20, wrote: Send osg-users mailing list submissions to osg-users@lists.openscenegraph.orgTo subscribe or unsubscribe via the World Wide Web, visit http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.orgor, via email, send a message with subject or body 'help' to osg-users-requ...@lists.openscenegraph.orgYou can reach the person managing the list at osg-users-ow...@lists.openscenegraph.orgWhen replying, please edit your Subject line so it is more specificthan "Re: Contents of osg-users digest..."Today's Topics: 1. Re: osgQt include files (Michael W. Hall) 2. Re: Advice requested: Is OSG what I need for my project? (Johny Canes) 3. Re: Procedural terrains in oder to dig it. (Johny Canes) 4. Re: Image containing floats (ivar out) 5. glMemoryBarrier (Tyler Durden) 6. Re: Obtain the position of a node (Johny Canes) 7. Re: glMemoryBarrier (PaweÅ‚ Księżopolski) 8. Absolute/world position (Johny Canes) 9. Re: Absolute/world position (Johny Canes)--Message: 1Date: Sun, 23 Sep 2018 20:48:44 -0500From: "Michael W. Hall" To: OpenSceneGraph Users Subject: Re: [osg-users] osgQt include filesMessage-ID: <1537753724.3990.20.ca...@att.net>Content-Type: text/plain; charset="utf-8"Well I built OSG and did not install from a package. ?I made the changein Option two. ?I changed the two lines to add lib64. ?I also had toadd /usr/local to the PATHS section. ?That got rid of some of theerror. ?It now finds all but osg. ?Not sure what it up. ?I see thelibosg library in the /usr/local/lib64 directory. ?Still working on it.Thanks,MichaelOn Sat, 2018-09-22 at 00:04 -0500, Michael W. Hall wrote: My osg libraries are in /usr/local/lib64. ?I built osgEarth and it found the osg libs, but the osgQt does not find the libs. ?Not sure what is up with the osgQt. ?I run ccmake to do the configure and it does not find the libraries. ?Has anyone else had this issue? Thanks, Michael On Wed, 2018-09-19 at 11:13 +0200, Mathieu MARACHE wrote: Hi Michael, Thanks that help understanding the issue. CMake finds the include file named 'osg/Version' in /usr/local/include but fails to find any library for the following components 'osgDB', 'osgGA', 'osgUtil', ?'osgText', 'osgViewer', 'osgWidget '?and lastly ''osg' not 'OpenThreads' itself. For example it looks for osgDB for optimized libraries and osgDBd for debug libraries. Could you verify that your /usr/local/lib folder contains such libraries ? I recall that on linux 64bits libraries may be installed in /usr/local/lib64 and not in /usr/local/lib (without the 64 appended). If this is the case, you are then left with two options : Option 1 you are the one building osg and installing it so you can modify osg's CMake install path for libraries. You can call CMake to set LIB_POSTFIX to an empty string when configuring osg on your system it is set by default to 64 when building on unix 64bits architectures ? ? ? SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement") that would mean configuring like this : $> cmake -DLIB_POSTFIX="" Option 2 if you get osg from a package you need to modify your local copy of CMake's module to add the lib64 to the PATH_SUFFIXES. On your system that would be?/usr/share/cmake- 3.5/Modules/Findosg_functions.cmake . You need to modify two lines to replace? 'PATH_SUFFIXES lib' by? 'PATH_SUFFIXES lib lib64'HTH -- n?? On Wed, 19 Sep 2018 at 03:54, Michael W. Hall wrote: Hope this is correct. On Tue, 2018-09-18 at 08:39 +0200, Mathieu MARACHE wrote: Hi Micheal,? This is not the output of cmake but the output of cmake determining your compiler capabilities. I should have been more clear last time. Please run:? cmake --debug-output --trace-expand -DOpenSceneGraph_DEBUG=On . &> output.log? and send back this output.log file that will contain everything cmake has run through? As a last note. It is always better to do out of source or below source cmake like this :? .../osgQt .../osgQt-build? the run cmake from osgQt-build like this :? cmake --debug-output --trace-expand
Re: [osg-users] Absolute/world position
Hi, Like this unanswered thread from 2011 (http://forum.openscenegraph.org/viewtopic.php?t=8366) suggests, replacing the bounds center with a vec3(1,1,1) is much better. Code: Vec3(1,1,1) * computeLocalToWorld(pat->getParentalNodePaths()[0]); This gives me the result I'm looking for. Thank you! Cheers, Johny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74968#74968 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] Absolute/world position
Hi, I've been using the following snippet to get a final world position Code: n.getBound().center() * computeLocalToWorld(n.getParentalNodePaths()[0])); This works correctly some of the time, e.g. for a shallow scene, or one that is freshly imported from an .obj loader, etc. But things go awry when nesting Pats, and will returns 'doubly multiplicated' coordinates or otherwise just coords that make no sense to me. Is there a real surefire way to get the absolute / world coordinates from a node / pat? Alternatively, could I be doing something wrong? I have several pats and nodes inside of eachother, and maybe something is bad. Thank you! Cheers, Johny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74967#74967 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] glMemoryBarrier
sergio2k18 wrote: > > I have two compute shader and i need that second cs must wait until first cs > finished his work. Do i have to use memory barriers between each dispatch > compute invocation? How can i invoke glMemoryBarrier in openscenegraph? > You certainly should use memory barrier in this case. In osggpucull example there is InvokeMemoryBarrier draw callback, that you may connect to your osg::DispatchCompute. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74966#74966 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Obtain the position of a node
*7 years later ... This is a problem in 2018. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74965#74965 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] glMemoryBarrier
Hi, I have two compute shader and i need that second cs must wait until first cs finished his work. Do i have to use memory barriers between each dispatch compute invocation? How can i invoke glMemoryBarrier in openscenegraph? Thank you! Cheers, Tyler -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74964#74964 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Image containing floats
Thanks David! I got it to work now. Here my function creating a 2D texture from a 2-Dimensional vector, in case it's of any use to anyone. Code: osg::Texture2D* createTextureLUT2D(std::vector >& data) { int rows = data.size(); int cols = data[0].size(); //create image containing one channel of float, we use the RED channel osg::Image* image = new osg::Image; image->allocateImage(cols, rows, 1, GL_RED, GL_FLOAT); image->setInternalTextureFormat(GL_R32F); //set the data to the image; the image stores successive columns rather than succesive rows float* dataPtr = (float*)image->data(); for (int b = 0; b < cols; b++) for (int a = 0; a < rows; a++) *dataPtr++ = data[a][b]; //create the texture and set its image osg::ref_ptr texture = new osg::Texture2D; texture->setImage(image); texture->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::NEAREST); texture->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::NEAREST); return texture.release(); } cheers, Ivar -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74963#74963 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Procedural terrains in oder to dig it.
Hi, I wouldn't use osgEarth, that's a heavy notekit, which is in its own a rather sluggish heavy prebuilt thing people use to make planets I think. I get what you're asking. You're thinking of some voxel type thing... Hm, just build your own. Thank you! Cheers, Johny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74962#74962 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Advice requested: Is OSG what I need for my project?
Hi, No absolutely do not use Osg. It may not be mentioned, but Osg is quite heavyweight. Osg is a render engine, not a scene graph, whatever that is. Shockingly, people don't even use Osg because it is a scene graph. We use it because it thinly abstracts(?)OpenGL, and leaves you with a looot of performance, if you treat the Osg right. Do not write a 3d chat-bot (?) with Osg! Thank you! Cheers, Johny -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=74961#74961 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org