Re: [osg-users] OSG Example Modifying and Executing

2009-01-17 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi Alisan,

I believe the errors that you are receiving are due to the order in which 
headers are included (or not included at all).  I believe that the windows.h 
header must be before the gl.h include.  And if not, you'll get the errors 
you listed.  Try that.  Or you can Google the error as well.

Chuck

From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Alisan Kilinç
Sent: Saturday, January 17, 2009 7:13 AM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] osg-users Digest, Vol 19, Issue 46

Hi Jean,

First thanks for your step by step definition.I did your all directions and 
after build visual studio gave these errors:
(How can I solve this problem)

 -Original Message-
 From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-
 boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay
 Sent: Friday, January 16, 2009 12:24 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] OSG Example Modifying and Executing
 
 Hello Alisan,
 
 First, please don't reply to a digest, it messes up threading. I replied
 to my own message so that our discussion stays on the same thread.
 Please sign up to the list in non-digest mode and reply to the right
 message.
 
  In fact I dont want to use Cmake .I want to build an example project
  with visual studio and modify it for my own project.Can you explain step
  by step how can I create a working project from an example on visual
 studio?
 
 Well, if you have OSG binaries (I assume 2.4 since I'm not aware of
 anyone who made and distributed 2.6 binaries) then you can just make a
 simple Visual Studio project. Note that I would not normally give this
 kind of extensive step-by-step. You really need to understand your tools
 before trying something like this, so I'd recommend you start with a
 simple project, then try to link in one simple library, etc. But I know
 you're on a tight deadline, so ... here we go.
 
 1. Create a new project using the Empty project template. Place it
 wherever you want.
 2. Copy the source file of the example you want to modify to the folder
 where you created the project.
 3. In your project, right-click on your project and select Add -
 Existing item and select your source file.
 4. I will assume you created the environment variables I mentioned in my
 previous post, but if not just use the whole paths in the following steps.
 5. Right-click your project, click Properties.
 6. Select All configurations from the Configuration drop-down.
 7. Expand the C/C++ section on the left, and click on General.
 8. In the Additional Include Directories section, put the path to your
 OSG include directory, like ...\OpenSceneGraph\include or
 $(OSG_INCLUDE_PATH)
 9. Click on Preprocessor on the left, and in Preprocessor Definitions
 add WIN32;_WIN32;_DEBUG without the quotes (we'll change that last one
 for release later)
 10. Expand the Linker section on the left, and click on General.
 11. In Additional library directories, put the path to your OSG
 libraries (.lib files), like ...\OpenSceneGraph\lib or $(OSG_LIB_PATH)
 12. Click on Input on the left, and in Additional Dependencies, add
 osgd.lib osgDBd.lib osgUtild.lib osgGAd.lib osgViewerd.lib
 osgTextd.lib without the quotes. Add any others you will need. Later,
 if you get any linker errors, add others as needed. (we'll remove the
 'd' suffixes for release later)
 13. Change the Configuration to Release at the top.
 14. Go back to C/C++ - Preprocessor, and change _DEBUG to NDEBUG in the
 Preprocessor Definitions.
 15. Go back to Linker - Input, and remove the 'd' suffixes from all the
 lib names (so they become osg.lib osgDB.lib etc.)
 
 Click OK, and you should be able to do a build with F7. As I said above,
 if you get any linker errors, add the relevant OSG libraries then For
 example, if you get a linker error saying that osgManipulator::Dragger
 isn't defined, add osgManipulator.lib (release) and osgManipulatord.lib
 (debug) in Project Properties - Linker - Input.
 
 When running your app, if it says it can't find the DLLs, then you need
 to add your OSG bin directory (where the osg DLLs are) to your PATH. You
 can do that system-wide or in your project properties : Right-click on
 the project, go to Properties, select all configurations, click on
 Debugging on the left, and in the Environment field, put
 PATH=$(PATH);your OSG directory\bin without the quotes.
 
 If it still says it can't find a DLL then, it might be the dependencies'
 DLLs. You can copy those to your OSG bin directory and they will be found.
 
 If you need more info, I suggest you look on the OSG web site. In
 particular, this page explains how to build OSG with Visual Studio (the
 Compiling with Visual Studio .NET section), and also explains
 everything I explained here (the Starting a new project section).
 
 http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/
 VisualStudio
 
 Hope this helps,
 

