John Lee | 4 May 04:59 2016

some problem about hud and window size

Hi,

First i drew some tags by HUD on the window size which is 1100X679, and it was correct. But when i change the
window's length-width ratio the tag's position changed and it became wrong.
Can anyone tell me how i can solve this problem?

Thank you!

Cheers,
John

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67047#67047

John Lee | 3 May 11:35 2016

some problem about hud and window size

Hi,

First, I drew some tags dynamically using HUD camera on the render window size which is 1100X679, but when I
change the length-width ratio of the render window size, the tags positions changed and it was wrong.
Can anyone tell me how can i solve this problem.

Thank you!

Cheers,
Lee

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67044#67044

Attachments: 
http://forum.openscenegraph.org//files/2_198.png
http://forum.openscenegraph.org//files/1_180.png

Heiko Irrgang | 3 May 12:10 2016
Picon

Predefined selectable edges with certain radius

Hi,

i am trying to implement edge selection with osg.

What i have though, is not a simple 'every edge around every polygon is selectable' situation.

I have Faces built from several polygons and i want the outlines of these faces be selectable, not every edge
of every polygon.

Now what i did first, is to use a linestrip for the outlines. This has good performance but it seems that
LineSegmentIntersector does not see them, so they are not pickable. (is this correct, or did i do
something wrong?)

Second i tried to use a number of osg::Cylinder objects, now they are pickable, but everything slowed down
significantly as there are many cylinders and i did not see where i could specify the resolution of the
cylinder. Another bad effect of this, is that obviously the 'lines' (aka cylinders) zoom with the camera
view. So if you zoom in a lot, the edges get huge, if you zoom out far, you don't see them anymore.

So what i want is a mixture of both... optically i want single lines, but on selection, i want the user not to
have to hit the exact pixel of the line to count as selected, but have some picking area around the lines
(ideally adjusting to camera zoom, so the area gets not huge when zoomed in).

What be the osg way to achieve this?

... 

Thank you!

Cheers,
Heiko
(Continue reading)

Florian GOLESTIN | 2 May 07:13 2016
Picon

Using multiples texture for a geometry

Hi everyone,

I've a Geometry (which is a wall) and I want to put two textures on it. A part with a first texture and a second
part with a  second texture. 

I wrote the code above :

Code:

    //Texture 1
    geom->setTexCoordArray(0, level->texcoords.get());
    {
      osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
      osg::ref_ptr<osg::Image> image = osgDB::readImageFile("media/textures/stone_3_2048x2048.jpg");
      texture->setImage(image);
      texture->setUnRefImageDataAfterApply(true);
      level->getOrCreateStateSet()->setTextureAttributeAndModes(0, texture);
    }
    //Texture 2
    geom->setTexCoordArray(1, level->texcoords2.get());
    {
      osg::ref_ptr<osg::Texture2D> texture = new osg::Texture2D;
      osg::ref_ptr<osg::Image> image = osgDB::readImageFile("media/textures/Metal_seamless2_ch16.jpg");
      texture->setImage(image);
      texture->setUnRefImageDataAfterApply(true);
      level->getOrCreateStateSet()->setTextureAttributeAndModes(1, texture);
    }

However the wall appears completely black (no textures).

(Continue reading)

Alex Taylor | 1 May 16:04 2016
Picon

Trying to run osgvolume example

All,

I'm trying to run the osgvolume example. Running OSG 3.4 on my mac. I've referred to the following setup page for specifying environment variables:


I'm trying to run the example with a series of DICOM files and I keep getting a missing plugin warning:

