Re: [osg-users] Keyboard handler: SHIFT modifier doesn't work on Linux

2012-11-12 Thread Michael Rubin

robertosfield wrote:
 
 Could you try the osgkeyboard example
 


Example works fine -- thanks for the tip! I've tracked the issue (in my code) 
to masking against osgGA::GUIEventAdapter::KEY_Shift_L instead of (like the 
example) osgGA::GUIEventAdapter::MODKEY_LEFT_SHIFT.

Thank you very much for the quick response,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Keyboard handler: SHIFT modifier doesn't work on Linux

2012-11-10 Thread Michael Rubin
Hello,

The SHIFT modifier does not appear to be working correctly on my Linux app (OSG 
3.0.1) -- it is always on (so all typing in my debug console appears as 
upper-case).

I've seen posts like this 
(http://comments.gmane.org/gmane.games.flightgear.devel/65510) which claim that 
X is sending the incorrect events to the window, but using `xev` I've confirmed 
that my window (i.e. OSG) is receiving the correct events for shift down, shift 
up, etc. However, as a client of OSG, I'm not receiving correct modifiers (in 
the mask param of my callback function).

On Windows (also OSG 3.0.1), everything works as expected.

Does anyone have any suggestions that I could apply?

Thank you very much,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] question about RotateCylinderDragger

2012-11-05 Thread Michael Schanne
Hi,

In my application I am trying to create a box that the user can resize and 
rotate.  I have a CompositeDragger that works similar to the TabPlaneDragger 
class (without the translation).  I would like to use the RotateCylinderDragger 
for the rotation but it doesn't do quite what I want.  I would like to have a 
handle sticking out from the cylinder that the user could drag to rotate.  To 
illustrate:
   
...o
...|
[]---[]---[]
||
||
[]..[]
||
||
[]---[]---[]


In this illustation the [] symbols are the scale dragger handles and the o is 
the rotation handle (the periods are just for spacing).  I want to drag on the 
o handle to rotate an invisible cylinder whose center is the center of the box, 
and whose radius extends to the o handle.  However the RotateCylinderDragger 
rotates when dragging the side of the cylinder, not the top.  In other words, 
if my camera is directly over the end of the cylinder (pointed toward the 
center of the circle) then dragging the cylinder has no effect, which is not 
what I want.  

Is is possible to use RotateCylinderDragger to do what I described, or do I 
need to write my own Dragger?

... 

Thank you!

Cheers,
Michael[/code]

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-10-26 Thread michael kapelko
I've just tried to load Collada object with materials with the help of
your assimp plugin, and it worked fine. However, blend files created
with Blender 2.64 didn't produce any visual output.
So it turns out assimp isn't the holy grail :|
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] custom CompositeDragger and AntiSquish

2012-10-26 Thread Michael Schanne
Hi,

Please disregard my first question about AntiSquish... I had a bug where a 
NodeCallback which mistakenly did not call traverse() was attached to a node 
above the Dragger.  This meant the update traversal never reached the 
AntiSquish.

However, I am still open to suggestions about my second question... how to make 
the 1D dragger handles' length scale with the box length, but remain a constant 
width in screen coordinates

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] question about Optimizer and FLATTEN_STATIC_TRANSFORMS

2012-10-26 Thread Michael Schanne

lyceel wrote:
 
 Hi, Michael,
 
 The structure of the scene itself can sometimes prevent the transform 
 from being flattened away.  What happens if you try 
 FLATTEN_STATIC_TRANSFORMS_DUPLICATING_SHARED_SUBGRAPHS (sometimes,  you 
 just need a bigger hammer  :-) ).
 


That worked, thanks.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Forum not working

2012-10-25 Thread michael kapelko
Hi.
I get the following error when try to access the forum:

phpBB : Critical Error

Could not connect to the database
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-25 Thread michael kapelko
Should I create the patch for the functionality?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-10-25 Thread michael kapelko
Wang Rui, I research what format best to use for moving objects from
Blender to OSG, and I see Assimp claiming to load Blender files
directly. Since you said you wrote the plug-in already for it, I'd
like to try it out.
I have a follow up question: can I possibly differentiate Blender
model from Blender material to have several skins for the same
material in OSG? Does your plug-in do anything of the sort?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-10-25 Thread michael kapelko
For the same *object. Sorry.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-25 Thread michael kapelko
Well, something like Alt-F4 is very-very intuitive, so forbidding it
will increase the number of angry people :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] custom CompositeDragger and AntiSquish

2012-10-24 Thread Michael Schanne
Hi,

I am trying to add a 2D box to my scene (consisting of lines 1 pixel wide) that 
a user can resize by dragging the sides or corners, or rotate by dragging a 
handle.  I'm attempting to use the osgManipulator Dragger classes for this 
purpose.  I created a subclass of CompositeDragger and added to it a 
Scale2DDragger (for the corners) and two Scale1DDraggers (for each pair of 
sides).  Basically the code is a copy of the TabPlaneDragger without the 
TranslatePlaneDragger child dragger.

I added the dragger to my scene using the osgManipulator example as a guide.  
My scene looks like this:

Group
  |   \
MatrixTransform   CustomDragger
 |
Geode (containing box geometry)

and I call addTransformUpdating() on CustomDragger passing the MatrixTransform. 
 The box resizes correctly when I drag the handles.

A problem I am having is that the drag handles will not stay a constant size.  
If I drag the box so that one side is longer than the other, the handle boxes 
will have the same non-uniform scaling.  I am using AutoTransform and 
AntiSquish in my code exactly the way TabPlaneDragger does to prevent this from 
happening, but for some reason it doesn't work in my code (although it works in 
the osgManipulator example).

The only real difference in my code is that I set a rotation matrix in the 
CustomDragger, in order to draw the drag boxes in the XY plane (it seems to 
default to the XZ plane).  

What could be causing the drag handles to scale instead of staying a constant 
screen size?

What I ultimately want is for the entire box to be draggable.  So I want the 
handles to cover the box, and be a constant few pixels wide in screen 
coordinates regardless of the zoom level.  Then I will make the handles 
invisible so only the 1-pixel wide box is visible.  Any advice on how to do 
this?

(I am using OSG 3.0.0.)
... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Can OSG store materials externally for an object?

2012-10-20 Thread michael kapelko
Hi.
Does OSG have some sort of material files that can be applied to the same mesh?
So far I've looked into osgt files and they store both mesh and
material inside one file.
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Can we add Viewer::setSkipCloseWindowEvent to prevent Window from being closed upon receiving CLOSE_WINDOW?

2012-10-19 Thread michael kapelko
Hi.
I've looked at the code (OSG 3.0.1) of Viewer::eventTraversal and
noticed that it checks for CLOSE_WINDOW event and closes the window,
so there's no way to prevent the window from closing. I've googled for
window close prevention with no luck, too.
Can we add something like Viewer::setSkipCloseWindowEvent to OSG?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] question about Optimizer and FLATTEN_STATIC_TRANSFORMS

2012-10-19 Thread Michael Schanne
Hi,

I have a model that I converted from an .stl file to .osg.  I wanted to apply a 
scaling to the model, so I added a MatrixTransform with a scaling matrix above 
the model's root node.  For maximum efficiency I wanted to apply the transform 
directly to the vertices, so I tried to run the .osg file through osgconv a 
second time, with the OSG_OPTIMIZER env variable set to 
FLATTEN_STATIC_TRANSFORMS.  However, the new file was identical to the previous 
file, with the parent MatrixTransform still in place.  I set the DataVariance 
of the transform to STATIC, and it had no effect.  Is there something else that 
could interfere with the Optimizer flattening the transform, or am I expecting 
FLATTEN_STATIC_TRANSFORMS to do something that it's not intended to do?

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Have you tried const char* (string) and UTF-8 instead of wide ones?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
Can you provide some simple test case of what you want (which anyone
can 'make')? It's hard to conclude anything from what you've posted.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Cyrillic (russian) in Qt inside OSG

2012-10-09 Thread michael kapelko
E.g., I've had problems with Qt (not OSG) with UTF-8 russian text. I
recall there were some problems with QTextCodec as well. So more
context is required. And test case would be the best.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to create glow effect in OSG

2012-09-30 Thread Michael Schanne
I've seen that there is a glow example in osgPPU.  Are there any examples using 
just OSG that would give an effect similar to the attachment in my previous 
post?  I would prefer not to bring another library into my project if at all 
possible.

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to get position information

2012-09-26 Thread Michael Hall
I am using osgEarth as you suggested earlier.  I will post on there forum, do 
you know if they have any examples of how to do this?  I have not found 
anything 
as of yet.  I figured you should be able to do this with osgEarth.  






From: Chris Hanson xe...@alphapixel.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Tue, September 25, 2012 10:10:30 PM
Subject: Re: [osg-users] How to get position information


On Tue, Sep 25, 2012 at 7:26 PM, Michael W. Hall hal...@att.net wrote:

Well I have my application displaying maps.  I also believe that I have
some DTED data loading.  Now I would like to have the lat/long and
elevation display in the status bar.  My question is how do you get the
position information as you move the mouse over the map?
I was trying to make my own class derived from osgGA::GUIEventHandler.
Before I go off in some direction I thought I would ask.


  If you're not using osgEarth for this, you're doing it the hard way.


Thanks for any help.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



-- 

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


[osg-users] [forum] Windows 7 64Bit OSG

2012-09-25 Thread Michael Aquilino
Hi,

