Re: [osg-users] Frame Event Button Mask Bug?

2012-06-13 Thread James Adkison
Hi Robert,

Per your request, I am following up on this as a reminder for you to look into 
this and/or get the results of what you found.

Thanks,
James

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





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


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-24 Thread James Adkison
Hi Robert,

Just curious if you ever got around to looking at this and if so what your 
conclusions/thoughts were.

Thanks,
James

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





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


Re: [osg-users] Frame Event Button Mask Bug?

2012-04-03 Thread James Adkison
Hi Robert,

Yes, I did make minor changes to the example code.  The osgkeyboardmouse 
changes are identical for both OSG 2.8.2 and 3.0.1 but I attached both patches 
anyway.

Below I have listed the output from the modified example and add some comments.

osgkeyboardmouse example run (2.8.2):
// application execution begins
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0
// mouse pressed and continuously held down
mouse pressed
// first frame after mouse press event, this frame event's button mask does 
indicate the mouse button is pressed
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
// mouse button released
mouse release

// first frame does indicate the button was released
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0

osgkeyboardmouse example run (3.0.1):
// application execution begins
frame: mask = 0
frame: mask = 0
frame: mask = 0
frame: mask = 0
// mouse pressed and continuously held down
mouse pressed
// first frame after mouse press event, this frame event's button mask does NOT 
indicate the mouse button is pressed
frame: mask = 0
// the subsequent frame events all DO indicate the mouse button is pressed
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
frame: mask = 1
// mouse is released
mouse released

// Now similar behavior is seen as with mouse press, first frame state the 
mouse button is pressed
frame: mask = 1
// Subsequent frames state the mouse button is not pressed
frame: mask = 0
frame: mask = 0
frame: mask = 0

I hope this helps make things more clear, let me know if anything is still 
unclear.

Thanks,
James

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




Attachments: 
http://forum.openscenegraph.org//files/osgkeyboardmouse_diff_301_513.txt
http://forum.openscenegraph.org//files/osgkeyboardmouse_diff_282_108.txt


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


[osg-users] Frame Event Button Mask Bug?

2012-04-03 Thread James Adkison
Hi,

I am working on a project which just upgraded from OSG 2.8.2 to OSG 3.0.1 and 
some of our code broke during the upgrade.  It was assumed that we had done 
something wrong and I started debugging and found the following change in 
behavior.

The following example shows the the observed behavior of our pick handler which 
sub-classes osgGA::GUIEventHandler and implements the handle(const 
osgGA::GUIEventAdapter &, osgGA::GUIActionAdapter &) method.


OSG 2.8.2
- Mouse press event is detected (left mouse button is pressed and not released)
- Frame event is detected and the retrieved button mask (i.e. 
osgGA::GUIEventAdapter::getButtonMask()) does indicate the left mouse button is 
pressed

OSG 3.0.1
- Mouse press event is detected (again left mouse button is press and not 
release)
- Frame event is detected and the retrieved button mask does NOT indicate the 
left mouse button is pressed
** However, the second frame event after the mouse press event and all 
subsequent frame events do have button masks which indicate the left mouse 
button is pressed

This same behavior was also observed in the OSG 3.0.1 osgkeyboardmouse example.

So my question is, was the change in behavior (as described above) 
intended/expected or a bug?

Thank you in advance,
James[/b]

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





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


Re: [osg-users] Warning: Could not find plugin to read objects from file "*.jpg"

2009-11-19 Thread James Adkison
Hi Robert, Mourad,

Thanks for the help, it  solved the problem.  After using the dependency walker 
I was able to see that I was missing the jpeg62.dll.

Thanks again,
James

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





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


[osg-users] Warning: Could not find plugin to read objects from file "*.jpg"

2009-11-18 Thread James Adkison ARA/CFD
This is my first time building OSG and everything went well in Linux but I am 
having a problem in Windows.

Building: OSG 2.8.2
OS: Windows XP
Compiler: Visual Studio 2005 Professional

The build seems to go through okay and I do have the osgdb_jpeg.dll in the 
plugins directory but I still get the warning when loading a JPEG texture.  I 
also built the osgd_png.dll and those textures are loading without any problems.

Any help pointing me in the right direction is appreciated.

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