Re: [osg-users] Why does the mailing list remove spacesfromthesubject line?

2008-12-09 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi Paul, Robert,

I'm seeing it as well.  But, I'm using Outlook too (through a Microsoft
Exchange server).

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Paul Martz
 Sent: Tuesday, December 09, 2008 3:50 PM
 To: 'OpenSceneGraph Users'
 Subject: Re: [osg-users] Why does the mailing list remove
 spacesfromthesubject line?
 
 (When my post with the two message attachments echoed back to my
inbox,
 the
 attachments had more spaces removed than when I sent it. Whatever
software
 is doing this is also able to remove spaces from the subject lines of
 messages that come in as attachments.)
 
 I'm using Outlook from MS Office. It is probably mishandling the mail
 somehow. I'll dig around in the options to see if I can resolve it on
my
 end.
 
 I'm on many mailing lists and I have only seen this problem with
osg-users
 and osg-submissions. But if no one else is seeing it, it must be
something
 in my client.
-Paul
 
 
  Hi Paul,
 
  I don't see issues like this on the list. I'm just using
  gmail in Firefox.  What mail client are you using?
 
  Robert.
 
  On Tue, Dec 9, 2008 at 8:20 PM, Paul Martz
  [EMAIL PROTECTED] wrote:
   I work out what you mean by remove spaces from subject line as I
   haven't noticed anything like sice.  Could you give an example.
  
   As far as I know mailman doesn't modify the subject line save for
   prepending the [osg-users].
  
   In the thread:
 [osg-users] Is it time that we have a
   OpenSceneGraph/src/3rdPartyPlugins
   directory?
  
   Your first post in the thread looks like this in my mail client:
 [osg-users] Is it time that we have
   aOpenSceneGraph/src/3rdPartyPlugins
   directory?
  
   I replied to that post, and I can see in my sent folder that the
   subject looks just like yours, with only one space missing.
  But when
   the message echoed back to my inbox, a second space was missing,
so
   the subject appears like so:
 [osg-users] Is it time that we
   haveaOpenSceneGraph/src/3rdPartyPlugins
   directory?
  
   This all looks fine in your mail client?
  
   I've attached both your original post and my reply. It will be
   interesting to see if the attached message subject lines
  look correct
   to you in your client.
 -Paul
  
   ___
   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-opensce
  negraph.org
 
 
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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


Re: [osg-users] Issue creating a stand alone DLL

2008-11-26 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi Geoff,

Not sure of your particular use, but I have written COM components for
Windows that use the OSG components, and have deployed those on other
machines without issues.  These were all developed using VS2005.

There's no real magic as far as I know.  I did have to install the
Visual C++ 2005 Redistributable Package that's available from Microsoft
(this installs the runtime libraries).  I also had to register the
components (for DLL's using regsvr32.exe and for EXE's using the EXE
name with /regserver appended).

Have you tried installing the redistributable package?

Chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Geoff
 Sent: Wednesday, November 26, 2008 10:42 AM
 To: OpenSceneGraph Users
 Subject: [osg-users] Issue creating a stand alone DLL
 
 Ok, I am having a problem creating a stand alone DLL that wraps some
 functionality of OpenSceneGraph so that I can use it via COM in my
 CodeGear C++ Builder app.
 
 I have created the dll, and have been successful in using it on my
 development machine, but only in debug mode and only on that machine.
 
 My question is, is there a proper way to create a DLL in Visual Studio
 2005, using C++, and encapsulating it so that it can be deployed onto
 other machines? Any help would be greatly appretiated as I have
 exhausted my knowledge and the deadline is fast approaching.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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