We have had OSG embedded in our application for some time now.  Our current 
version is 2.8.1.  We had been running on Windows XP Pro until recently when we 
installed our application on a Windows 7 laptop (32Bit).  There were a few very 
minor glitches that we corrected.  More recently we installed on a Windows 7 
desktop (64Bit).  The library DLL that we build on top of OSG fails to load.  
We get the infamous error An attempt was made to load a program with an 
incorrect format.  Any help would be much appreciated.

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to get position information

2012-09-25 Thread Michael W. Hall
Well I have my application displaying maps.  I also believe that I have
some DTED data loading.  Now I would like to have the lat/long and
elevation display in the status bar.  My question is how do you get the
position information as you move the mouse over the map?

I was trying to make my own class derived from osgGA::GUIEventHandler.
Before I go off in some direction I thought I would ask.

Thanks for any help.

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Errors after switch to osgEarth

2012-09-17 Thread Michael W. Hall
Will do.  Thought about that after I posted.

On Sat, 2012-09-15 at 01:36 -0400, Glenn Waldron wrote:
 Michael,
 
 
 May I suggest you post osgEarth questions to the osgEarth forum at:
 http://forum.osgearth.org
 
 
 Please go there and post your earth file. Thanks.
 
 
 Glenn Waldron / @glennwaldron
 
 
 On Fri, Sep 14, 2012 at 7:30 PM, Michael W. Hall hal...@att.net
 wrote:
 I am receiving the following errors after switching to reading
 files
 with osgEarth:
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
 [osgEarth]* Could not initialize TileSource for layer
 east-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
 [osgEarth]* Could not initialize TileSource for layer
 east-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [ImageLayer] Error: layer does not have a valid
 TileSource,
 cannot create image
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
 [osgEarth]* Could not initialize TileSource for layer
 west-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
 [osgEarth]* Could not initialize TileSource for layer
 west-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [ImageLayer] Error: layer does not have a valid
 TileSource,
 cannot create image
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
 [osgEarth]* Could not initialize TileSource for layer
 east-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
 [osgEarth]* Could not initialize TileSource for layer
 west-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
 [osgEarth]* Could not initialize TileSource for layer
 east-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 [osgEarth]* [GDAL driver] Dataset has no spatial reference
 information: 
 /home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
 [osgEarth]* Could not initialize TileSource for layer
 west-tiff
 ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.
 
 Object::connect: No such slot QMainWindow::open()
 in /home/hallmw/Projects/osgMap/src/osgmap/MainWindow.cpp:88
 Inconsistency detected by ld.so: dl-close.c: 737: _dl_close:
 Assertion
 `map-l_init_called' failed!
 
 Previously, I was reading .ive files with my program.  I
 switched to
 osgEarth and I am getting the above errors.  I am assuming
 they are
 coming from osgEarth.
 
 All I see is a white sphere.  No image of the BMNG on that
 sphere.  I am
 not sure what I am missing.  I call osgDB::readNodeFile() and
 it appears
 that the file is recognized.  Any ideas?
 
 ___
 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


[osg-users] How to create glow effect in OSG

2012-09-14 Thread Michael Schanne
Hi,

I would like to create a glow or halo effect around my geometry.  What is the 
most efficient way to create this effect in OSG?

The attached screenshot shows the effect I am trying to achieve.  The left X is 
the original geometry and the right X has the glow effect.
... 

Thank you!

Cheers,
Michael

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




Attachments: 
http://forum.openscenegraph.org//files/glow_162.png


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgEarthild

2012-09-14 Thread Michael W. Hall
I have been trying to modify my CMakeList.txt file to find the osgEarth
package.  I added the line:

FIND_PACKAGE(osgEarth)

It tells me the following:

 CMake Warning at CMakeLists.txt:128 (FIND_PACKAGE):
   Could not find module FindOsgEarth.cmake or a configuration file for
   package OsgEarth.

   Adjust CMAKE_MODULE_PATH to find FindOsgEarth.cmake or set
OsgEarth_DIR to
   the directory containing a CMake configuration file for OsgEarth.
The file
   will have one of the following names:

 OsgEarthConfig.cmake
 osgearth-config.cmake
 
What am I missing?  Do I need to make a .cmake file?

Thanks,
Michael


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Errors after switch to osgEarth

2012-09-14 Thread Michael W. Hall
I am receiving the following errors after switching to reading files
with osgEarth:

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
[osgEarth]* Could not initialize TileSource for layer east-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
[osgEarth]* Could not initialize TileSource for layer east-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [ImageLayer] Error: layer does not have a valid TileSource,
cannot create image 
[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
[osgEarth]* Could not initialize TileSource for layer west-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
[osgEarth]* Could not initialize TileSource for layer west-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [ImageLayer] Error: layer does not have a valid TileSource,
cannot create image 
[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
[osgEarth]* Could not initialize TileSource for layer east-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
[osgEarth]* Could not initialize TileSource for layer west-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_east.tif
[osgEarth]* Could not initialize TileSource for layer east-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

[osgEarth]* [GDAL driver] Dataset has no spatial reference
information: 
/home/hallmw/Projects/osgMap/Build/bin/Data/land_shallow_topo_west.tif
[osgEarth]* Could not initialize TileSource for layer west-tiff
ERROR 10: Pointer 'hDS' is NULL in 'GDALClose'.

Object::connect: No such slot QMainWindow::open()
in /home/hallmw/Projects/osgMap/src/osgmap/MainWindow.cpp:88
Inconsistency detected by ld.so: dl-close.c: 737: _dl_close: Assertion
`map-l_init_called' failed!

Previously, I was reading .ive files with my program.  I switched to
osgEarth and I am getting the above errors.  I am assuming they are
coming from osgEarth.  

All I see is a white sphere.  No image of the BMNG on that sphere.  I am
not sure what I am missing.  I call osgDB::readNodeFile() and it appears
that the file is recognized.  Any ideas?

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-09-14 Thread michael kapelko
Hikari is Windows only:
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Comparison+of+GUIsstructure=Libraries
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-09-11 Thread michael kapelko
I've just recalled that there also exist gameswf project which allows
for Flash UI inside games.
http://tulrich.com/textweb.pl?path=geekstuff/gameswf.txt

Would be nice to see this one integrated. Would make a lot of hype
with some easy flash demos :P
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG merchandising

2012-08-30 Thread Michael Weiblen
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] How to exclude LOD-disabled nodes from PolytopeIntersector results?

2012-08-28 Thread Michael Schanne
Hi,

I have a CAD app in which I am using LOD nodes to hide features at different 
zoom levels.  I have also implemented picking using PolytopIntersector similar 
to the example in the Quick Start Guide.  I have noticed that the 
PolytopeIntersector returns intersections that include nodes which are turned 
off by the LOD.  I would like to exclude these from the intersections.  Does 
OSG provide a way to do this?

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] How to exclude LOD-disabled nodes from PolytopeIntersector results?

2012-08-28 Thread Michael Schanne
I solved my problem...

For reference, the code I am referencing from the OSG Quick Start Guide is this:


Code:
double w( .05 ), h( .05 );
osgUtil::PolytopeIntersector* picker =
new osgUtil::PolytopeIntersector(
osgUtil::Intersector::PROJECTION,
x-w, y-h, x+w, y+h );
osgUtil::IntersectionVisitor iv( picker );
viewer-getCamera()-accept( iv );



Shortly after I posted, I saw that osgUtil::IntersectionVisitor contains a 
function setLODSelectionMode().  I tried setting this to 
USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION but it had no effect.  I did a bit more 
investigating and saw that this enum is referenced in 
IntersectionVisitor::getDistanceToEyePoint().  However, LOD::traverse() calls 
NodeVisitor::getDistanceToViewPoint(), which is not implemented in 
IntersectionVisitor.

I was able to derive from IntersectionVisitor and implement 
getDistanceToViewPoint() similarly to getDistanceToEyePoint():


Code:
if (_lodSelectionMode==USE_EYE_POINT_FOR_LOD_LEVEL_SELECTION)
{
return (pos-getViewPoint()).length();
}
else
{
return 0.0f;
}



then used the subclass in my picking code, after which I got the desired effect.

Is this something that should be added to osgUtil::IntersectionVisitor?

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Problem with GUIEventAdapter mouse wheel event in Qt

2012-08-27 Thread Michael Schanne
Hi Robert,

After debugging a bit more it appears that the issue begins when the event is 
taken off the event queue inside CompositeViewer.  There is the following case 
statement inside CompositeViewer::eventTraversal() (line 755 in version 3.0.0):