Re: [osg-users] z-fighting issue with coplanar polygons

2009-10-27 Thread James Adkison ARA/CFD
Jason,

I was able to figure out the technique to accomplish this on Thursday before I 
went out of town.  Here are the steps I went through:

* Create a polygon of the lake

* Create an osg::Texture2D

* Create an osg::Camera

o   Set to pre-render mode

o   Set to render in the frame buffer

o   Set to an orthographic view

o   Attach the lake polygon to the camera, it seems to me that this is how the 
geometry is used to populate the newly created texture and that this is 
referred to and render to texture (RTT or RTT camera)

* Apply the newly created texture to the osg::Heightfield

I got this working using a simple test application to figure out how to do it.  
I will add it to the real application today, but I expect it will work out as 
nicely as it did in the test application.  I will let you know how it goes and 
at that time I will also post the source code for my test application in case 
anyone else wants to see how this works.

Thanks,
James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Thursday, October 22, 2009 4:41 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

James, I am fairly new to OSG so I do not know what specific classes or API 
calls might be used.

In non-OSG terms I think a way to do it would be to:


1.   Create your lake geometry placed in relation to the terrain

2.   Set up an orthographic camera looking from above, down towards the lake

3.   Render the lake to texture

4.   Set the uv texture coordinates of your terrain geometry to be equal to 
x,y (i.e., ignore the height)

5.   Apply the lake texture to the terrain geometry

I am sure there are more specific steps to think about as you implement it.  
Let us know if it works or if you think of something better.

Jason




From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Thursday, October 22, 2009 4:02 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

Jason,

I'm going to try the 'project textures onto the terrain via UV mapping' 
solution today.  I searching how to do this right now and I'm not sure if I 
finding relevant information.  Can you provide a brief/high-level description 
of the steps I would need to go through to perform the UV mapping, specifically 
what classes and/or API calls would be involved, or a tutorial?  I found some 
information on a RTT camera but I'm not sure if this is what I'm looking for.

James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Wednesday, October 21, 2009 9:09 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

I don't see much for performance implications as long as you are not 
dynamically changing the texture every frame.

Jason


From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Wednesday, October 21, 2009 11:56 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

I'm not very experienced in OSG and I spoke to a co-worker about this approach. 
 The thought is that there might be some performance implications with this 
approach.  This is because there may be multiple surface feature types and they 
can be enabled/disabled separately.  For example, if there are lakes and 
forests they will be created in the texture but each time one of them is 
enabled disabled this process has to be repeated and each texture would be 
approx 1k x 1k.  I'm going to give it a shot and see how it performs.   Any 
other thoughts in the mean time?

James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Wednesday, October 21, 2009 2:16 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

Can you project onto a texture and then apply the texture to the geometry?  
Either in a modeling package or algorithmically by rendering to a texture and 
then project that texture onto the terrain by planar uv mapping?

 Jason




From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Wednesday, October 21, 2009 10:25 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] z-fighting issue with coplanar polygons

I'm using an Heightfield to represent my terrain and parts of the terrain could 
have a surface feature (e.g. a lake).  The lake is being drawn as a polygon 
directly on the surface of the terrain.  This, of course,

Re: [osg-users] z-fighting issue with coplanar polygons

2009-10-22 Thread James Adkison ARA/CFD
Jason,

I'm going to try the 'project textures onto the terrain via UV mapping' 
solution today.  I searching how to do this right now and I'm not sure if I 
finding relevant information.  Can you provide a brief/high-level description 
of the steps I would need to go through to perform the UV mapping, specifically 
what classes and/or API calls would be involved, or a tutorial?  I found some 
information on a RTT camera but I'm not sure if this is what I'm looking for.

James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Wednesday, October 21, 2009 9:09 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

I don't see much for performance implications as long as you are not 
dynamically changing the texture every frame.

Jason


From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Wednesday, October 21, 2009 11:56 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

I'm not very experienced in OSG and I spoke to a co-worker about this approach. 
 The thought is that there might be some performance implications with this 
approach.  This is because there may be multiple surface feature types and they 
can be enabled/disabled separately.  For example, if there are lakes and 
forests they will be created in the texture but each time one of them is 
enabled disabled this process has to be repeated and each texture would be 
approx 1k x 1k.  I'm going to give it a shot and see how it performs.   Any 
other thoughts in the mean time?