Re: [osg-users] Issue creating a stand alone DLL

2008-11-26 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi Geoff,

The error code that you're getting indicates that it can't find
something (specified module could not be found).  Unfortunately, it's
a clue, but doesn't provide much more help (gotta love the informative
error messages).  In these cases, I'd make sure that all of the
dependent DLLs are loaded and placed in a path where the COM module or
calling program can find them.  For me, I usually place all of the
dependency libraries (aside from Microsoft's) in a common directory and
then add that location to the PATH environment variable.

The easiest way to make sure everything is found is to put all of the
executables and DLLs in the same directory. You can use the Dependency
Walker program (DependencyWalker.com) to see all of the dependencies to
make sure that you've grabbed them all.  If that fixes the issue, then
you at least know what the problem is, and then you can place files
where it's most desired and just modify the system paths.

Hope that helps.

Chuck 

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Geoff
 Sent: Wednesday, November 26, 2008 2:40 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Issue creating a stand alone DLL
 
 I haven't tried it with the redistributable package, but both machines
 have VS2005 on them, the only difference is that I did not compile and
 install OSG on the laptop, which is where it isn't working.
 
 This is my first DLL project, and one of the first few I am doing on
 VS2005, so I am not 100% up to speed with the IDE. I was able to get
 my DLL to register on the  laptop after I copied a bunch of the OSG
 .DLL's onto it, but when i went to use it in my program,
 CoCreateInstance was returning an error of 8007007E. I am not sure
 what this means.
 
 Any help is appritiated. The project just going into OSG and retrieds
 all the z values it intersects with at a given X and Y location.
 Nothing fancy, just easier than trying to compile OSG with Borland
 C++Builder.
 
 Geoff
 
 On Wed, Nov 26, 2008 at 1:52 PM, Cole, Charles E. (LARC-B702)[GENEX
 SYSTEMS] [EMAIL PROTECTED] wrote:
  Hi Geoff,
 
  Not sure of your particular use, but I have written COM components
for
  Windows that use the OSG components, and have deployed those on
other
  machines without issues.  These were all developed using VS2005.
 
  There's no real magic as far as I know.  I did have to install the
  Visual C++ 2005 Redistributable Package that's available from
Microsoft
  (this installs the runtime libraries).  I also had to register the
  components (for DLL's using regsvr32.exe and for EXE's using the EXE
  name with /regserver appended).
 
  Have you tried installing the redistributable package?
 
  Chuck
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:osg-users-
  [EMAIL PROTECTED] On Behalf Of Geoff
  Sent: Wednesday, November 26, 2008 10:42 AM
  To: OpenSceneGraph Users
  Subject: [osg-users] Issue creating a stand alone DLL
 
  Ok, I am having a problem creating a stand alone DLL that wraps
some
  functionality of OpenSceneGraph so that I can use it via COM in my
  CodeGear C++ Builder app.
 
  I have created the dll, and have been successful in using it on my
  development machine, but only in debug mode and only on that
machine.
 
  My question is, is there a proper way to create a DLL in Visual
Studio
  2005, using C++, and encapsulating it so that it can be deployed
onto
  other machines? Any help would be greatly appretiated as I have
  exhausted my knowledge and the deadline is fast approaching.
  ___
  osg-users mailing list
  osg-users@lists.openscenegraph.org
 
 
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
  g
  ___
  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.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Camera PostDraw Callback w/ OpenGL calls.

2008-06-25 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi John,

I thought some of this sounded a little familiar.  I found a discussion not too 
long relative to this.  See the thread entitled Rendering to a image file.  
Here's a link to the specific post:

http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/28011/focus=28014

What Robert suggests (and as Jean-Sebastien suggests) is using the final draw 
callback to make sure that the extra OpenGL rendering is done before taking the 
screen capture.

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Jean-Sébastien Guay
 Sent: Wednesday, June 25, 2008 2:14 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Camera PostDraw Callback w/ OpenGL calls.
 
 Hi John,
 
  I have a camera postdraw callback on a View's camera. I want to do some
  OpenGL drawing via glBegin()/glEnd() and then take a screen capture. The
  screen capture works but the custom drawing isn't in there. It's on the
  screen though. I try to do glDrawBuffer( GL_BACK ) to force it into the
  same buffer as the camera, but no good. Any ideas?
 
 Wow, you're really putting osgViewer through its paces aren't you :-)
 
 I've never tried doing what you're doing, so I can only suggest that you
 try some other way of doing your OpenGL drawing. There are a few
 different ways of doing OpenGL inside OSG, some may not work in given
 usage models...
 
 Have you tried a custom drawable? Possibly putting the custom drawable
 on a geode that is child of a postdraw camera, and then using the
 finaldraw callback on your main camera instead of the postdraw callback
 to take your screen capture...
 
 Sorry I can't be of more help.
 
 J-S
 --
 __
 Jean-Sebastien Guay[EMAIL PROTECTED]
 http://www.cm-labs.com/
  http://whitestar02.webhop.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] osgSim::HeightAboveTerrain and osgintersection