Code:
case(osgGA::GUIEventAdapter::PUSH):
case(osgGA::GUIEventAdapter::RELEASE):
case(osgGA::GUIEventAdapter::DOUBLECLICK):
case(osgGA::GUIEventAdapter::DRAG):
case(osgGA::GUIEventAdapter::MOVE):
{
   pointerEvent = true;



Note that SCROLL is not included in these cases.  If I force the scroll event 
through this code path in the debugger then the input range and y orientation 
are correct when the event is passed to my GUIEventHandler.  Is this a bug, or 
is there some reason that scroll events need to be treated differently here?

In any case, I was able to work around this in my application, but maybe this 
will help out the next person.

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-08-26 Thread michael kapelko
I thought it's bound to dtEntity, that's why I was requesting. If it
can be used for any OSG project, then great!
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Maps DTED data

2012-08-24 Thread Michael W. Hall
I downloaded osgEarth and build.  It is working.  Now I need to dig into
it.

Thanks,
Michael

On Tue, 2012-08-21 at 15:31 -0400, Glenn Waldron wrote:
 Michael,
 
 
 osgEarth is a C++ terrain rendering SDK. It is built on top of OSG. It
 renders 3D terrains from elevation, imagery, and vector data sources,
 and it provides a ton of other geospatial tools and functionality as
 well.
 
 
   Main site: http://osgearth.org
   Source code: http://github.com/gwaldron/osgearth
   Forums: http://forum.osgearth.org/
  
 Glenn Waldron / Pelican Mapping / @glennwaldron
 
 
 On Tue, Aug 21, 2012 at 3:13 PM, Michael Hall hal...@att.net wrote:
 Yes, I have heard of it and have actually downloaded it.  I
 don't think I have installed it on my new Laptop I am using.
 I am not sure exactly its purpose.  I know it says something
 about terrains.  Is it library like OSG?  I will have to look
 at it this evening.  Any more info would be great.
  
 Thanks,
 Michael
 
 
 
 __
 From: Chris Hanson xe...@alphapixel.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Sat, August 18, 2012 7:25:56 PM
 Subject: Re: [osg-users] Maps  DTED data
 
 On Fri, Aug 17, 2012 at 3:59 PM, Michael Hall hal...@att.net
 wrote:
 I have a little alpplication I am doing to learn OSG.
 I have also read the OSG 3.0 for Beginners book.  It
 has been helpful in learning more about how OSG works.
 I have generated an earth.ive database from the BMNG
 east and west tifs.  I can display this database in my
 application.  I would like to now associate DTED data
 on that and then overlay maps.  What is the best way
 to do this? Would also like to display the lat/long of
 where the mouse is in the status bar of my
 application.  Any tips or suggestions are appreciated.
 
 
 
   You're getting into the realm (multiple data layers) where
 osgEarth significantly makes your life easier. Have you
 considered using it?
  
 
 
 -- 
 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
 
 
 
 ___
 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] Maps DTED data

2012-08-24 Thread Michael W. Hall
My application uses Qt.  Currently I have it just reading a .ive file
when it starts.  This .ive was generated from the BMNG.  I would like to
keep using this for the app, and apply my maps to it.

I would like to have a menu option to allow users to import maps into
the application.  Importing the maps would be handled by a Map Data
Manager.  This would also allow the user to see the coverage they have
imported by selecting that type and the Map Data Manager would highlight
the maptiles in a specified color.

That is my main goal for now.  I am doing this as a way to learn maps
and OSG and 3D programming.  I have always been interested in maps and
want to do this to create a program that maybe useful to people.

I have downloaded some SRTM data that is in DTED format.  I would like
to get this on my .ive earth on the fly.  If some people can point me in
the right direction on how I can utilize osgEarth to help that would be
great.  I am looking at the osgEarth Documentation as I type.  Looks
like more research.

Thanks,
Michael



On Tue, 2012-08-21 at u15:31 -0400, Glenn Waldron wrote:
 Michael,
 
 
 osgEarth is a C++ terrain rendering SDK. It is built on top of OSG. It
 renders 3D terrains from elevation, imagery, and vector data sources,
 and it provides a ton of other geospatial tools and functionality as
 well.
 
 
   Main site: http://osgearth.org
   Source code: http://github.com/gwaldron/osgearth
   Forums: http://forum.osgearth.org/
  
 Glenn Waldron / Pelican Mapping / @glennwaldron
 
 
 On Tue, Aug 21, 2012 at 3:13 PM, Michael Hall hal...@att.net wrote:
 Yes, I have heard of it and have actually downloaded it.  I
 don't think I have installed it on my new Laptop I am using.
 I am not sure exactly its purpose.  I know it says something
 about terrains.  Is it library like OSG?  I will have to look
 at it this evening.  Any more info would be great.
  
 Thanks,
 Michael
 
 
 
 __
 From: Chris Hanson xe...@alphapixel.com
 To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
 Sent: Sat, August 18, 2012 7:25:56 PM
 Subject: Re: [osg-users] Maps  DTED data
 
 On Fri, Aug 17, 2012 at 3:59 PM, Michael Hall hal...@att.net
 wrote:
 I have a little alpplication I am doing to learn OSG.
 I have also read the OSG 3.0 for Beginners book.  It
 has been helpful in learning more about how OSG works.
 I have generated an earth.ive database from the BMNG
 east and west tifs.  I can display this database in my
 application.  I would like to now associate DTED data
 on that and then overlay maps.  What is the best way
 to do this? Would also like to display the lat/long of
 where the mouse is in the status bar of my
 application.  Any tips or suggestions are appreciated.
 
 
 
   You're getting into the realm (multiple data layers) where
 osgEarth significantly makes your life easier. Have you
 considered using it?
  
 
 
 -- 
 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
 
 
 
 ___
 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] Maps DTED data

2012-08-24 Thread Michael W. Hall
The DTED data I have has the .dt2 extension.  Can osgEarth load that or
do you have to modify it somehow?

On Fri, 2012-08-24 at 19:32 -0600, Chris Hanson wrote:
 On Fri, Aug 24, 2012 at 6:56 PM, Michael W. Hall hal...@att.net
 wrote:
 My application uses Qt.  Currently I have it just reading
 a .ive file
 when it starts.  This .ive was generated from the BMNG.  I
 would like to
 keep using this for the app, and apply my maps to it.
 
 
   If you still have the BMNG data around, osgEarth can consume it
 directly, and not need your .IVE. 
 
 
   Alternately, you can feed it a VPB IVE as well. I don't know how
 well it can merge terrain from a VPB IVE with additional SRTM data.
 
 
 I would like to have a menu option to allow users to import
 maps into
 the application.  Importing the maps would be handled by a
 Map Data
 Manager.  This would also allow the user to see the coverage
 they have
 imported by selecting that type and the Map Data Manager would
 highlight
 the maptiles in a specified color.
 
 
   That's all UI that's up to you.
  
 I have downloaded some SRTM data that is in DTED format.  I
 would like
 to get this on my .ive earth on the fly.  If some people can
 point me in
 the right direction on how I can utilize osgEarth to help that
 would be
 great.  I am looking at the osgEarth Documentation as I type.
  Looks
 like more research.
 
 
 http://osgearth.org/wiki/DevelopersGuide
 
 
 // Add an elevationlayer (SRTM from a local GeoTiff file)
 {
 GDALOptions gdal;
 gdal.url() = c:/data/srtm.tif;
 ElevationLayer* layer = new ElevationLayer( SRTM, gdal );
 map-addElevationLayer( layer );
 }
 
 
 One of the sample .earth files provided with osgEarth might illustrate
 this as well.
 
 
 -- 
 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


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Full screen with resolution change problem, resources lost

2012-08-23 Thread michael kapelko
Thanks for the reply, Robert. What Sergey said was enough in my
situation. Thanks for this, Sergey.
I was simply quiet not to generate unnecessary thank you post :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything, the second wave

2012-08-23 Thread michael kapelko
Good work!
I'm not sure if I voted for libRocket, so here it is.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Maps DTED data

2012-08-21 Thread Michael Hall
Yes, I have heard of it and have actually downloaded it.  I don't think I have 
installed it on my new Laptop I am using.  I am not sure exactly its purpose.  
I 
know it says something about terrains.  Is it library like OSG?  I will have to 
look at it this evening.  Any more info would be great.

Thanks,
Michael





From: Chris Hanson xe...@alphapixel.com
To: OpenSceneGraph Users osg-users@lists.openscenegraph.org
Sent: Sat, August 18, 2012 7:25:56 PM
Subject: Re: [osg-users] Maps  DTED data


On Fri, Aug 17, 2012 at 3:59 PM, Michael Hall hal...@att.net wrote:

I have a little alpplication I am doing to learn OSG.  I have also read the OSG 
3.0 for Beginners book.  It has been helpful in learning more about how OSG 
works.
I have generated an earth.ive database from the BMNG east and west tifs.  I 
can 
display this database in my application.  I would like to now associate DTED 
data on that and then overlay maps.  What is the best way to do this? Would 
also 
like to display the lat/long of where the mouse is in the status bar of my 
application.  Any tips or suggestions are appreciated.



  You're getting into the realm (multiple data layers) where osgEarth 
significantly makes your life easier. Have you considered using it?

-- 

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


[osg-users] Problem with GUIEventAdapter mouse wheel event in Qt

2012-08-19 Thread Michael Schanne
Hi,

I'm seeing something strange with mouse wheel (SCROLL) events in 
GUIEventAdapter.  My app is a Qt app set up following the osgviewerQt example.  
I am trying to implement zooming with the mouse where the zoom follows the 
mouse cursor.  In some cases I want to zoom with mouse clicks, and in other 
cases I want to use the mouse wheel.  Zooming was not working correctly when I 
used the mouse wheel.  I noticed that for SCROLL events, the x and y min/max 
were always -1 / +1, which caused GUIEventAdapter::getX/Ynormalized() to return 
the wrong values.  So, I figured I would just use getX/Y() instead and use 
inverse viewport matrix to get the normalized device coordinates.  But, then I 
noticed I was still getting inconsistent values for the Y coordinate.  For a 
RELEASE event, the GUIEventAdapter has Y_INCREASING_DOWNWARDS for the y 
orientation, and getY() returns 0 in the top left corner of the window.  For a 
SCROLL event, it has Y_INCREASING_UPWARDS and getY() returns 0 in the bottom
  left corner.  Why are the two event types inconsistent?  Is there some 
attribute I am forgetting to set somewhere?   

I am using OSG 3.0.0 and Qt 4.7.

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Maps DTED data

2012-08-17 Thread Michael Hall
I have a little alpplication I am doing to learn OSG.  I have also read the OSG 
3.0 for Beginners book.  It has been helpful in learning more about how OSG 
works.