[ah-ataylor-maci:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/bin]155 % ./osgvolume --images /sandbox/ataylor/VIX/VIX/footImageDir/IM/*.dcm

Warning: Could not find plugin to read objects from file "/sandbox/ataylor/VIX/VIX/footImageDir/IM/IM-0001-0001.dcm".

Warning: Could not find plugin to read objects from file "/sandbox/ataylor/VIX/VIX/footImageDir/IM/IM-0001-0002.dcm".

I've also tried passing the directory that contains the DICOM images without the --images flag, I receive similar warnings about missing plugins.

Here is my $PATH:

/ataylor/3p-tmw/3p/derived/maci64/openscenegraph]150 % echo $PATH

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/hub/share/bin:/mathworks/hub/share/apps/iat/devapps/sandbox-store/prod/bin:/usr/bin:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib/osgPlugins

My questions:

1) Is there any obvious setup I'm missing?

2) When I look in openscenegraph/lib/osgPlugins-3.4.0, the built shared libraries have the file extension .so, which is very surprising on a mac. I've read conflicting things about this online...is this indicative of a build problem? I would have expected these to be .dylib files.

[ah-ataylor-maci:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib/osgPlugins-3.4.0]103 % ls -l

total 30036

-rwxr-xr-x  1 ataylor  users    61636 Apr 30 23:28 osgdb_3dc.so

-rwxr-xr-x  1 ataylor  users   339940 Apr 30 23:29 osgdb_3ds.so

-rwxr-xr-x  1 ataylor  users   180004 Apr 30 23:29 osgdb_ac.so

-rwxr-xr-x  1 ataylor  users   119040 Apr 30 23:30 osgdb_avfoundation.so

-rwxr-xr-x  1 ataylor  users    44584 Apr 30 23:27 osgdb_bmp.so

-rwxr-xr-x  1 ataylor  users   214464 Apr 30 23:29 osgdb_bsp.so

-rwxr-xr-x  1 ataylor  users   104696 Apr 30 23:28 osgdb_bvh.so

-rwxr-xr-x  1 ataylor  users   153852 Apr 30 23:27 osgdb_cfg.so

-rwxr-xr-x  1 ataylor  users   103156 Apr 30 23:28 osgdb_curl.so

-rwxr-xr-x  1 ataylor  users    72688 Apr 30 23:27 osgdb_dds.so


Thanks as always for any help,

Alex

<div><div dir="ltr">All,<div><br></div>
<div>I'm trying to run the osgvolume example. Running OSG 3.4 on my mac. I've referred to the following setup page for specifying environment variables:</div>
<div><br></div>
<div>
<a href="http://trac.openscenegraph.org/projects/osg//wiki/Support/UserGuides/Examples">http://trac.openscenegraph.org/projects/osg//wiki/Support/UserGuides/Examples</a><br>
</div>
<div><br></div>
<div>I'm trying to run the example with a series of DICOM files and I keep getting a missing plugin warning:</div>
<div><br></div>
<div>

<p class="p1"><span class="s1">[ah-ataylor-maci:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/bin]155 % ./osgvolume --images /sandbox/ataylor/VIX/VIX/footImageDir/IM/*.dcm</span></p>
<p class="p1"><span>Warning: Could not find plugin to read objects from file "/sandbox/ataylor/VIX/VIX/footImageDir/IM/IM-0001-0001.dcm".</span><br></p>
<p class="p1"><span class="s1">Warning: Could not find plugin to read objects from file "/sandbox/ataylor/VIX/VIX/footImageDir/IM/IM-0001-0002.dcm".</span></p>
<p class="p1">I've also tried passing the directory that contains the DICOM images without the --images flag, I receive similar warnings about missing plugins.</p>
<p class="p1">Here is my $PATH:</p>
<p class="p1"><span class="s1">/ataylor/3p-tmw/3p/derived/maci64/openscenegraph]150 % echo $PATH</span></p>
<p class="p1">

</p>
<p class="p1"><span class="s1">/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/hub/share/bin:/mathworks/hub/share/apps/iat/devapps/sandbox-store/prod/bin:/usr/bin:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib/osgPlugins</span></p>
<p class="p1">My questions:</p>
<p class="p1">1) Is there any obvious setup I'm missing?</p>
<p class="p1">2) When I look in&nbsp;<span>openscenegraph/lib/≤/span><span>osgPlugins-3.4.0, the built shared libraries have the file extension .so, which is very surprising on a mac. I've read conflicting things about this online...is this indicative of a build problem? I would have expected these to be .dylib files.</span></p>
<p class="p1"><span class="s1">[ah-ataylor-maci:/sandbox/ataylor/3p-tmw/3p/derived/maci64/openscenegraph/lib/osgPlugins-3.4.0]103 % ls -l</span></p>
<p class="p1"><span class="s1">total 30036</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users&nbsp; &nbsp; 61636 Apr 30 23:28 osgdb_3dc.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 339940 Apr 30 23:29 osgdb_3ds.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 180004 Apr 30 23:29 osgdb_ac.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 119040 Apr 30 23:30 osgdb_avfoundation.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users&nbsp; &nbsp; 44584 Apr 30 23:27 osgdb_bmp.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 214464 Apr 30 23:29 osgdb_bsp.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 104696 Apr 30 23:28 osgdb_bvh.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 153852 Apr 30 23:27 osgdb_cfg.so</span></p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users &nbsp; 103156 Apr 30 23:28 osgdb_curl.so</span></p>
<p class="p1">

</p>
<p class="p1"><span class="s1">-rwxr-xr-x&nbsp; 1 ataylor&nbsp; users&nbsp; &nbsp; 72688 Apr 30 23:27 osgdb_dds.so</span></p>
<p class="p1"><span class="s1"><br></span></p>
<p class="p1">Thanks as always for any help,</p>
<p class="p1">Alex</p>
</div>
</div></div>
Picon

Doxygen thinks Drawable inherits from Node

Hi!

I am new to OSG and just had some confusion while tying to build scene
graphs. I was confused because the doxygen documentation at
http://trac.openscenegraph.org/documentation/OpenSceneGraphReferenceDocs/a0
0243.html
shows an inheritance diagram (and also a "Public Member Functions
inherited from osg::Node" section) which states that Drawable derives from
Node -- which is wrong, AFAIK now, it derives directly from Object, right?

Just wanted to let you know that something seems to be wrong with the
Doxygen output here.

Thanks for OSG :)

Regards

Thilo

Björn Blissing | 30 Apr 00:19 2016
Picon
Gravatar

Re: osgViewer::Viewer fullscreen dual monitor issue


akaisora wrote:
> Hi,
> 
> I am still new around here, I've got the book "OpenSceneGraph 3.0 Beginner's Guide" and learning step by
step. But I have dual monitors and running any osg::Viewer example I got fullscreen window on both
monitors, and a splitted view as demonstrated in the attached screenshot.
> 
> Bascially it swaps the two monitors, the left render should have been on the right and vice versa. 
> 
> Any idea how to fix it? Except using only one monitor :)
> 
> 
> Thank you!
> 
> Cheers,
> Soulaymen

Hi Soulaymen,

This is because you have your monitors setup in the wrong order in your windows settings. Windows
enumerates your monitors, which can be seen in the displays settings. Make sure that your leftmost
monitor have id 1 and the one to the right have id 2. (Note that this have nothing to do with which monitor is
set to be primary or secondary, it is quite possible to make monitor 2 the primary monitor.).

I suspect that if you open the display settings you will currently have something that looks like this (Note
the numbers on the displays and their location):
http://i.stack.imgur.com/SQzT8.png

You will need to change this so the numbers are in order left to right.

Regards
Björn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67031#67031

_______________________________________________
osg-users mailing list
osg-users <at> lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Florent Berthaut | 28 Apr 18:21 2016
Picon

OpenGL CoreProfile / error in on OS X

Hi all,

I am trying to port my GNU/Linux project (with OSG 3.4.0) to OS X.
I first installed OSG with Macports.

However the glsl shaders do not compile with anything above version 110, whereas i need at least version 3 and when available 4.2 (for image load store features).

I saw this post, which relates to the same issue (choosing OpenGL Core Profile instead of Compatibility profile):
http://forum.openscenegraph.org/viewtopic.php?t=9992&highlight=osx

It would seem that the issue has been fixed, but looking at the source code of OSG 3.4.0, 3.5.0 and 3.5.1, it does not seem that the correct calls have been added.
I tried adding them before recompiling OSG but then i get a bunch of errors.

If i change the shaders syntax and use version 110, in order to match compatibility profile on OSX, they compile but the application then crashes.
Here is backtrace of the crash :

0   com.apple.driver.AppleIntelHD4000GraphicsGLDriver    0x000000010f85dd5c IntelVertexArray::setElemData(unsigned int, unsigned int, unsigned short, unsigned int) + 308
1   com.apple.driver.AppleIntelHD4000GraphicsGLDriver    0x000000010f85dc1a IntelVertexArray::extractState(GLDVertexArrayDataRec const*, unsigned long long) + 170
2   libGPUSupportMercury.dylib        0x00007fff92e075bb gpusLoadCurrentVertexArray + 195
3   com.apple.driver.AppleIntelHD4000GraphicsGLDriver    0x000000010f85b179 Gen7::updateDispatch(GLDContextRec*, GLDRenderDispatch*, unsigned int*) + 1393
4   GLEngine                          0x00007fff8ee5dad4 gleDoDrawDispatchCore + 533
5   GLEngine                          0x00007fff8ee00636 gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 886
6   GLEngine                          0x00007fff8ed8aa6a gleCallList + 170
7   libosgUtil.130.dylib              0x000000010779085d osgUtil::RenderLeaf::render(osg::RenderInfo&, osgUtil::RenderLeaf*)


Is there something specific I need to do in my code in order to activate the OpenGL Core Profile ?


Thanks in advance,

Regards,

Florent


-- http://hitmuri.net
<div>
    Hi all,<br><br>
    I am trying to port my GNU/Linux project (with OSG 3.4.0) to OS X. <br>
    I first installed OSG with Macports. <br><br>
    However the glsl shaders do not compile with anything above version
    110, whereas i need at least version 3 and when available 4.2 (for
    image load store features).<br><br>
    I saw this post, which relates to the same issue (choosing OpenGL
    Core Profile instead of Compatibility profile): <br><a class="moz-txt-link-freetext" href="http://forum.openscenegraph.org/viewtopic.php?t=9992&amp;highlight=osx">http://forum.openscenegraph.org/viewtopic.php?t=9992&amp;highlight=osx</a><br><br>
    It would seem that the issue has been fixed, but looking at the
    source code of OSG 3.4.0, 3.5.0 and 3.5.1, it does not seem that the
    correct calls have been added. <br>
    I tried adding them before recompiling OSG but then i get a bunch of
    errors.<br><br>
    If i change the shaders syntax and use version 110, in order to
    match compatibility profile on OSX, they compile but the application
    then crashes.<br>
    Here is backtrace of the crash :<br><br>0&nbsp;&nbsp;
          com.apple.driver.AppleIntelHD4000GraphicsGLDriver&nbsp;&nbsp;&nbsp;
          0x000000010f85dd5c IntelVertexArray::setElemData(unsigned int,
          unsigned int, unsigned short, unsigned int) + 308<br>
          1&nbsp;&nbsp; com.apple.driver.AppleIntelHD4000GraphicsGLDriver&nbsp;&nbsp;&nbsp;
          0x000000010f85dc1a
          IntelVertexArray::extractState(GLDVertexArrayDataRec const*,
          unsigned long long) + 170<br>
          2&nbsp;&nbsp; libGPUSupportMercury.dylib&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0x00007fff92e075bb
          gpusLoadCurrentVertexArray + 195<br>
          3&nbsp;&nbsp; com.apple.driver.AppleIntelHD4000GraphicsGLDriver&nbsp;&nbsp;&nbsp;
          0x000000010f85b179 Gen7::updateDispatch(GLDContextRec*,
          GLDRenderDispatch*, unsigned int*) + 1393<br>
          4&nbsp;&nbsp; GLEngine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0x00007fff8ee5dad4
          gleDoDrawDispatchCore + 533<br>
          5&nbsp;&nbsp; GLEngine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0x00007fff8ee00636
          gleSetupAndDrawArraysOrElementsOutOfLine_ListExec + 886<br>
          6&nbsp;&nbsp; GLEngine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0x00007fff8ed8aa6a
          gleCallList + 170<br>
          7&nbsp;&nbsp; libosgUtil.130.dylib&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 0x000000010779085d
          osgUtil::RenderLeaf::render(osg::RenderInfo&amp;,
          osgUtil::RenderLeaf*)<br><br><br>
    Is there something specific I need to do in my code in order to
    activate the OpenGL Core Profile ?<br><br><br>
    Thanks in advance,<br><br>
    Regards,<br><br>
    Florent<br><br><br>-- 
<a class="moz-txt-link-freetext" href="http://hitmuri.net">http://hitmuri.net</a>

  </div>
Robert Kiser | 28 Apr 17:02 2016

Re: Odd Font/Text issue

Hello All

I thought I'd add my recent experience to this thread in case it helps get to the bottom of this strange behavior.

Like the earlier posters, I was noticing that some of my text (changed from a callback) was getting dropped
(displayed as blanks).

As was suggested earlier, a crude but workable hack was on the first call to setText send a string with all the
displayable ASCII characters and then send a blank string.  Then, all the subsequent updates displayed
fine.  That hack was good enough for my purposes, so I didn't investigate any further.

I did have the line text->setDataVariance(osg::Object::DYNAMIC); set in case that matters.

For what it's worth:

Windows 8.1 Pro 64 bit
Microsoft Visual Studio Enterprise 2015 Update 1
using dual monitors and 2 graphics cards: Intel HD 4000 and AMD Radeon HD 7570

I don't know if this info helps or is just noise.  My hope is that if there is indeed an obscure bug with osgText
that this is another clue in getting to the bottom of it.

Best Regards,

Bob Kiser

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=67005#67005

Seppel Andrio | 28 Apr 13:19 2016

[osgPlugins] Collada Plugin Not Available

Hi,

i tried to download the OSG Collada plugin provided by the Support/Knowledge/Collada page (sri I'm
unfortunately not allowed to post the link :/).

But the download links are broken. Is there someone who can fix this or send me the files (Linux if the too
download links are different)?

Thank you!

Cheers,
seppelandrio

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=66998#66998

Andy Skinner | 27 Apr 21:20 2016
Picon

Re: ShaderComposer::releaseGLObjects warning

So, to be clear, we'll leave it as is?

 

thanks

andy

 

 

Needing to put a using in lots of places across the OSG to just quieten inappropriate warnings is pretty crappy.  The more superfluous code you have in your code base the less easy it is to read, the easier it to break.  This makes me very wary of jumping through hoops to quieten dodgy warnings from the compilers. 

 

Robert.

 

 

 

<div>
<div class="WordSection1">
<p class="MsoNormal"><span>So, to be clear, we'll leave it as is?<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span>thanks<p></p></span></p>
<p class="MsoNormal"><span>andy<p></p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
<div>
<p class="MsoNormal">Needing to put a using in lots of places across the OSG to just quieten inappropriate warnings is pretty crappy.&nbsp; The more superfluous code you have in your code base the less easy it is to read, the easier it to break.&nbsp; This makes me very
 wary of jumping through hoops to quieten dodgy warnings from the compilers.&nbsp;<p></p></p>
</div>
<div>
<p class="MsoNormal"><p>&nbsp;</p></p>
</div>
<div>
<p class="MsoNormal">Robert.<p></p></p>
</div>
<div>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal"><span><p>&nbsp;</p></span></p>
<p class="MsoNormal">&nbsp;<p></p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

Gmane