2008-03-06 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
I'm trying to use the osgSim::HeightAboveTerrain class to compute
terrain heights at various points within a TXP database.  The intent is
to get an array of Vec3d's such that I can create a grid pattern using
osg::Geometry that (coarsely) represents the database (I tried the
OverlayNode and other examples, but the textures just didn't work for
me).

In my code, I basically create a osgSim::HeightAboveTerrain object, then
loop through various points laterally offset from the terrain's center
point (as determined by the bounding sphere).  With each point, I call
the 'computeHeightAboveTerrain' method using the terrain node (read in
using osgDB::readNodeFile) and the computed point to get the height
above the terrain.  Unfortunately, all of the calls return the same
height.  The terrain is of a mountainous region, so the actual terrain
height varies considerably from point to point.

As a check, I ran the osgintersection example using the TXP database.
For this example, it also returns a constant height (and the same height
that I receive in my code).

Any suggestions on why a constant height is returned?  Are there steps
that I'm missing?  I searched the mailing list archives and couldn't
find any discussions related to my problem.  BTW, The TXP database is a
paged LOD database with a Z-up orientation.

TIA.

chuck

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


Re: [osg-users] osgSim::HeightAboveTerrain and osgintersection

2008-03-06 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Thanks Robert.

I was hoping what seemed to be the simplest solution would work.  I'll
pursue a little further, particularly in the TXP plug-in.  Is there a
way to force specific LOD's to load (particularly the highest)?

I think the shader solution is probably the best and would actually lead
into some other work that I'd like to do.  Unfortunately, I really don't
know anything about shaders.  So, I've got quite a bit of learning to do
before I can attempt.

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Robert Osfield
 Sent: Thursday, March 06, 2008 1:04 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] osgSim::HeightAboveTerrain and
osgintersection
 
 Hi Chuck,
 
 osgSim:HeightAboveTerrain or osgSim:ElevationSlice might be of
 interest, the later is the one I'd use as it give you the whole data.
 But... both of these query for the heights res tiles, which won't be
 aligned to the terrain at all LOD levels soo... it won't actually work
 that well for a general runtime database.
 
 As for the specifics of what its not working with a TXP database I
 can't say - the osgSim classes as explicitly designed to handle paged
 database so in theory should work just fine.  Perhaps the fact that
 the TXP plugin does some funky management of PagedLOD levels to try
 and restrict how far apart adjacent tiles can be in LOD level is the
 cause.  One would need to go through with a debugger to be sure.
 
 Either way if you want a visual grid on your paged terrain I don't
 think computing intersections and generating polygons will cut it due
 to the nature of elevation changes as LOD levels pop in.  The best
 approach you could try would be to compute the intersections on the
 fly as tiles a loaded in via a custom Registry::ReadCallback - this
 would use the PlaneIntersector to get the intersections with each new
 loaded subgraph.
 
 However, the approach I'd use would be a custom shader that computes
 the position in space of each fragment on the terrain and decides to
 render different colours depending in the fragment was closest enough
 to a grid interval or not.  Such a shader would work with any type of
 terrain and would be pretty light weight.
 
 Robert.
 
 
 
 On Thu, Mar 6, 2008 at 5:50 PM, Cole, Charles E. (LARC-B702)[GENEX
 SYSTEMS] [EMAIL PROTECTED] wrote:
  I'm trying to use the osgSim::HeightAboveTerrain class to compute
   terrain heights at various points within a TXP database.  The