I have generated an earth.ive database from the BMNG east and west tifs.  I can 
display this database in my application.  I would like to now associate DTED 
data on that and then overlay maps.  What is the best way to do this? Would 
also 
like to display the lat/long of where the mouse is in the status bar of my 
application.  Any tips or suggestions are appreciated.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Problem using AutoTransform with LOD node

2012-08-15 Thread Michael Schanne
Hi,

I am trying to create a scene for a CAD-type app where I have objects that 
should be a constant screen size as I zoom in and out, but when I cross a 
certain zoom threshold it should change to a different size (for example half 
its original size).  I tried to implement this using a combination of 
AutoTransform and LOD nodes.  Here is a sample graph of two objects:

AutoTransform AutoTransform
 \   /
   LOD
  / \
MatrixTransform  MatrixTransform
 \   /  
 Geode

The problem I have is that when I have the AutoTransforms set to 
autoScaleToScreen=true, then the level of detail does not change when it 
should.  It always stays at whatever level it started at regardless of how much 
I move the camera in or out.  If I set autoScaleToScreen to false, then the LOD 
behaves as I expect (meaning it changes when I move the camera from one range 
to another).

What might be causing this to happen?  Is there another way to get the effect I 
want?
... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Siggraph 2012 OpenSceneGraph BOF articles

2012-08-14 Thread michael kapelko
Dad of the three. Yay. Keep it up! :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [forum] Site web down

2012-08-09 Thread michael kapelko
May be it's finally time to put an end to its misery?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ESC key: Error: pthread_cond_destroy(, ) returned error status, status = 16

2012-08-04 Thread michael kapelko
Thanks. ViewerBase::setKeyEventSetsDone(0) did help so that Viewer
doesn't listen to ESC, but now when I call ViewerBase::setDone(true)
myself, Viewer still fails to exit and prints:
Error: pthread_cond_destroy(,) returned error status, status = 16
after that, only Ctrl+C helps, because app hangs.

What is this and how do I fight it?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-09 Thread Michael Schanne
It turns out that using point sprites is not an option for me as I now have a 
requirement that the objects must rotate with the world.  I could use 
AutoTransform with setAutoScaleToScreen(true) and 
setAutoRotateMode(NO_ROTATION), but it's still not quite fast enough for my 
application.  I am holding at around 19 fps, but I'd like to get it to at least 
25 fps.  

My scene graph contains several thousand MatrixTransforms arranged like this:

  Root
|  ...
   MT ( x 2000)
 / \
  MT  MT
  /  \ / \
MT MT MT MT
   \ |  |  /
AutoTransform
|
Geode

At my default zoom level, only about 32 objects are visible at a time.

Is there anything else I try to improve performance while maintaining the 
constant screen size and rotate-with-world properties?

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Can we please remove static initializations in OSG?

2012-07-05 Thread michael kapelko
Hi.

I'm trying to build OSG into my application. I've started with OSG logging.
I've attached sample code that depicts the problem.
After you run the program and than stop it by pressing ESC, you can
see the following output:

$ ./test
abc
DatabasePager::RequestQueue::~RequestQueue() Destructing queue.
DatabasePager::RequestQueue::~RequestQueue() Destructing queue.
DatabasePager::RequestQueue::~RequestQueue() Destructing queue.
DatabasePager::RequestQueue::~RequestQueue() Destructing queue.
~RegisterWindowingSystemInterfaceProxy()
GraphicsContext::setWindowingSystemInterface() 00x7ffd0fd71470

abc is printed after all delete operators take place. Somehow Viewer
is deleted after I actually delete it.

~RegisterWindowingSystemInterfaceProxy() comes from the destruction of
this static variable:
http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowX11.cpp?rev=12923#L2137

GraphicsContext::setWindowingSystemInterface() 00x7ffd0fd71470 comes
from the destructor of the above variable:
http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowX11.cpp?rev=12923#L2132

This means OSG uses static variables which initialization and
deinitialization times are unknown, which results in:
1) I can't really control my OSG logger lifetime;
2) I miss RegisterWindowingSystemInterfaceProxy() initialization in
logger (and possibly many others).
The only option is to create Logger specifically for OSG and let it
die at an unknown time (after all my cleanup procedures), possibly
causing me problems later.

Can we please make it non-static?


osg_static.tar
Description: Unix tar archive
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-05 Thread Michael Schanne
Alpha to coverage didn't have any visible effect, but using alpha testing 
instead seems to work:


Code:

osg::AlphaFunc *af = new osg::AlphaFunc();
af-setFunction(osg::AlphaFunc::GEQUAL, 0.75f);
ss-setAttributeAndModes(af, osg::StateAttribute::ON);




Cheers,
Michael[/code]

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-04 Thread Michael Schanne
Thanks!

My other mistake was using DECAL instead of REPLACE in my TexEnv.  I didn't 
realize DECAL was keeping the point's original alpha, which made the entire 
point sprite transparent, not just the X.

I still don't quite have the visual effect I want yet.  When the X's are close 
enough to overlap, the topmost ones appear to be cutting a gap or casting a 
shadow on the X's beneath, even though alpha is 0 for every black texel (see 
attachment ps.jpg).  I'd like to just have the white overlap (as in attachment 
at.jpg, from my AutoTransform implementation).  Is there anything I can do to 
fix it?  

... 

Thank you!

Cheers,
Michael

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




Attachments: 
http://forum.openscenegraph.org//files/at_303.jpg
http://forum.openscenegraph.org//files/ps_140.jpg


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-07-03 Thread Michael Schanne
My initial implementation with AutoTransform is not fast enough for my 
application.  I have thousands of MatrixTransforms sharing a single 
AutoTransform with a child Geode, containing a geometry with two lines.  I was 
getting around 17 fps.  Removing the AutoTransforms improved the framerate to 
20-25 fps (20 is sufficient for my application).  

Since I still need the constant size, I am attempting to use an alternate 
implementation with PointSprites to see if that performs any better.  I used 
the osgpointsprite example as a guide.  However, I'm having trouble getting 
transparency to work.  I want a white 'X' to overlay the rest of the scene at 
each point.  What I am getting is a black opaque box at each point, with the 
white X inside the box.  I've set the alpha to 0 in the point color array, and 
in the texture outside the X.  Can someone help me figure out what I'm doing 
wrong?

Here's the code:


Code:
osg::ref_ptrosg::Geode geode = new osg::Geode;
osg::ref_ptrosg::Geometry geom = new osg::Geometry;

osg::ref_ptrosg::Vec3Array vertices = new osg::Vec3Array;
vertices-push_back(osg::Vec3(0.0, 0.0, 10.0));

osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array;
colors-push_back(osg::Vec4(0.0, 0.0, 0.0, 0.0));

geom-setVertexArray(vertices);
geom-addPrimitiveSet(new osg::DrawArrays(osg::PrimitiveSet::POINTS, 0, 1));
geom-setColorArray(colors);
geom-setColorBinding(osg::Geometry::BIND_PER_VERTEX);

geode-addDrawable(geom);

// Give it an initial bound so it doesn't get culled (osg can't calculate a 
bounding volume for a single point)
geode-setInitialBound( osg::BoundingSphere( osg::Vec3(0.0, 0.0, 0.0), 100.0 ) 
);

const int pixelsX = 50;
const int pixelsY = 50;
const int bytesPerPixel = 4;
unsigned char *buf = new unsigned char[pixelsX * pixelsY * bytesPerPixel];
memset(buf, 0x00, pixelsX*pixelsY*bytesPerPixel);

for (int i = 0; i  pixelsX; i++)
{
   for (int j = 0; j  pixelsY; j++)
  {
if (i == j || pixelsX - i - 1 == j) 
{   
  for (int k = 0; k  bytesPerPixel; k++)
  {
buf[i * pixelsY * bytesPerPixel + j * bytesPerPixel + k] = 0xFF;

  }
}   
  }
}

osg::ref_ptrosg::Image img = new osg::Image;
img-setImage(pixelsX,
  pixelsY,
  1,
  GL_RGBA8,// internal format
  GL_RGBA, // pixel format
  GL_UNSIGNED_INT_8_8_8_8_REV, // pixel data type
  buf, // data buffer
  osg::Image::USE_NEW_DELETE); // allocation mode

osg::ref_ptrosg::Texture2D tex = new osg::Texture2D;
tex-setImage(img);
tex-setBorderColor(osg::Vec4(0.0, 0.0, 0.0, 0.0));

osg::ref_ptrosg::PointSprite sprite = new osg::PointSprite;

osg::ref_ptrosg::Point point = new osg::Point;
point-setSize(100.0);

osg::ref_ptrosg::StateSet ss = geode-getOrCreateStateSet();
ss-setTextureAttributeAndModes(0, sprite, osg::StateAttribute::ON);
ss-setTextureAttributeAndModes(0, tex, osg::StateAttribute::ON);
ss-setAttribute(point);
ss-setMode(GL_LIGHTING, osg::StateAttribute::OFF);

osg::ref_ptrosg::TexEnv texenv = new osg::TexEnv;
texenv-setMode(osg::TexEnv::DECAL);
ss-setTextureAttribute(0, texenv);



Thanks,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] VPB

2012-07-02 Thread Michael Hall
Where do you get Virtual Planet Builder from now?  I do not see the SVN link 
anywhere.   I apologize if has been asked I probably missed it.  Please post 
again.

Thanks,
Michael




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Does OSG have INI config file reader?

2012-06-30 Thread michael kapelko
Well, I don't want to use POCO just for reading INI. I wonder if OSG
has one. If not, I'll have to write one myself, it's not that hard,
but would be good if OSG has one already.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Does OSG have INI config file reader?