James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Wednesday, October 21, 2009 2:16 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

Can you project onto a texture and then apply the texture to the geometry?  
Either in a modeling package or algorithmically by rendering to a texture and 
then project that texture onto the terrain by planar uv mapping?

 Jason




From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Wednesday, October 21, 2009 10:25 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] z-fighting issue with coplanar polygons

I'm using an Heightfield to represent my terrain and parts of the terrain could 
have a surface feature (e.g. a lake).  The lake is being drawn as a polygon 
directly on the surface of the terrain.  This, of course, is causing z-fighting 
to occur between the terrain and the surface feature.  I have been trying to 
solve this problem and have run across a couple solutions but they aren't 
working for me.

I have tried using polygon offset with the GL_OFFSET_POLYGON_FILL mode, which 
works when zoomed out far but up close z-fighting still occurs.

I have tried using a stencil buffer approach but I can't get it to work 
properly.  I can get the surface feature to stencil out the area of terrain but 
if you rotate the scene so that the surface feature is behind a mountain the 
stencil is still in place and the feature is rendered through the mountain.  
Hopefully, I am doing something wrong and someone can explain how I can make 
this work.

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


Re: [osg-users] z-fighting issue with coplanar polygons

2009-10-21 Thread James Adkison ARA/CFD
I'm not very experienced in OSG and I spoke to a co-worker about this approach. 
 The thought is that there might be some performance implications with this 
approach.  This is because there may be multiple surface feature types and they 
can be enabled/disabled separately.  For example, if there are lakes and 
forests they will be created in the texture but each time one of them is 
enabled disabled this process has to be repeated and each texture would be 
approx 1k x 1k.  I'm going to give it a shot and see how it performs.   Any 
other thoughts in the mean time?

James

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jason Jerald
Sent: Wednesday, October 21, 2009 2:16 PM
To: 'OpenSceneGraph Users'
Subject: Re: [osg-users] z-fighting issue with coplanar polygons

Can you project onto a texture and then apply the texture to the geometry?  
Either in a modeling package or algorithmically by rendering to a texture and 
then project that texture onto the terrain by planar uv mapping?

 Jason




From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of James Adkison 
ARA/CFD
Sent: Wednesday, October 21, 2009 10:25 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] z-fighting issue with coplanar polygons

I'm using an Heightfield to represent my terrain and parts of the terrain could 
have a surface feature (e.g. a lake).  The lake is being drawn as a polygon 
directly on the surface of the terrain.  This, of course, is causing z-fighting 
to occur between the terrain and the surface feature.  I have been trying to 
solve this problem and have run across a couple solutions but they aren't 
working for me.

I have tried using polygon offset with the GL_OFFSET_POLYGON_FILL mode, which 
works when zoomed out far but up close z-fighting still occurs.

I have tried using a stencil buffer approach but I can't get it to work 
properly.  I can get the surface feature to stencil out the area of terrain but 
if you rotate the scene so that the surface feature is behind a mountain the 
stencil is still in place and the feature is rendered through the mountain.  
Hopefully, I am doing something wrong and someone can explain how I can make 
this work.

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


[osg-users] z-fighting issue with coplanar polygons

2009-10-21 Thread James Adkison ARA/CFD
I'm using an Heightfield to represent my terrain and parts of the terrain could 
have a surface feature (e.g. a lake).  The lake is being drawn as a polygon 
directly on the surface of the terrain.  This, of course, is causing z-fighting 
to occur between the terrain and the surface feature.  I have been trying to 
solve this problem and have run across a couple solutions but they aren't 
working for me.

I have tried using polygon offset with the GL_OFFSET_POLYGON_FILL mode, which 
works when zoomed out far but up close z-fighting still occurs.

I have tried using a stencil buffer approach but I can't get it to work 
properly.  I can get the surface feature to stencil out the area of terrain but 
if you rotate the scene so that the surface feature is behind a mountain the 
stencil is still in place and the feature is rendered through the mountain.  
Hopefully, I am doing something wrong and someone can explain how I can make 
this work.

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