intent is
   to get an array of Vec3d's such that I can create a grid pattern
using
   osg::Geometry that (coarsely) represents the database (I tried the
   OverlayNode and other examples, but the textures just didn't work
for
   me).
 
   In my code, I basically create a osgSim::HeightAboveTerrain object,
 then
   loop through various points laterally offset from the terrain's
center
   point (as determined by the bounding sphere).  With each point, I
call
   the 'computeHeightAboveTerrain' method using the terrain node (read
in
   using osgDB::readNodeFile) and the computed point to get the height
   above the terrain.  Unfortunately, all of the calls return the same
   height.  The terrain is of a mountainous region, so the actual
terrain
   height varies considerably from point to point.
 
   As a check, I ran the osgintersection example using the TXP
database.
   For this example, it also returns a constant height (and the same
 height
   that I receive in my code).
 
   Any suggestions on why a constant height is returned?  Are there
steps
   that I'm missing?  I searched the mailing list archives and
couldn't
   find any discussions related to my problem.  BTW, The TXP database
is a
   paged LOD database with a Z-up orientation.
 
   TIA.
 
   chuck
 
   ___
   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.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Crisp texture mapping with OverlayNode

2008-02-19 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi all,

You can try OvelayNode::setOverlayTextureSizeHint() to increase the
size of the texture to 2048 or 4096 or whatever your gfx card can
handle, and see if the results are acceptable. -gw

Thanks Glenn.  This did help.  I had set it at 1024.  Unfortunately, it
still wasn't quite what I was hoping for.  I will look at the osgGIS
code a little more as it appears that you (and the community) are doing
something similar there (at least as shown in the screen captures on the
Wiki) -- unless you don't think it would be too helpful in my case.

 I think one thing that may alleviate the blending a bit is to set your
 texture filters to nearest neighbour ( but you will never remove this
type
 of issue with textures and lines due to mip-maping among other things)

Thanks Gordon.  Would I do this in the osgSim::OverlayNode code or can I
set a StateSet or something to do this?

 The fuzziness you see is under sampling due to the texture being
 captured in objects space rather than in screen space - one texel on
 the overlay texture is being sampled by many screen pixels.  Ideally
 you want a 1:1 mapping, but this is very hard to achieve and different
 algorithms are supported by OverlayNode to help address it.  See the
 enum:
 
 enum OverlayTechnique
 {
 OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY,
 VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY,
 VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY
 };
 
 VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY is the one with most
 sophisticated support trying to better map overlay texture with the
 requirements of view.
 
 Robert.

Thanks Robert.  I had a feeling that it was just an artifact of how
things work.  In the screen capture, I had been using
OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY.  When I set it to
VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY, I don't get anything -- no
gridlines are shown.  Is there something else that I need to set/change?

Judging by the responses, it appears that I may not be able to get what
I want through the OverlayNode.  Is there another way to do what I'm
interested in doing (i.e., overlaying a grid onto a terrain surface)?  I
have thought about looking at some of the intersect code examples, but
my first thought was that this would be too expensive in the way of
render speed, startup time, etc. to explore.

Thanks to all.

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


[osg-users] CMake error with Text3D

2007-12-10 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
With latest SVN (rev. 7648), CMake gives an error about Text3D (cannot
find source file ../include/osgText/Text3D).  I have Text3D.cpp, but
there is no header file in the include directory.