2012-06-30 Thread michael kapelko
Well, my intention is not bring any additional dependency apart from
OSG alone. Speaking of better formats, does OSG has any config file
reader? Or it's intentionally left for application to implement?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Node visitor pattern

2012-06-22 Thread michael kapelko
Am I understanding correctly that Object::STATIC is a flag that says
something won't be traversed/updated each frame (based on some
internal decision), and Object::DYNAMIC says: traverse/update it each
frame?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Node visitor pattern

2012-06-21 Thread michael kapelko
Hi.
I'm going to use OSG as one of my game engine components. Currently I
have Timer singleton. Classes that wish to be notified regularly
should inherit from TimerListener and add themselves to the queue like
Timer-addListener(this, 30); where 30 is 30 milliseconds, i.e., they
will be notified approximately each 30 milliseconds. In listeners I do
'animations' (moving, scaling, etc).
In OSG, however, each node gets traversed, even several times.
Currently I'm unsure how to implement my new Timer with OSG. The
single deciding Timer class seems to require less power, since it
doesn't call each listener each frame, instead, it knows when to call
each listener and only does it when necessary.
May be I'm misunderstanding current visitor pattern? May be it's
really necessary to traverse each listener each frame and let each
listener decide?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything :-)

2012-06-18 Thread michael kapelko
Great news!
Although, I would really like to see OSG + libRocket integration since
GUI is lacking in OSG :)
I recall there was a guy who wrote dtEntity thing which has OSG +
libRocket integration, but I'm unsure how well it supports it.
I'll be doing OSG + libRocket research myself in the coming months, so
it's only good to omit such task by having it already supported.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [ANN] osgRecipes: Integrate OSG with almost everything :-)

2012-06-18 Thread michael kapelko
Yeah, I definitely will, later.
As for MyGUI, I've used CEGUI instead due to lack of support/docs and
Russian comments (even being Russian myself).
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG error handling

2012-06-12 Thread michael kapelko
Hi.
I see that OSG does not use exceptions, instead it only notifies of
errors. Does it mean, that OSG encourages return-code error handling?
Currently I use exceptions (which are only thrown if application
cannot continue normal operation: invalid resource, invalid input
parameter, etc) and would like to continue to use them, but since
large part of my program (OSG) won't be using exceptions any more
(I've used OGRE before), I wonder if using exceptions is suitable at
all now.
What error handling approach do you recommend for OSG based applications?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG error handling

2012-06-12 Thread michael kapelko
I've come up with 3 types of errors:
1) constructor failure;
2) missing resource file;
3) invalid function parameter.

How does OSG handle all these cases exactly? You mentioned a feedback
on errors in file loading case, is it about 2)? Can you please
summarize techniques for each of the errors?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How to draw a tube connecting two geometries

2012-06-11 Thread Michael Schanne
Hi,

I am creating a scene in which there will be two geometries connected by a 
tube.  The geometries can move around in between frames, so the tube must also 
move and resize.  The way I am trying to do this is to have a geometry for a 
tube of unit length and diameter.  Then, if the position of either endpoint 
changes, I recalculate the midpoint and use a translation matrix to move the 
tube there, and give it the correct scaling and rotation to connect the two 
endpoint geometries.

The graph would look something like this:

 Root
  /| \  
 Matrix  MatrixMatrix
   \/\
   Geode  Geode (Tube Geometry)
  (Endpoint Geometry)

Is this the most efficient way to do this?  Is there some way I could tie in to 
the two MatrixTransforms for the endpoints to automatically update the tube's 
location?

... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] problem with seams while drawing quads and quad strips

2012-06-08 Thread Michael Schanne
You're right, the normals were the problem.  My mistake was using the 
QUAD_STRIPS and setting the normals for the shared vertices to the combined 
normals of the adjacent faces.  I changed everything to QUADS and used the 
face's normal as each vertex's normal, and then it looked correct.

Thanks!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-07 Thread michael kapelko
The same here. Though, I must have marked it as spam since I don't get
those recently.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] 139.com Spam

2012-06-07 Thread michael kapelko
May be someone who can talk in Chinese can tell 139.com to shutdown
this spam thing?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Open Asset Import Library

2012-06-06 Thread michael kapelko
I'll just add my 2 (negative) cents on FreeImage: it does not
dynamically links to libpng, libtga and other libs it uses. This goes
against Gentoo policy and as such will prevent apps to go into Gentoo
based distros.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem with seams while drawing quads and quad strips

2012-06-05 Thread Michael Schanne
 ));
myGeom-addPrimitiveSet(new osg::DrawArrays( osg::PrimitiveSet::QUADS, 
10, 40 ));
myGeom-addPrimitiveSet(new osg::DrawArrays( 
osg::PrimitiveSet::QUAD_STRIP, 50, 18 ));

// NORMALS
osg::ref_ptrosg::Vec3Array normals = new osg::Vec3Array;
// sides
normals-push_back(osg::Vec3( -1.0, -1.0, -1.0));
normals-push_back(osg::Vec3( -1.0, -1.0,  1.0));
normals-push_back(osg::Vec3(  1.0, -1.0, -1.0));
normals-push_back(osg::Vec3(  1.0, -1.0,  1.0));
normals-push_back(osg::Vec3(  1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  1.0,  1.0,  1.0));
normals-push_back(osg::Vec3( -1.0,  1.0, -1.0));
normals-push_back(osg::Vec3( -1.0,  1.0,  1.0));
normals-push_back(osg::Vec3( -1.0, -1.0, -1.0));
normals-push_back(osg::Vec3( -1.0, -1.0,  1.0));

// top face
normals-push_back(osg::Vec3( -1.0, -1.0, 1.0));
normals-push_back(osg::Vec3( -1.0,  1.0, 1.0));
normals-push_back(osg::Vec3(  0.0,  1.0, 2.0));
normals-push_back(osg::Vec3(  0.0, -1.0, 2.0));

normals-push_back(osg::Vec3(  1.0, -1.0, 1.0));
normals-push_back(osg::Vec3(  0.0,  1.0, 2.0));
normals-push_back(osg::Vec3(  0.0,  1.0, 2.0));
normals-push_back(osg::Vec3( -1.0, -1.0, 1.0));

normals-push_back(osg::Vec3(  0.0,  1.0, 2.0));
normals-push_back(osg::Vec3(  1.0,  1.0, 1.0));
normals-push_back(osg::Vec3(  1.0, -1.0, 1.0));
normals-push_back(osg::Vec3(  0.0, -1.0, 2.0));

normals-push_back(osg::Vec3(  0.0, -1.0, 2.0));
normals-push_back(osg::Vec3(  1.0,  1.0, 1.0));
normals-push_back(osg::Vec3( -1.0,  1.0, 1.0));
normals-push_back(osg::Vec3(  0.0, -1.0, 2.0));

normals-push_back(osg::Vec3( -1.0,  1.0, 2.0));
normals-push_back(osg::Vec3( -1.0,  1.0, 1.0));
normals-push_back(osg::Vec3(  1.0,  1.0, 1.0));
normals-push_back(osg::Vec3(  1.0,  1.0, 2.0));

// bottom face
normals-push_back(osg::Vec3( -1.0, -1.0, -1.0));
normals-push_back(osg::Vec3( -1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  0.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  0.0, -1.0, -2.0));

normals-push_back(osg::Vec3(  1.0, -1.0, -1.0));
normals-push_back(osg::Vec3(  0.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  0.0,  1.0, -2.0));
normals-push_back(osg::Vec3( -1.0, -1.0, -1.0));

normals-push_back(osg::Vec3(  0.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  1.0, -1.0, -1.0));
normals-push_back(osg::Vec3(  0.0, -1.0, -2.0));

normals-push_back(osg::Vec3(  0.0, -1.0, -2.0));
normals-push_back(osg::Vec3(  1.0,  1.0, -1.0));
normals-push_back(osg::Vec3( -1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  0.0, -1.0, -2.0));

normals-push_back(osg::Vec3( -1.0,  1.0, -2.0));
normals-push_back(osg::Vec3( -1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  1.0,  1.0, -2.0));

// inner faces
normals-push_back(osg::Vec3(  1.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  1.0,  1.0,  2.0));

normals-push_back(osg::Vec3(  1.0, -1.0, -2.0));
normals-push_back(osg::Vec3(  1.0, -1.0,  2.0));

normals-push_back(osg::Vec3( -1.0, -1.0, -2.0));
normals-push_back(osg::Vec3( -1.0, -1.0,  2.0));

normals-push_back(osg::Vec3( -1.0,  1.0, -2.0));
normals-push_back(osg::Vec3( -1.0,  1.0,  2.0));

normals-push_back(osg::Vec3(  1.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  1.0,  1.0,  2.0));

normals-push_back(osg::Vec3(  1.0,  1.0, -1.0));
normals-push_back(osg::Vec3(  1.0,  1.0,  1.0));

normals-push_back(osg::Vec3( -1.0,  1.0, -1.0));
normals-push_back(osg::Vec3( -1.0,  1.0,  1.0));

normals-push_back(osg::Vec3( -1.0,  1.0, -2.0));
normals-push_back(osg::Vec3( -1.0,  1.0,  2.0));  

normals-push_back(osg::Vec3(  1.0,  1.0, -2.0));
normals-push_back(osg::Vec3(  1.0,  1.0,  2.0));  

for (unsigned int i = 0; i  normals-getNumElements(); i++)
{
(*normals)[i].normalize();
}

myGeom-setNormalArray(normals);
myGeom-setNormalBinding(osg::Geometry::BIND_PER_VERTEX);

osg::ref_ptrosg::Vec4Array colors = new osg::Vec4Array;
colors-push_back( osg::Vec4(1.0, 1.0, 1.0, 1.0));

myGeom-setColorArray(colors);
myGeom-setColorBinding(osg::Geometry::BIND_OVERALL);

return myGeode;
}



I also included the .osg file for reference.

... 

Thank you!

Cheers,
Michael

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




Attachments: 
http://forum.openscenegraph.org//files/model_491.osg
http

Re: [osg-users] [ANN] Proland: a new open source planet rendering engine

2012-05-29 Thread michael kapelko
I'm wondering how is that related to OSG in the first place :)

*prepares to advertise his backyard t-shirt sales in OSG mailing list*
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgWidget questions

2012-05-27 Thread michael kapelko
Hi.

I'm researching if osgWidget can be used to make GUI like I have atm:
http://www.youtube.com/watch?v=hwYpyY7zhTI#t=1m27s
Therefore I have several questions:
1) I've seen osgwidgetscrolled example with image scrolling, is it
easy to make the same for text?
2) is it easy to make text word wrap?
3) is it easy to create some sort of style/theme that can have a set
of images to be rendered to represent buttons, checkboxes, listboxes,
tables, etc?
4) I've noticed presence of osgWidget::PythonEngine, but googling
didn't give me any results; can PythonEngine be used to write
osgWidget GUI in Python?

Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-05-23 Thread michael kapelko
Hi, Thomas.
I was thinking about iOS recently and decided to ask you, if you coded
those apps in C++ or Obj-C? I heard you need to write Obj-C on iOS?

2012/4/24 Thomas Hogarth thomas.hoga...@gmail.com:
 Hi Micheal

 I've completed a few games with OSG

 http://itunes.apple.com/gb/app/apptoyz-alien-attack/id412615924?mt=8

 http://itunes.apple.com/us/app/apptoyz-tin-can-alley/id457520117?mt=8

 I find no problem using osg for games, if you just treat osg as a wrapper 
 around OpenGL and not a game engine.

 There's also the osgbullet lib to handle physics and collisions.

 The main difference you'll find is that rather then calling a specific draw 
 fuction to render your model you need to make sure it can be attached to the 
 scene graph in some way,

 I tend to have a level class with a osg::MatrixTransform, then all level 
 entities are attached to that etc.

 Hope that helps
 Tom

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





 ___
 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] Lines not showing when zoomed in orthographic projection

2012-05-15 Thread Michael Schanne
Hi,

We have a scene with one osg-loaded object.  When we load our scene, our camera 
projection (ortho) is zoomed such that the object is not visible in the graphic 
window.  Our code then dynamically adds 2 new lines to the scene at a location 
corresponding to the center of the screen, but these lines are not visible.  
Only when we zoom out (by changing the camera ortho projection) to a level 
where the pre-loaded object appears, then the 2 lines appear on the screen.

We also noticed a second scenario similar to this, in which we will first pan 
our camera far to the left, then zoom out, but the pre-loaded osg object does 
not show.  It will only appear when we pan back near to the object location, 
and zoom in again.

We are using AutoTransforms for our drawn objects to have them be a constant 
size and rotation as we pan and zoom the camera.

We are not sure if this is a culling issue or something else.  What could be 
causing this behavior?

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] ANN: osgEarth 2.2 released

2012-05-01 Thread Michael Weiblen
w00t!

So I really want osgEarth on my Android Galaxy Tab.  How can I help
make that happen?

BTW, I'm now at Qualcomm, doing low-level GPU stuff on Android ;-)
Contact info attached

-- mew


On Tue, May 1, 2012 at 11:19 AM, Glenn Waldron gwald...@gmail.com wrote:
 osgEarth 2.2 is tagged.
 Thanks to everyone in the community who helped us test.

 osgEarth 2.2 contains a LOT of enhancements and new features, including two
 new libraries, osgEarthAnnotation and osgEarthQt.

 Read more details in the release notes:

 http://www.osgearth.org/wiki/ReleaseNotes22

 The tag name is osgearth-2.2 and you can download tarballs here:

 ZIP: http://github.com/gwaldron/osgearth/zipball/osgearth-2.2
 TAR.GZ: http://github.com/gwaldron/osgearth/tarball/osgearth-2.2

 Enjoy!

 Glenn Waldron / @glennwaldron


 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




-- 
Mike Weiblen -- Black Hawk, Colorado USA -- http://mew.cx/
attachment: mweiblen.vcf
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] About and gallery menu items in the new website

2012-04-30 Thread michael kapelko
Hi, Jordi.

When I've been talking with my fellow team member recently about OGRE
to OSG switch he asked me several questions:
1. Raw power.
2. Result beauty.
Result beauty (quality of the rendered image) is a group of the
following questions:
1. DoF.
2. Shadows.
3. Tesselation.
4. Postprocessing (he said he didn't see any screenshot with that).
5. Material configuration.

So if you want to attract people to OSG, you should give them raw tech
renderings which prove that this uber cool XYZ technique is easily
achieved with OSG. That's more of 'feature' sorting, not application
domain sorting.

So I would add some Gallery section named OSG features, OSG
facilities, Unleash your GPU, What OSG can do or smth like that
which could contain possibly screenshots from other sections, but with
descriptions that tell what's so cool about that specific picture
(HDR, DOF, or other modern technique).
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] shadow questions

2012-04-30 Thread Michael A. Eriksen
I'm trying to add shadows to my scene, but I have some issues! 

I have a fairly big textured terrain and 1 light. I have tried the various 
shadow methods and I get different results for each method.

With this

  osg::ref_ptrosgShadow::ShadowedScene pShadowedScene = new 
osgShadow::ShadowedScene;
  pShadowedScene-addChild(pTerrain);

  osg::ref_ptrosgShadow::StandardShadowMap st = new 
osgShadow::StandardShadowMap;
  pShadowedScene-setShadowTechnique(st.get());

My texture disappears on my terrain but I do have shadows. I also tried 
ShadowTexture but that only renders the terrain with a light and no shadows.

With this 
  osg::ref_ptrosgShadow::ShadowedScene pShadowedScene = new 
osgShadow::ShadowedScene;
  pShadowedScene-addChild(pTerrain);

  osg::ref_ptrosgShadow::ViewDependentShadowMap vdsm = new 
osgShadow::ViewDependentShadowMap;
  pShadowedScene-setShadowTechnique(vdsm.get());

I have shadows and my terrain is textured, woohoo :-) 

Why does my texture disappear with the StandardShadowMap and nothing works with 
ShadowTexture?

My next issue is that I have some custom shaders in glsl 4.1 that I need to use 
to render some special effects on my terrain. When I enable those the shadows 
disappears!

I use these to enable GL4 

gc-getState()-setUseModelViewAndProjectionUniforms(true);
gc-getState()-setUseVertexAttributeAliasing(true);

So my last question is how do I mix shadows generated in the osg::Shadow 
classes with my custom shaders for various effects? 

Oh also when I enable the GL4 shaders all text disappears and other strange 
rendering issues appears like the stats renders as gray boxes!

Cheers,

Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-04-27 Thread michael kapelko
Hi, G-S.

 Gallery is more a place where the community can show what they've done
That's exactly my point. And that's exactly the thought one thinks
when he is wondering if OSG is suitable for him - he looks into what
others done. So having it easily accessible for a person who doesn't
know the layout of OSG website is good for getting him excited right
from the start.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-04-26 Thread michael kapelko
As for community news, they can be posted once a month since those are
community news, only special news like OSG releases, books,
significant projects should have complete newsletter dedicated to
them. Reading 'requests to add news' I felt you may have understood
that I want immediate news posting, but no, only once in a while so
that main page doesn't become a clutter.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-04-26 Thread michael kapelko
I'm not sure About is suitable for Showcase. Gallery is more about
Showcase. About is more about OSG, not some related projects. And
Gallery is... a gallery of what have been done with OSG.

I would even put replace Gallery with Showcase and put Gallery as
subitem of Showcase.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building new website, assistance appreciated!

2012-04-25 Thread michael kapelko
I think the main page should list news vertically and contain both
community news (like this:
http://www.ogre3d.org/2011/10/03/ogre-news-13 ) and OSG itself news
(like this: http://www.ogre3d.org/2011/11/13/ogre-1-8-release-candidate-1-rc1
). OSG news are posted like it is now, but community ones are posted
on a request basis where a man who wants his project be featured on
the main page sends request to, say, n...@osg.com so there's no need
for admins to track community progress - community will take care of
itself. Such main page allows to see how OSG is developing and for
people to get noticed.
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Why no games with OSG?

2012-04-24 Thread michael kapelko
Hi.
I'm new to OSG. I use OGRE for my game currently, but due to various
issues I would like to switch to OSG.
I coudn't find any info on games made with OSG, no pictures in OSG
Forum - Album - Games, no Google results, only some simulations and
other non-game stuff. The only game I found is FlightGear.
I wonder why are there no games on OSG? Or am I missing something?
Thanks.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-24 Thread michael kapelko
Yes, that's what I meant by simulations and other non-game stuff.
I mean games like Half-Life, Morrowind, Garsharp, Proun, for end users
to relax, not for any kind of training.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-24 Thread michael kapelko
Shayne, yeah, I've found Delta3D, but I saw the same simulations in there.
As for OGRE, it's only rendering engine, it's so only for rendering,
that it uses external library for input which actually gives me most
headaches.
Terry, that's some very nice looking game! Good luck with that! Our
team is currently working on Mahjong:
http://opengamestudio.org/lang/en/ogs-mahjong , but we're thinking of
a scroll shooter too, once we finish Mahjong :)
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Why no games with OSG?