I'm thinking that this is just an oversight in the SVN add/submission
(as I've done the same thing many times so I'm quite familiar).

chuck

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


Re: [osg-users] Sky Dome

2007-11-30 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
There was a thread on this recently entitled OSG + sky that discussed
some examples.  Check that thread (it started in October and went into
November if checking the archives).

http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2
007-October/004020.html

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Kim C Bale
 Sent: Friday, November 30, 2007 11:13 AM
 To: OpenSceneGraph Users
 Subject: [osg-users] Sky Dome
 
 Is there an in-built sphere segment drawable that I could use to
 generate the geometry for a sky dome?
 
 Just want to check it's not there before I code it.
 
 Cheers,
 
 Kim.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Performance issue with Database Pager Terra VistaFiles

2007-11-12 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
I had the exact same problem with a Quadro FX 5500 card.  I use a TXP
database and performance was fine with an older driver and incredibly
bad with a newer driver.  For me, I had to use the 91.36 drivers versus
the 91.47 drivers.  There are even newer drivers out now for the Quadro
cards, but I haven't tried those.

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Will Dicharry
 Sent: Sunday, November 11, 2007 4:54 PM
 To: OpenSceneGraph Users
 Subject: Re: [osg-users] Performance issue with Database Pager  Terra
 VistaFiles
 
 Hi, I am not sure if this is the same problem, but I have an
 application that uses large paged databases and have seen a slow down
 on a higher end machine with a GeForce 7900  The slow down was only on
 Windows, Linux ran fine.  After tracking it down, I found out that the
 bottleneck was actually in the graphics drivers.  After installing an
 older version of the drivers, the performance went back up again.
 I've also seen the same behavior on a machine with a GeForce 8800 GTX.
  Unfortunately, I cannot find an older version of the drivers for that
 card.  Again, I don't know if this is the same problem, but the
 performance loss on a higher end machine rang a bell in my head.
 
 Will
 
 On Nov 10, 2007 12:31 AM, Akhtar Shamim [EMAIL PROTECTED] wrote:
  Dear All,
 
  Lately I had been seeing a very obscure problem with our OSG
 application.
 
  The application uses a very large Terra Vista paged terrain. I see
the
  following two phenomena:
 
  1. With all our old computers (i.e. computers having a single core
CPU,
 1 GB
  or less RAM and with graphics card  NVidia 6600) the application
gives
 a
  constant update rate of 60 Hz. No problem with any refresh rate
issues.
 
  2. However, when I try the same application on a high end machine
(Dual
 Core
  CPU or Quad Core CPU and with graphics card 7800 GT++) the
performance
 is
  very poor and quite unpredictable. I looked at the CPU usages and
found
 that
  the CPU usage is below 20 % for most of the CPUs. The application
crawls
 at
  less than 6-7 Hz. However, if I change the BIOS setting to use only
one
 CPU
  the application is back to normal and runs at constant 60 Hz.
 
  It seems to me that the database pager isnt working perfectly with
 multiple
  CPUs and gets deadlocked. I am very confused with this situation.
For
 our
  deployment we have all new machines with dual and quad core CPUs and
 latest
  graphics cards.
 
  I would be very happy to hear suggestion/advice on how to solve this
  performance issue. To be honest I am quite stuck with the problem. I
 have
  tried compiling our application with OSG 1.2 and OSG 2.0. The
phenomenon
 is
  the same.
 
   Best regards.
 
  ___
  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.or
g
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] OSG + sky

2007-11-01 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Just some more suggestions for references ...

 

(1) osgEphemeris, by Don Burns
(http://andesengineering.com/Projects/OsgEphemeris) - uses OSG (and
osgProducer) to create virtual environments for sky, moon, planets, and
stars.

 