2012-04-24 Thread michael kapelko
Thomas, great to see games for Apple.

Seeing games that actually exist I wonder why is Games - Album empty
then. Its emptiness gives false impression of abandonment.
OGRE forums has Showcase forum where people advertise their work. I
see Announcments here, but it's 99% of job postings.
Also, the site posts monthly updates on people work progress which
gives good impression of what one can do with OGRE.

Why not do the same for OSG?
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OSG 3.0.1 Build error

2012-04-22 Thread Michael Hall
I am getting the following error compiling OSG 3.0.1.  Looks like ld cannot 
find 
-lITKIO.  I have the Insight ToolKit 4.0.1 installed.  Any ideas?

[ 84%] Building CXX object 
src/osgPlugins/dicom/CMakeFiles/osgdb_dicom.dir/ReaderWriterDICOM.o
/home/hallmw/OpenSceneGraph/src/osgPlugins/dicom/ReaderWriterDICOM.cpp: In 
member function ‘virtual osgDB::ReaderWriter::ReadResult 
ReaderWriterDICOM::readSingleITKImage(const string, const Options*) const’:
/home/hallmw/OpenSceneGraph/src/osgPlugins/dicom/ReaderWriterDICOM.cpp:414:34: 
warning: variable ‘start’ set but not used [-Wunused-but-set-variable]
Linking CXX shared module ../../../lib/osgPlugins-3.0.1/osgdb_dicom.so
/usr/bin/ld: cannot find -lITKIO
collect2: ld returned 1 exit status
make[2]: *** [lib/osgPlugins-3.0.1/osgdb_dicom.so] Error 1
make[1]: *** [src/osgPlugins/dicom/CMakeFiles/osgdb_dicom.dir/all] Error 2
make: *** [all] Error 2___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] problem with handleMouseRelease using custom camera manipulator

2012-04-12 Thread Michael Schanne
Hi,

I’m using OSG with Qt.  I want to change the mouse cursor when I press and 
release a mouse button over my QGLWidget.  I’ve created a custom camera 
manipulator by subclassing TrackballManipulator, and overriding 
handleMousePush() and handleMouseRelease(), in which I call 
QWidget::setCursor().  However, the cursor does not change immediately when I 
click or release the button.  It only changes after the first mouse movement 
after the click or release.  When I debugged my code I saw that 
handleMouseRelease() is not being called until the first movement after I 
release the mouse button.  What do I need to do to be able to take action 
immediately when the button is pressed/released?

I’ve set up the Qt widget similar to the osgViewerQt example.  I am using OSG 
version 3.0.0 and Qt version 4.7.1.


... 

Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] glGetActiveUniformsiv error

2012-04-05 Thread Michael A. Eriksen
Hi Martin,

I have the latest nVidia drivers and two GTX 580 in SLI mode.

Cheers,

Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] glGetActiveUniformsiv error

2012-04-04 Thread Michael A. Eriksen
With the latest update I get an error in 

void Program::PerContextProgram::linkProgram(osg::State state)

There error is in 

  _extensions-glGetActiveUniformsiv( _glProgramHandle, uniformIndex.size(),
(uniformIndex[0]), 
GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX,
(bufferIndex[0]) );

The size of uniformIndex is 0!!

Try and run osgsimplegl3!!

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] constant size overlay

2012-03-27 Thread Michael Schanne
AutoTransform was exactly what I needed; thanks :)

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] constant size overlay

2012-03-26 Thread Michael Schanne
Hi,

I want to use OSG to create an overlay where I have different symbols marking 
certain points in my scene.  I want these symbols to remain a constant size in 
screen coordinates until crossing certain thresholds (for example, they are 
size A when at a distance  X from the camera, then change to size B once 
distance  X).  It’s a little different than a HUD because I want the symbols 
to move as I pan the camera, so that they stay at the same world coordinates.  
I am using an orthographic projection where the camera is directly overhead in 
the Z direction, and it will only pan in the X-Y plane.

I took a look at the OverlayNode class, but the description didn’t sound like 
what I wanted.  The LOD class sounded more like what I need, so I could switch 
between multiple sized children based on the camera distance, but I’m still not 
quite sure how to make each child have a constant size within its camera 
distance range.  Does anyone have any suggestions for me?


Thank you!

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-03-06 Thread Michael Guerrero
For anyone following this: Colt McAnlis just posted his GDC talk about NaCl 
here: http://www.youtube.com/watch?feature=player_embeddedv=R281PhQufHo

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] live video texture performance

2012-03-01 Thread Michael Schanne
Hi,

I am trying to create a scene which contains a texture displaying a live video 
image.  The image is sent as a buffer of raw data from an attached camera.  I 
was able to get something working but the performance is terrible: about 1.42 
frames per second.  I need to get to at least 20 fps.  I am dealing with an 
image that is 640x480 pixels with 32 bits per pixel.  I have stripped down my 
scene to contain only a geode with a quad geometry, and an attached texture, 
and I still see the performance problem.  The texture has an attached 
StateAttributeCallback, in which I fetch the buffer of data for the next video 
frame, and then call setImage:

img-setImage( 640,   // width
480,   // height
1,  // depth
GL_RGB8, // internal texture format
GL_BGRA, // pixel format
GL_UNSIGNED_INT_8_8_8_8_REV, // data type
data,   // raw data pointer
osg::Image::NO_DELETE);

I also experimented with another technique that I found on another post where 
someone is doing something very similar to what I’m trying to do:


 Re:  Update a texture's pixels contents, using apply or glTexSubImage2D
 Robert Osfield
 Fri, 26 Sep 2008 01:33:52 -0700
 Hi Guillaume,
 
 The way to integrate a live video stream is to subclass from
 osg::ImageStream (which is subclass from osg::Image), as is done in
 the OSG's quicktime and xine-lib plugins.  The ImageStream is then
 attached to Texture be it a Texture1D, 2D, 3D or TextureRectangle.
 This approach means that you don't ever subclass from the Texture
 objects as the image data is encapsulated complete by
 osg::Image/ImageStream.
 
 The way I'd tackle your task is to subclass from osg::ImageStream and
 then allocate the image data then copy over this in your background
 thread and then call dirty() on the ImageStream, this will tell the
 Texture::apply() that the image data has changed and it'll then
 automatically subload the data for you.  ImageStream also by default
 provides a PixelBufferObject which means upload performance will be
 the best you can get.
 
 Robert.


To make this technique work, in my video frame producer thread I was calling 
ImageStream::data() to get the pointer to the raw data, then doing a memcpy to 
write the new frame, then calling dirty().  I no longer used a 
StateAttributeCallback in this method.  Unfortunately, I did not see any 
noticeable change in performance using this technique.  Do I need to use 
another function in order to write directly to the pixel buffer object?  Also 
what thread synchronization do I need here?  

My hardware specs are as follows: 

Intel Celeron 550 CPU (2.0 GHz)
1.0 GB RAM
Mobile Intel GME965 Express Chipset with integrated graphics

Upgrading hardware is not an option for me.  Please let me know what I can do 
to maximize performance in this situation.

Thanks,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] live video texture performance

2012-03-01 Thread Michael Schanne
Thanks for the responses.

Using a PixelBufferObject did not appear to make any difference in performance 
for me.  My video hardware only supports OpenGL 1.5, so that is probably the 
reason.  

I suspect the power of two issue is the cause of my performance problem.  When 
I create a 640x480 image I get a console message that it is being scaled to 
512x512.  However, when I try to create a 512x512 image instead, I get an error 
message Detected OpenGL error 'invalid enumerant' at After Renderer::compile. 
 This is before I even attempt to load any video data into the image.  What 
does this error mean?

Here is the code:

int pixelsX = 640;
int pixelsY = 480;
int bytesPerPixel = 4;

rawData = new unsigned char[pixelsX * pixelsY * bytesPerPixel];
memset(rawData, 0xFF, (pixelsX * pixelsY * bytesPerPixel)); 

setImage( 
pixelsX,// width
pixelsY,// height
1,  // depth
GL_RGB8, // internal texture format
GL_BGRA, // pixel format
GL_UNSIGNED_INT_8_8_8_8, // data type
rawData,// raw data
osg::Image::NO_DELETE); // memory allocation mode

Using 640x480 (which gets scaled to 512x512) I get a white quad, as I expect.  
However, if I use 512x512 image, I see distorted green lines with a black 
background on the quad, along with the error.  If I try to load any video data 
at this point, the program crashes.

I also have the option of using a video frame of 8 bits per pixel (for a 
greyscale image) but I have not been able to see the image at all in that case. 
 I tried using the GL_LUMINANCE pixel format and GL_UNSIGNED_BYTE data type, 
along with a few other combinations, but nothing has worked so far.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Never mind; I was able to figure out a solution by studying the 
osgpackeddepthstencil example and some OpenGL stencil buffer tutorials I found 
online.

What I did was add a node to the root where I created a geometry the same size 
as my video projection, and added a Stencil.  I also turned off depth testing 
and set the ColorMask to false.  This became my stencil mask.

Then, I added two more nodes to the root.  Each had a stencil.  One was set to 
draw if the stencil was equal to 1, the other if not equal to 1.  To the first 
node's StateSet I also added the texture I am projecting.  To each of these, I 
added the node which was the root of my model geometry.  This caused the video 
projection to be drawn inside the mask, and the rest of the scene without the 
projection outside the mask.

-Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] projective texture mapping and lighting