(2) Delta3D (http://www.delta3d.org http://www.delta3d.org/ ) - uses
OSG in developing a gaming and simulation engine.

 

(3) FlightGear (http://www.flightgear.org http://www.flightgear.org/ )
- SVN project uses OSG, but prior releases use straight OpenGL for
environment rendering (I believe this part is handled using SimGear,
www.simgear.org http://www.simgear.org/ ).

 

All references are open-source, so they should provide some good
examples how environment rendering is handled both with OSG and OpenGL.

 

chuck

 

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adrian
Egli
Sent: Thursday, November 01, 2007 3:00 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG + sky

 

Hi Jim, 

do you have a example or demo of the sky-dome implemenation with the
clouds ? 

/adegli 

2007/11/1, Jim Brooks [EMAIL PROTECTED] :

I want to integrate enviroment in my application,
for example clouds and sky. As far as my knowledge 
is concerned this is not possible in OSG
currenly. Can someone tell me the alternatives.

OSG can be used to render a sky dome/box and clouds
(I've done it).

For cumulus clouds, used libnoise to 
procedurally-generate textures and
and a custom sprite node that rendered
a set of viewplane-aligned blended quads
(OSG::Billboard has/had problems staying rotated to
viewplane).


__ 
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___
osg-users mailing list 
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g 




-- 

Adrian Egli 

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


Re: [osg-users] Debugging Warning: detected OpenGL error 'invalid value' after RenderBin::draw(, )

2007-10-24 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
This was Robert's response to a similar situation:

---
Its likely that some OpenGL state you are setting isn't supported on
your hardware.  The big question is what OpenGL features are causing
this problem.  You could enable finer grained checking for OpenGL errros
via osg::State::setCheckForGLErrors(osg:State::ONCE_PER_ATTRIBUTE);
Or enable by tweaking the State constructor in src/osg/State.cpp.
You'll see a block:

#if 1
_checkGLErrors = ONCE_PER_FRAME;
#else
_checkGLErrors = ONCE_PER_ATTRIBUTE; #endif

Just change the #if 1 to #if 0.

This might give you a bit more info.

Robert.
---

chuck


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


Re: [osg-users] Thread safety improvements andCullThreadPerCameraDrawThreadPerContext now working

2007-08-23 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
Hi Robert,

I did some brief testing on this.  I had problems before with the
CullThreadPerCameraDrawThreadPerContext model as it would lock up the
viewer.  All of the other models seemed to work fine, but when I
switched to the CullThreadPerCameraDrawThreadPerContext model, it would
lock up. I posted the problems about 2 months ago.  

I tried the viewer both with the cow.osg and a txp database that I use
and it didn't lock up with either file.  Previously the viewer would
lock up on both of these files.  So, whatever you did definitely seems
to have fixed the problem that I was having.  Great job!!

I'm using:
Windows XP SP2
Intel P4 3.2GHz - single core (hyperthreading enabled)
2GB RAM
nVidia Quadro FX 1100

chuck

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:osg-users-
 [EMAIL PROTECTED] On Behalf Of Robert Osfield
 Sent: Wednesday, August 22, 2007 8:18 AM
 To: osg users
 Subject: [osg-users] Thread safety improvements
 andCullThreadPerCameraDrawThreadPerContext now working
 
 Hi All,
 
 Over the last two days I've been doing lots of working hunting down
 crash on exit that were occurring with certain threading models and
 viewer usages, my new quad core machine certainly has helped reveal
 more problems than my older dual core system.  The upshot of this work
 is that I've tightened up the default thread safety of ref/counting
 for scene graph elements as well as various helper classes.  This work
 is now checked in.
 
 Another part of my work was to get the
 CullTheadPerCameraDrawThreadPerContext threading model working
 properly.  Again my new quad core system + dual Gfx cards proved
 invaluable in this quest.  All that was required was a few minor
 tweaks to the threading set up in src/osgViewer/Viewer.cpp.  Again
 these changes are now checked in to SVN.
 
 Could users that have seen problems with crash on exit, or with the
 CullThreadPerCameraDrawThreadPerContext threading model do a svn
 update and let me know how you get on.
 
 Cheers,
 Robert.
 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org

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


Re: [osg-users] Generating a Video

2007-08-13 Thread Cole, Charles E. (LARC-B702)[GENEX SYSTEMS]
 I haven't put together a video from an OSG app yep, but its inevitable
 one day I'll need to so I thought I'd pen down what I think might be a
 nice way to tackle it.  This might also be a good example to have
 added to the OSG, so users are welcome to add one :-)
 
 My thought was to have a slave Camera that tracks the master camera,
 but with an FBO or Pbuffer set to PAL dimensions (or whatever target
 res you want for the video), this will record the frames at the
 correct size, and without any toolboxes etc interfering.
 
 Second up would be to attach a post draw callback to the slave Camera,
 and in this callback you'd do the osg::Image::readPixels to do this
 for you.  In theory one could set up a PixelBufferObject to help speed
 to read up.  Next up you have to save this image to disk, or just
 cache it.   Now writing to disk will be slow, so you don't want to do
 this in the rendering thread, rather spawn an OperationThread to do
 the writing to disk, with a custom ImageWriteOperation added to the
 OperationThread.  Due to the asynchronous nature of write one will
 need to use a circular buffer of osg::Image, one at the head being
 written to by the rendering thread, and the rest being used by
 ImageWriteOperations, when the image is written to disk one simply
 then put the Image back into the buffer ready to be reused.
 
 Then once you've stopped your recording of images, you wait till the
 last frame is written to disk (the OperationThread's queue is empty)
 then you span a tool to glue all these frames together as a video.
 Potentially you could use video library like ffmpeg to do this in a
 background thread.
 
 Other little changes one could make would be to cut the framerate of
 the app down to 25fps to match the needs of the video, or perhaps even
 let the app run at a multiple, say 50 or 75fps and then blend frames
 together, and only write out at 25fps.
 
 Robert.

Hi Robert,

Just some comments from my own personal perspective and experience as I
am currently going through the same thing that it appears that many
others are doing (or wanting to do).  

For the video captures, it was relayed to me that the best result would
be to capture individual images that could be later streamed together
for a video.  I had already tried using various video capture utilities,
but there was always frame drops and the performance and quality was
just horrible.  So this was enlightening news.  What I was told was that
doing it this way would allow for every frame to be captured at the
desired resolution and quality, and a video could then be created using
these high quality images for streaming at a desired frame rate.  

It appears that many in the community are doing it this way too.  But, I
just wanted to emphasize that, at least for me, in doing it this way,
the actual frame rate of my application did not matter.  What mattered
most was that I captured high quality images of every frame because the
resulting video could be made to exhibit whatever frame rate that I
desired.  In fact, I now set my capture to be 1280x960 (2x 640x480) with
the resulting video using scaled down images.  This captures at about
5Hz, but again this doesn't matter to me.  Well, faster would be nice,
but I'm not looking at rendering performance when doing image captures.

In my code, I use my own render thread with the osgViewer, and I did
basically what you've proposed (albeit a much cruder implementation).  I
added a writeImage to my render thread loop to save the individual
images.  I didn't do it in a callback, but I was trying a 2-hour
feasibility solution.  So, it wasn't the most thought-about solution.
The issue that I had with this was the potential frame loss due to the
fact that the rendering was faster than the image capture (due to the
disk writes).  I could have put a check in the code to only capture if
the camera's view matrix changed, but again the feasibility solution was
a much lower effort than this would have required.  :-)

So, my suggestion is that the image capture not be forced to capture at
a rendering speed.  And possibly even block further rendering at each
frame until the image capture has been completed.  Maybe an option flag
could be used to set how the capture is performed.

I would also like to just mention that some of the image plug-ins do not
have the writeImage method of the ReaderWriter class implemented.  So,
without further community support in this area, the option to write a
desired image format may not be available.

Just my two cents ... thanks for reading.

chuck

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