2012-02-21 Thread Michael Schanne
Apparently I spoke too soon; the method I described in my last post doesn’t 
work when I rotate the viewer.  If I had an object outside the texture 
projection area and rotated it so it should obscure the image, I could see the 
image through the object.  Likewise, if I had an object inside the projection 
and rotated so that the top appeared to be outside the projection area, I would 
not see the projection on the part of the object outside the projection area.

Another technique I tried was to use clipping planes.  I used two nodes that 
each added the rest of my scene as a child.  One node did not use the texture 
projection, and the other did use it but also added a ClipNode in order to clip 
everything but the desired texture projection area.  This resulted in 
Z-fighting between my image and the color of the underlying geometry.

Finally I tried a hybrid of the two methods, where I took my stencil mask node 
and added a child ClipNode, then added my model as a child of the ClipNode.  I 
wanted the stencil to “wrap” exactly the model, but only within the borders of 
my image.  However, the ClipNode had no effect.  The appearance was that the 
texture was applied to my entire scene, and everything outside my image 
boundary was dark, like my original problem.

Can anyone please help?

Thanks,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] projective texture mapping and lighting

2012-02-20 Thread Michael Schanne
Hi,

I am new to OSG and OpenGL.  I am attempting to create a scene where an image 
from a real camera is projected onto a 3d model of the object being 
photographed.  I used the projective texture mapping technique following the 
osgspotlight example, substituting my image for the spotlight image in the 
texture, and using an orthographic projection.  This gave me the desired effect 
I wanted within the projection area, but it made the rest of my scene black.  I 
would like the rest of the scene to have normal lighting.  Basically, I want to 
take the osgspotlight example and give some ambient light to the rest of the 
scene.  I tried adding an additional light node as a child of a root above the 
node containing the texture (which is the root in the osgspotlight example) but 
scene outside the texture projection remained black.

Some of my reading suggested that using the stencil buffer with multipass 
rendering might be the solution, but I was hoping a simpler solution might 
work.  Is there another way to do this?  If not, where could I find a simple 
example of using stencils and multipass rendering?

Thanks,
Mike

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Potential bug in mouse / window event handling

2012-02-16 Thread Michael . A . Bosse
Hello all,

I believe that I may have discovered a bug in the GUI abstraction
library; although this may be a known issue. Here are the steps to
reproduce it. I performed these steps on 64bit Windows 7, as well as
64bit Vista, both using version 3.0.0 built in 32 bit on Visual Studio
2008 sp1.

1. Run osgviewer.exe avatar.osg
2. Press f to switch to a window mode
3. Click and hold both your left and right mouse button and drag towards
the edge of the window
4. Release the right button, then exit the window and release the left
5. Move the mouse back over the window WITHOUT clicking any buttons on
the mouse
6. You will notice that the trackball is still moving as though the left
button was held down
7. Click the left button, the behavior is as expected again

To prove to myself that it was probably not the intended functionality,
I then performed the following steps
1. Perform steps 1 and 2 above
2. Click the left mouse button and drag towards the edge of the window
3. Drag off of the window
4. Release the left mouse button 
5. Move the mouse back over the window WITHOUT clicking any buttons
6. You will notice the trackball is as expected

I attached a debugger and went into the event traversal part of the
osgViewer::Viewer class and noticed that while the mouse was out of the
window (so after step 5 of the first procedure), the event queue still
had an event with a mouse button held down. I believe that perhaps, some
boundary condition is being hit when there are two buttons and one is
released, that is not being handled correctly.

I don't have enough time to dig more into this, but I tried to diagnose
it as completely as possible given my time constraints. This also
impacts the osg mfc example, so it is not limited to the osgviewer
application.


Michael A Bosse'
Software Engineer
Link Simulation and Training
Desk (407)206-7628
Cell (386)847-0738

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [3rdparty] SpeedTree 6.0 integration

2012-02-08 Thread Michael Bach Jensen
Hi, hybr

Thank you! I hadn't thought of the view and projection matrices - I was focused 
on still active shader programs (which I later ruled out, though).

Also, I will try gDebugger to see if that can shed some light on the issue.

Cheers,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [3rdparty] SpeedTree 6.0 integration

2012-02-02 Thread Michael Bach Jensen
Hi, everyone!

Like others before us, we are trying to integrate SpeedTree into our 
OpenSceneGraph-based application and are having some trouble.

We are using the custum-drawable approach and the trees are (finally) rendering 
fine.

The problem is that, although simple objects like cow.osg render ok, paged 
terrains do not. Neither does the stats view.

I think I have tried every imaginable combination of glDisable and state 
dirtying function there is without luck.

I have attached a picture of the way it looks atm. Does anyone have a clue as 
to what might be wrong? Those lines protruding from the center is the terrain!

Thank you!

Cheers,
Michael

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




Attachments: 
http://forum.openscenegraph.org//files/osgspeedtree_164.jpg


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] light position through uniform

2012-02-02 Thread Michael Guerrero
Hi John,

A few things come to mind that might help:

1) Make sure when you do your calculations, everything is in the same space.  
For example, if you wanna get the direction from the vertex to the light in 
view space (lightPos - vertex) then both the light position and the vertex need 
to already be in view space before you take the difference.

2) View space is characterized by having the camera centered at the origin and 
facing down the -z axis (in OpenGL).  This means that the vector (0.0, 0.0, 
-1.0) is your forward vector in view space.

3) It helps to be familiar with the characteristics of coordinate systems at 
each transformation stage: local/world/view/clip (after 
projection)/NDC(normalized device coordinates), and finally screen coordinates. 
 I'm sure there's a ton of good information about this on the web or one of the 
many 3d graphics books.

Good luck,
Michael

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-01-17 Thread Michael Guerrero
Here's a breadcrumb trail for anyone wishing to go the NaCl route.  It's a zip 
containing a detailed list of changes needed for osg 3.0.1, a custom 
GraphicsWindow derivative (GraphicsWindowNaCl), and a sample application that 
will render a triangle as shown above.  If something is not clear or seems 
incomplete, don't hesitate to ask!

Thanks,
Michael

The Goods (http://www.mediafire.com/file/ylt55w7nfos820h/OSG_NaCl.zip)

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Bringing OSG to Google's Native Client NaCl

2012-01-12 Thread Michael Guerrero
Just wanna post an update on my progress here.

The good news is that today I managed to get things rendering:
[Image: http://img337.imageshack.us/img337/5662/osgnacl.png ]

That bad news is that I don't have much time left to work on this and I 
currently cannot get the triangle shown above to rotate or move and thus show 
off the real time nature of it.  I need to track down where/how the final 
matrix is making its way to OpenGL ES 2.0 (in this case it doesn't seem to be 
making it).  Another possibility is that maybe subsequent swapbuffer calls 
aren't actually executed as I do see this from stderr: Warning: detected 
OpenGL error 'invalid enumerant' at Before Renderer::compile.

I'm guessing that the remaining functionality/issues could be handled without 
much trouble by someone with more expertise in OSG than myself and to that end, 
I would be more than happy to share my code and describe in detail what I've 
done.  Please either reply here or send me a pm if you're interested.

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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Shader that can calculate pixel depth in meters

2012-01-03 Thread Michael Guerrero
Hi Ethan, I did this a little while back using information from that page as 
well.  I'm guessing real depth here just means that it's in whatever units 
you've modeled your world in.  For instance, if the near plane is at 1.0, what 
are the units of 1.0?
My purpose was to make sure that clouds fade out before they hit the far plane 
so that it isn't obvious that my clouds are just a flat plane.
 
Here are my shaders:

.vert

Code:
varying float eyeDistance;

//This vertex shader is meant to perform the per vertex operations of per pixel 
lighting
//using a single directional light source.
void main()
{
   //Pass the texture coordinate on through.
   gl_TexCoord[0] = gl_MultiTexCoord0;   
   gl_FrontColor = gl_Color;

   eyeDistance = -(gl_ModelViewMatrix * gl_Vertex).z;

   //Compute the final vertex position in clip space.
   gl_Position = ftransform(); 
}


.frag

Code:
uniform sampler2D baseTexture;

varying float eyeDistance;

void main(void)
{  
   vec4 alphaColor = texture2D(baseTexture, gl_TexCoord[0].st);
   
   vec4 color = gl_Fog.color;
   color.a = gl_Color.a * alphaColor.a;

   float A = gl_ProjectionMatrix[2].z;
   float B = gl_ProjectionMatrix[3].z;  
   float zFar  =   B / (1.0 + A);
   float zNear = - B / (1.0 - A);

   A  = -(zFar + zNear) / (zFar - zNear);
   B  = -2.0 * zFar * zNear / (zFar - zNear);
   
// scale eyeDistance to a value in [0, 1]  
   float normDepth = (eyeDistance - zNear) / (zFar - zNear);  
   
   // Start fading out at 70% of the way there
   normDepth = max(normDepth - 0.7, 0.0) / 0.3;
   normDepth = clamp(normDepth, 0.0, 1.0);   

   gl_FragColor = vec4(color.rgb, (1.0 - normDepth) * color.a);//color;
}




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





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Build

2011-12-26 Thread Michael W. Hall
What is the limit?  The attachment is only 168KB.

On Fri, 2011-12-23 at 17:10 -0700, Chris 'Xenon' Hanson wrote:
 On 12/23/2011 5:00 PM, Michael W. Hall wrote:
  Here is my project I had mentioned.  It builds the lib and then when it
  builds the main cpp file I get lots of undefined references in my
  library.  I am probably missing something in one of the CMakeList.txt
  files.  I am learning that also.
 
   You can't post large attachments to this mailing list. Is there somewhere 
 you can put a
 copy where only those interested in it can download it?
 
  Thanks,
  Michael
 


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


<    1   2   3   4   5   6   7   8   9   >