[osg-users] How to recreate GraphicsContext?

2009-04-20 Thread Ran Jiao
Hi, I am working to make a osg scene editor with MFC. I just followed the 
example of osgViewerMFC and create a GraphicsContext for every MFC document. 

For the 1st document everything runs smoothly, but when I tried to create 
another GraphicsContext, the program throws a exception. 

So, how can I create a GraphicsContext again correctly?

This is how I create a GraphicsContext in MFC, just the same as the sample in 
the OSG SDK.

Code:

osg::ref_ptr windata = new 
osgViewer::GraphicsWindowWin32::WindowData(m_hWnd);

// Setup the traits parameters
traits->x = 0;
traits->y = 0;
traits->width = rect.right - rect.left;
traits->height = rect.bottom - rect.top;
traits->windowDecoration = false;
traits->doubleBuffer = true;
traits->sharedContext = 0;
traits->setInheritedWindowPixelFormat = true;
traits->inheritedWindowData = windata;

//<== stuck here
mGC = osg::GraphicsContext::createGraphicsContext(traits.get());




Thank you.

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





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


Re: [osg-users] DoomLike manipulator

2009-04-20 Thread Richard Baron Penman
hi,

I'm interested in using this manipulator. Have any updates been posted or
should I use the originally posted one?

Richard



2009/3/24 Simon Loic 

> In fact I didn't have enough time to finish this week-end. So It will be
> postponed to next week.
>
>
> On Fri, Mar 20, 2009 at 9:10 AM, Simon Loic  wrote:
>
>> All right, I'll certainly finish during the week-end and post it on
>> osg-users for testing.
>>
>>
>> 2009/3/20 Robert Osfield 
>>
>>> Hi Loic,
>>>
>>> Great little discussion :-)
>>>
>>>  2009/3/19 Simon Loic 
>>>
 Maybe when I will have finished to implement the GROUNDED/HORIZONTAL
 mode you can give it a try and decide which  name best fits. In my concern 
 I
 clearly incline towars grounded as the implementation I was about to 
 propose
 allows step over small obstacles like stairs.

 If you have remarks on the implementation so far, go ahead...

 to sukender :
 I didn't exacly get your remarks while I'm sure they are founded. Anyway
 I think that when I wil have finished to code both mode, things will become
 clearer for me and for you.

 Get you informed as soon as the manipulator is ready.

>>>
>>> When you ready just post the changes to either osg-submissions if it's
>>> ready to merge, or to osg-users if you feel it still needs more discussion.
>>>
>>> Cheers,
>>> Robert,
>>>
>>> ___
>>> osg-users mailing list
>>> osg-users@lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>>
>>
>>
>> --
>> Loïc Simon
>>
>
>
>
> --
> Loïc Simon
>
> ___
> 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] Using vec3d for CullStack eye point

2009-04-20 Thread Ravi Mathur
 I would think that anyone who intentionally requests double  
precision matrices is doing so out of need, and would probably be  
willing to accept the inevitable performance hit.


Is there anything I should do to get this change started?  I'm sure  
you are busy with other issues so I can try it out on my computer  
tomorrow to see if there are any unexpected hangups.


Ravi

On Apr 20, 2009, at 3:55 PM, Robert Osfield wrote:

On Mon, Apr 20, 2009 at 9:37 PM, Ravi Mathur  
 wrote:
So would it be worth it to implement the CullStack::EyePointStack  
typedef as
Vec3d/Vec3f depending on the value of the OSG_USE_FLOAT_MATRIX  
compile

variable?


Yes I think this would make sense.  We'd need to mindful of any
performance consequences of doing this, but for the most part I
wouldn't have thought it would be issue.

Robert.

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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Paul Martz
The debugging tips are now reformatted and available at my discussion forum:
http://www.skew-matrix.com/bb/viewtopic.php?f=6&t=5

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

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


[osg-users] [vpb] OSGDEM LOD Elevation Corruption

2009-04-20 Thread Mark
Hi,


OSGDEM databases always finish with the highest detailed LODs corrupted. What 
can I do to fix this problem?

View from above in between two LODs-

[Image: http://img25.imageshack.us/img25/1566/osgdemlodcorruption1.jpg ] 
(http://img25.imageshack.us/my.php?image=osgdemlodcorruption1.jpg)

View from an angle-

[Image: http://img25.imageshack.us/img25/9618/osgdemlodcorruption2.jpg ] 
(http://img25.imageshack.us/my.php?image=osgdemlodcorruption2.jpg)

The system used-

OSG 2.8.0 (2.2 -> 2.8 have the same results)
VPB 0.9.10
GDAL 1.60
Quad Core Intel
4 GB RAM
nVidia 8800 GTX
Ubuntu 8.10 64-bit


Thank you.

-Mark

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





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


Re: [osg-users] Newbie question regarding deprecated methods

2009-04-20 Thread Paul Martz
setColorIndices, setVertexIndices, etc., allow you to have a different set
of indices for each array, so that (for example) the vertex with index 89
could be drawn with the color with index 42. Sounds really flexible, but
unfortunately there's no way to do this in OpenGL 1.x/2.x other than the
slow path, and no way to do it in OpenGL 3.x at all, so applications should
not use it for performance-critical rendering. (Oh! That's most all
rendering, isn't it? :-)

Instead, arrange your data so that colors and other vertex data have the
same index value as the vertex they are associated with, (vertex index 23 is
drawn with color index 23, etc), then use glDrawElements* as your
PrimitiveSet. This might require some duplication of data, but will render
much more efficiently.

Text along these lines should maybe be in the Geometry header next to the
"deprecated" warning.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Anton
Lauridsen
Sent: Monday, April 20, 2009 4:37 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Newbie question regarding deprecated methods

Hi,

I'm trying to learn to use OSG using the tutorials on the wiki, starting
with this:
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/BasicGeome
try, during the coding, I learned that setColorIndices has been deprecated,
unfortunately I'm having difficulties figuring out what the preferred
replacements are.

I tried doing some searches, using the usual keywords, "deprecated",
"setColorIndices" etc, (hey I'm a newbie, I probably haven't got the
terminology right) I haven't had much luck with finding replacements. Is
there somewhere I can go and get some idea about what to use instead? or is
there a more up to date tutorial?

Thank you.

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





___
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] Newbie question regarding deprecated methods

2009-04-20 Thread Anton Lauridsen
Hi,

I'm trying to learn to use OSG using the tutorials on the wiki, starting with 
this: 
http://www.openscenegraph.org/projects/osg/wiki/Support/Tutorials/BasicGeometry,
 during the coding, I learned that setColorIndices has been deprecated, 
unfortunately I'm having difficulties figuring out what the preferred 
replacements are.

I tried doing some searches, using the usual keywords, "deprecated", 
"setColorIndices" etc, (hey I'm a newbie, I probably haven't got the 
terminology right) I haven't had much luck with finding replacements. Is there 
somewhere I can go and get some idea about what to use instead? or is there a 
more up to date tutorial?

Thank you.

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





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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Paul Martz
Many people don't read the FAQ. (Your own post implies you aren't familiar
with its contents :-)

The FAQ is here:
http://www.openscenegraph.org/projects/osg/wiki/Support/FAQ

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of R Fritz
Sent: Monday, April 20, 2009 2:14 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG debugging tips

Surely these are FAQs?

Randolph

On Apr 18, 2009, at 10:48 AM, Paul Martz wrote:

> Hi all -- It seems like there has been a rash of "help me debug my 
> code"-type questions lately, so I thought I'd post a short list of 
> debugging techniques and other aids to help people out. I hope people 
> find this information to be useful.
>
> 1) You are a software engineer and you have the OSG source code. Use 
> it.
> Step through it in a debugger. (Many of the posts I've seen lately 
> indicate that the poster has not looked inside the OSG code at all. 
> This is a great, free resource; learn to use it. The code doesn't 
> lie.)
>
> 2) For simple rendering problems, use a tool like GLIntercept to 
> capture the OpenGL calls. If you know OpenGL, this is a great way to 
> track down why things don't render correctly. If you don't know 
> OpenGL, buy the red book and learn it, otherwise you'll never be 
> effective at coding OSG.
>
> 3) Here are a few ways to learn some basic OSG concepts that get 
> covered in this email list very frequently:
>  a) Buy/download the Quick Start Guide
>
> http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-
> guide/
> 767629
> There is a color version, b&w (which is cheaper), PDF (which is 
> free), and a Chinese version.
>  B) Search the mail list archives:
> http://groups.google.com/group/osg-users?hl=en
> If you're a beginner, your question has probably been discussed 
> and answered multiple times.
>  C) Get familiar with the OSG wiki:
> http://www.openscenegraph.org
>
> 4) If you really need professional help, consider purchasing a support 
> contract from myself or Robert Osfield, or contracting with someone 
> else on the list for support. You are more likely to get quality help 
> if you pay for it.
>
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com 
> +1 303 859 9466
>
> ___
> 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] Using vec3d for CullStack eye point

2009-04-20 Thread Robert Osfield
On Mon, Apr 20, 2009 at 9:37 PM, Ravi Mathur  wrote:
> So would it be worth it to implement the CullStack::EyePointStack typedef as
> Vec3d/Vec3f depending on the value of the OSG_USE_FLOAT_MATRIX compile
> variable?

Yes I think this would make sense.  We'd need to mindful of any
performance consequences of doing this, but for the most part I
wouldn't have thought it would be issue.

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


Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Robert Osfield
HI Allen,

viewer.frame() calls viewer.updateTraversal(), and viewer.run() calls
viewer.frame() so your suggest frame loop would only call
updateTraversal() twice.

Instead to expand viewer.run() -> a frame loop with it's component
parts you do (please look at the implementation itself to confirm
this):

while(!viewer.done())
{
viewer.advance();
viewer.eventTraversal();
viewer.updateTraversal();
viewer.renderingTraversals();
}

You can of course insert your own updates into this frame loop, or
just use an update callback on a node.

Robert.

On Mon, Apr 20, 2009 at 9:21 PM, Allen Saucier  wrote:
> Hey,
> here's the article Paul is speaking about:
> http://forum.openscenegraph.org/viewtopic.php?t=2190
>
> I'm one of the guys in that discussion.  I asked how to modify a line 
> dynamically.
>
> Since you're using viewer.run(), that makes life difficult.  I believe you'll 
> need to use the viewer frame loop instead.  Something like:
>
>  viewer.setSceneData(rootnode.get());
>  viewer.realize();
>
>  while (!viewer.done())
>  {
>    viewer.updateTraversal();
>    viewer.frame();
>  }
>  return 1;
>
>
> The above code allows you to put calls w/in the while loop that will modify 
> your cones/cylinders etc... by changing the states of the cones or modifying 
> their colors.
>
> Hope this helps.
>
>
> Here's a great place to start:
>
> http://www.openscenegraph.org/documentation/NPSTutorials/
>
> http://www.cs.umu.se/kurser/TDBD12/VT04/lab/osg/html/examples.html
>
> http://www.cs.clemson.edu/~malloy/courses/3dgames-2007/tutor/index.html
>
>
> http://www.palomino3d.com/pal_com/openscenegraph/
>
> 
> Allen
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10477#10477
>
>
>
>
>
> ___
> 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] Using vec3d for CullStack eye point

2009-04-20 Thread Ravi Mathur

Hey all,

First off, this is NOT another "can we change all vec3 to vec3d"  
thread. My question is more specific. :)


In osg::CullStack, the EyePointStack is a Vec3 stack, therefore a  
Vec3f stack.  However, the stack itself is built up using elements  
from a osg::Matrix, which could be a Matrixd (if so chosen from  
OSG_USE_FLOAT_MATRIX).  For users like me who need a Vec3d eye point,  
the EyePointStack becomes useless because it only stores Vec3f  
values.  So we end up having to do redundant work (although admittedly  
not difficult work) to recover the eye point from the CullStack's  
modelview matrix.


So would it be worth it to implement the CullStack::EyePointStack  
typedef as Vec3d/Vec3f depending on the value of the  
OSG_USE_FLOAT_MATRIX compile variable?


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


Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Allen Saucier
Hey,
here's the article Paul is speaking about:
http://forum.openscenegraph.org/viewtopic.php?t=2190

I'm one of the guys in that discussion.  I asked how to modify a line 
dynamically.

Since you're using viewer.run(), that makes life difficult.  I believe you'll 
need to use the viewer frame loop instead.  Something like:

  viewer.setSceneData(rootnode.get());
  viewer.realize();
  
  while (!viewer.done())
  {
viewer.updateTraversal();
viewer.frame();
  }
  return 1;


The above code allows you to put calls w/in the while loop that will modify 
your cones/cylinders etc... by changing the states of the cones or modifying 
their colors.

Hope this helps.


Here's a great place to start:

http://www.openscenegraph.org/documentation/NPSTutorials/

http://www.cs.umu.se/kurser/TDBD12/VT04/lab/osg/html/examples.html

http://www.cs.clemson.edu/~malloy/courses/3dgames-2007/tutor/index.html


http://www.palomino3d.com/pal_com/openscenegraph/


Allen

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





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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread R Fritz

Surely these are FAQs?

Randolph

On Apr 18, 2009, at 10:48 AM, Paul Martz wrote:


Hi all -- It seems like there has been a rash of "help me debug my
code"-type questions lately, so I thought I'd post a short list of  
debugging

techniques and other aids to help people out. I hope people find this
information to be useful.

1) You are a software engineer and you have the OSG source code. Use  
it.
Step through it in a debugger. (Many of the posts I've seen lately  
indicate
that the poster has not looked inside the OSG code at all. This is a  
great,

free resource; learn to use it. The code doesn't lie.)

2) For simple rendering problems, use a tool like GLIntercept to  
capture the
OpenGL calls. If you know OpenGL, this is a great way to track down  
why
things don't render correctly. If you don't know OpenGL, buy the red  
book

and learn it, otherwise you'll never be effective at coding OSG.

3) Here are a few ways to learn some basic OSG concepts that get  
covered in

this email list very frequently:
 a) Buy/download the Quick Start Guide

http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-guide/
767629
There is a color version, b&w (which is cheaper), PDF (which is  
free),

and a Chinese version.
 B) Search the mail list archives:
http://groups.google.com/group/osg-users?hl=en
If you're a beginner, your question has probably been discussed  
and

answered multiple times.
 C) Get familiar with the OSG wiki:
http://www.openscenegraph.org

4) If you really need professional help, consider purchasing a support
contract from myself or Robert Osfield, or contracting with someone  
else on
the list for support. You are more likely to get quality help if you  
pay for

it.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com 
+1 303 859 9466

___
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] osgdem write permission error

2009-04-20 Thread Yurii Monakov
Hi Robert,

The problem was in wrong diagnostic message (from
vpb::DataSet::_writeNodeFile). In fact, osgDB complained about missing *.ive
plugin, which was not on the path. Debugging is a great thing.

Thanks,
YM.

2009/4/20 Robert Osfield 

> Hi Yurii,
>
> You really just need to double check your permissions as clearly VPB is
> having problems opening the file and specifically highlighting issues with
> permissions.  If you really think the fault is somewhere in VPB then go
> debug it - as you have all the source code.   I might have all the source
> code, as do others, but we're all running VPB just fine so can't reproduce
> the problems you are seeing.
>
> Robert.
>
> On Thu, Apr 16, 2009 at 10:39 AM, Yurii Monakov wrote:
>
>> Hi All!
>>
>> I have a problem generating whole planet elevation database from SRTM 1 km
>> source ( 43200x21600 )
>> and custom *.vrt file:
>>
>> 
>>  
>>Gray
>>MSB
>>orthoplus.bin
>>  
>> 
>>
>> osgdem command line looks like:
>> osgdem --geocentric --whole-globe -l 3 -d test.vrt
>>
>> And this is what osgdem outputs:
>>
>> --geocentric
>> -d test.vrt
>> loaded layer test.vrt
>> Adding terrainTile
>> DataSet::_run() 0 0
>> started DataSet::createDestination(8)
>> Time for after_reproject 0.09
>> AR=2.00 C1=2 R1=1
>> createNewDestinationGraph
>> Time for _destinationGraph->computeMaximumSourceResolution() = 0.013281
>> Time for createDestinationGraph 0.217807
>> Time for after_computeNeighbours 0.022597
>> completed DataSet::createDestination(8)
>> There are 1 contributing source files:
>> test.vrt
>> mkpath()
>> Need to create output task directory = output_root_L0_X0_Y0
>> mkpath(output_root_L0_X0_Y0)
>>created directory output_root_L0_X0_Y0
>> Task output directory = output_root_L0_X0_Y0\
>> started DataSet::writeDestination(output.ive)
>> _readRow 1
>>reading tile level=0 X=0 Y=0
>> DestinationTile::readFrom(SetName=, FileName=test.vrt)
>> _equalizeRow 1
>>equalizing tile level=0 X=0 Y=0
>> _writeRow 1
>>getDirectory()=
>>writeNodeFile = 0 X=0 Y=0 filename=output.ive
>> _writeNodeFile(output.ive)
>> vpb::access(output.ive, W_OK)=-1
>> vpb::access(., W_OK)=0
>> Error: do not have write permission to write out file output.ive
>> Caught exception : Error: do not have write permission to write out file
>> output.ive
>>
>> Thanks, YM
>>
>> PS. test.vrt and elevation file (orthoplus.bin) are on the path, there is
>> enough free disk space and all output folders are not write-protected.
>> PPS. Using osg v.2.8.0 and vpb v.0.9.10
>>
>> ___
>> 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] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Robert Osfield
Hi David et. al,

On Mon, Apr 20, 2009 at 4:50 PM, Robert Osfield
 wrote:
> Time for put this baby on a hard disk and install the OSG dev env.
> I'll email the list once everything is installed and the compile fix
> checked in - this will be a good test for how smoothly the whole
> process goes.

After installing the OS to the hard drive I disappeared off to have
dinner and going cycling, now back and have got dev tools and OSG
installed and compiled.  I've removed the #ifdef WIN32 and things
still build for me under Kubuntu 9.04 and  I'm not expect platform
issues due to this change so the change is now checked in to
svn/trunk.

David as a double check could you remove your FFmpegHeaders.hpp and do
an svn update to pull in my changed file to double check that it
works.

Also out of curiosity why as a non developer are you using the
svn/trunk version of the OSG rather than the stable 2.8.0 release?
2.8.0 should be fine with FlightGear, but perhaps there are problems
lurking that I'm aware of.. if so please point me in the right
direction so I can make sure that 2.8.1 addresses these.

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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Paul Martz
I'm formalizing these debugging tips into a post on my personal discussion
forum. I'll let everyone know when it's ready.
 
At this point, no one has contacted Bob or I with potential material for an
OSG Recipes book.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com  
+1 303 859 9466
 

  _  

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ümit Uzun
Sent: Monday, April 20, 2009 12:42 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG debugging tips


Thanks Paul;

And I am curios about OsgRecipes hand book :) Can you estimate the publish
date?

Thanks in advance.


2009/4/20 Chris 'Xenon' Hanson 


Art Tevs wrote:
> Hi Paul,
> I've sticked your debugging tips in the forum. So hopefully people will
get read them first, before asking the same questions again and again ;)


 Another good one that technical forums should cite generally is this
article:
http://www.catb.org/~esr/faqs/smart-questions.html
 

 We incorporated a lot of similar info from a variety of sources into our
company's tech
support policy page:

http://3dnature.com/techsupport.html

 Most people get a good laugh out of the photo in the Phone support section.
;)

--
Chris 'Xenon' Hanson, omo sanza lettere  Xenon
AlphaPixel.com
PixelSense Landsat processing now available!
http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." -
Xen

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





-- 
Ümit Uzun

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


Re: [osg-users] Using osgWidget for the first time, some questions

2009-04-20 Thread Jean-Sébastien Guay

Hi again all,

One other comment I'd like to make about osgWidget. In the header files, 
most argument names are removed from method declarations, even 
constructors. If I were using a binary version of OSG, all I would have 
to go with would be the headers, so the argument names should be there, 
otherwise I can't know what the arguments are...


If I see

class OSGWIDGET_EXPORT Label: public Widget
{
public:

META_Object   (osgWidget, Label);

Label (const std::string& = "", const std::string& = "");
// ...

What are those two strings? One might be the text of the label, but 
which one, and what about the other one?


I can understand the desire to shut up warnings about unused arguments, 
but perhaps this is being too pro-active? :-)


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Ümit Uzun
Thanks Paul;

And I am curios about OsgRecipes hand book :) Can you estimate the publish
date?

Thanks in advance.

2009/4/20 Chris 'Xenon' Hanson 

> Art Tevs wrote:
> > Hi Paul,
> > I've sticked your debugging tips in the forum. So hopefully people will
> get read them first, before asking the same questions again and again ;)
>
>   Another good one that technical forums should cite generally is this
> article:
> http://www.catb.org/~esr/faqs/smart-questions.html
>
>  We incorporated a lot of similar info from a variety of sources into our
> company's tech
> support policy page:
>
> http://3dnature.com/techsupport.html
>
>  Most people get a good laugh out of the photo in the Phone support
> section. ;)
>
> --
> Chris 'Xenon' Hanson, omo sanza lettere  Xenon
> AlphaPixel.com
> PixelSense Landsat processing now available!
> http://www.alphapixel.com/demos/
> "There is no Truth. There is only Perception. To Perceive is to Exist." -
> Xen
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] Wiki sticky?

2009-04-20 Thread Robert Osfield
On Mon, Apr 20, 2009 at 6:46 PM, Chris 'Xenon' Hanson
 wrote:
>  A guest on the OSG IRC just pointed out that the web site Wiki portion
>
> http://www.openscenegraph.org/projects/osg
>
>  Seems inoperative.

I've emailed Jose L. about this.  Alas it's end of day in Span so it
might take till tomorrow to get fixed.

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


[osg-users] Wiki sticky?

2009-04-20 Thread Chris 'Xenon' Hanson
  A guest on the OSG IRC just pointed out that the web site Wiki portion

http://www.openscenegraph.org/projects/osg

  Seems inoperative.


  The redirection page here:
http://www.openscenegraph.org/

  Seems to load, but fails to redirect to the Wiki.

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Back and trawling through backlog...

2009-04-20 Thread Carlos M . Gutiérrez Ceñal

Hi Robert,

working fine now.

Thank you
Carlos.

- Original Message - 
From: "Robert Osfield" 

To: "OpenSceneGraph Users" 
Sent: Monday, April 20, 2009 5:16 PM
Subject: Re: [osg-users] Back and trawling through backlog...



HI Carlos,

I hacked my DatabasePager so that the
DatabasePager::setCompileGLObjectsForContextID(..) was a non op and
got osgviewer to hang, I then did a reivew of all the places that the
_activeGraphicsContexts variable was accessed and recorded them so
that they'd work even when _activeGraphicsContexts was empty, this
fixed the hang and the app then proceeds to run smoothly.

I've now reverted the change to setCompileGLObjectsForContextID(..)
and am ready to merge by fix into svn/trunk and OSG-2.8 branch, but
first could you test it out - the modified DatabasePager.cpp is
attached.  If you could test this against your app without any call to
setCompileGLObjectsForContextID(..) and let me know if it fixes things
at your end.

Cheers,
Robert.








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








No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00

No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Jean-Sébastien Guay

Hi Robert,


It's just a header in a plugin, so it'll only pollute the plugin
source files so not a great issue.


Agreed.


I'm currently doing a test install of the Kubuntu 9.04 release
candidate, so don't yet have a dev environment setup.


No problem, no rush. Just so others can avoid David's build errors.

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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


Re: [osg-users] terrain database popping...

2009-04-20 Thread Pierre Bourdin (gmail)
Hi all,
what could be interesting to would be the integration of automatic
vegetation placement like the work done in Delta3D:
http://www.movesinstitute.org/~wdwells/4181/index.html
I'll be glad if can give any help on that part...

So far I've never succeed in adding a vector layer mapped to an
osgTerrain using osgdem (I can open each separately but not combine
both).

But it was done easily with osggis...
I have juste started to look at it and it looks also impressive...
http://wush.net/trac/osggis


Regards, Pierre.

Le vendredi 17 avril 2009 à 10:40 -0500, Alejandro Aguilar Sierra a
écrit :

> Hi Stefan,
> 
> I played with libmini some time ago. I didn't studied the code deeply,
> but I think some things are already in OSG, like the viewer. I don't
> have too much time right now, but with the proper insight, I may try
> to do it.
> 
> Regards,
> 
> -- A.
> 
> 
> On Thu, Apr 16, 2009 at 4:32 AM, Stefan Roettger  wrote:
> > On Apr 15, 2009, at 11:44 PM, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
> > wrote:
> >
> >> I think it would be good to fold libmini (or something equivalent) into
> >> OSG.
> >> That way you can use the databases built with VPB. I don't know much about
> >> VTP but using VPB databases are nice...
> >
> > Yes. I have been thinking for almost 2 years now about folding libMini into
> > OSG, but so far did not have the necessary time to do it. So it got delayed
> > and delayed... If someone is volunteering though, I'd be happy to give the
> > necessary insight into libMini.
> >
> > Cheers,
> > Stefan
> >
> > ___
> > 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


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com

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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Robert Osfield
On 4/20/09, Jean-Sébastien Guay  wrote:
> Hi Robert, David,
>
>> I removed the "#ifdef WIN32" and accompanying "#endif" and everything is
>> fine now. It's solved now.
>
> Robert, how safe is this change on all platforms? I think errno.h is
> standard, but would including it here introduce too much namespace
> pollution?

It's just a header in a plugin, so it'll only pollute the plugin
source files so not a great issue.


> If not, then can you please check in this change? I had originally
> guarded the inclusion so it would only be included on Win32 on the
> assumption that other platforms didn't need it (as you didn't,
> apparently) but it seems from this report that other compilers need it
> too (even different versions of g++ on Linux don't seem to agree). Thanks.

I'm currently doing a test install of the Kubuntu 9.04 release
candidate, so don't yet have a dev environment setup.

I am in fact working right now from the LiveCD, no hard disk has been
touched at all, save for slow app loading due to being pulled from the
CD drive things are working really smoothly.  Internet connection
worked right out of box too.

Time for put this baby on a hard disk and install the OSG dev env.
I'll email the list once everything is installed and the compile fix
checked in - this will be a good test for how smoothly the whole
process goes.

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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Chris 'Xenon' Hanson
Art Tevs wrote:
> Hi Paul,
> I've sticked your debugging tips in the forum. So hopefully people will get 
> read them first, before asking the same questions again and again ;)

  Another good one that technical forums should cite generally is this article:
http://www.catb.org/~esr/faqs/smart-questions.html

  We incorporated a lot of similar info from a variety of sources into our 
company's tech
support policy page:

http://3dnature.com/techsupport.html

  Most people get a good laugh out of the photo in the Phone support section. ;)

-- 
Chris 'Xenon' Hanson, omo sanza lettere  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Jean-Sébastien Guay

Hi Robert, David,


I removed the "#ifdef WIN32" and accompanying "#endif" and everything is fine 
now. It's solved now.


Robert, how safe is this change on all platforms? I think errno.h is 
standard, but would including it here introduce too much namespace 
pollution?


If not, then can you please check in this change? I had originally 
guarded the inclusion so it would only be included on Win32 on the 
assumption that other platforms didn't need it (as you didn't, 
apparently) but it seems from this report that other compilers need it 
too (even different versions of g++ on Linux don't seem to agree). Thanks.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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


Re: [osg-users] Dynamic Modification..

2009-04-20 Thread Paul Martz
Dynamically modifying geometry has just recently been discussed at length in
more than one thread on this email list. I suggest you review posts from the
past week or two, try the advice that has already been posted, then post
back if you are still unable to sole the issue you're encountering.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Ignazio
Sent: Monday, April 20, 2009 8:47 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Dynamic Modification..

Hi,
I'm a new member of this forum..So if I make mistakes please apologize me..
I have a problem... :)
I create a 3d application(a simple application, I have a set of cones and
Cylinders).
The structure of application is :

osg::ref_ptr root;
Cosg::Cone* unitCone;
osg::Cylinder* unitCylinder; 

I associate to each Cone and Cyclinder a color using a osg::ShapeDrawable
elements in his way:
ObjectDrawable[i] = new osg::ShapeDrawable(unitCone); With a
osgViewer::viewer element i set the scene, viewer.SetSceneData(root),and run
th application,viewer.run().

Now I want apply a dinamic modification to a scene.I want modify the color
of cones or cylinders when the application is just running.For example I
read a file when i write what solid must change color .
  
Thank you.

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





___
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] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread david bruyer
Hi,

I removed the "#ifdef WIN32" and accompanying "#endif" and everything is fine 
now. It's solved now.

Thanks for your help

FFMpegHeaders.hpp


Code:
#ifndef HEADER_GUARD_FFMPEG_HEADERS_H
#define HEADER_GUARD_FFMPEG_HEADERS_H


extern "C"
{
#define __STDC_CONSTANT_MACROS
#include // for error codes defined in avformat.h
#include 
#include 
#include 
#include 

#ifdef USE_SWSCALE
#include 
#endif

}



#endif // HEADER_GUARD_FFMPEG_HEADERS_H



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





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


Re: [osg-users] Converting .ive model to .osg - including textures

2009-04-20 Thread Jean-Sébastien Guay

Hello Robert,


osgconv myfile.ive myfile.osg -O OutputTextureFiles

Worked for me, but only if the directories that the original files
came from were already created.


Hmm, I didn't think it would be a format-specific option, I thought it 
would be in the --help text, but it's true that it's only useful for 
those formats that embed textures so it makes sense.


And it worked for me too, thanks a lot!

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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


Re: [osg-users] Converting .ive model to .osg - including textures

2009-04-20 Thread Pierre Bourdin (gmail)
Le lundi 20 avril 2009 à 15:51 +0100, Robert Osfield a écrit :
I receive your mail as mine was going...

You are to quick answering ;-)

Pierre.

> Try:
> 
> > osgconv --format osg
> Plugin osgPlugins-2.9.3/osgdb_osg.so
> {
> ReaderWriter : OSG Reader/Writer
> {
> features   : readObject readNode writeObject writeNode
> extensions : .osg  OpenSceneGraph Ascii file format
> extensions : .osgs Psuedo OpenSceneGraph file
> loaded, with file encoded in filename string
> options: OutputTextureFilesWrite out the texture
> images to file
> options: precision Set the floating point
> precision when writing out files
> }
> }
> 
> Then:
> 
> osgconv myfile.ive myfile.osg -O OutputTextureFiles
> 
> Worked for me, but only if the directories that the original files
> came from were already created.
> 
> Robert.
> 
> 
> On Mon, Apr 20, 2009 at 3:27 PM, Jean-Sébastien Guay
>  wrote:
> > Hi all,
> >
> > I would like to convert an .ive to .osg including textures. I've looked
> > through osgconv --help but didn't find anything to help me do this. When I
> > run osgconv file.ive file.osg I just get the .osg file, the textures which
> > were embedded in the .ive file are not extracted for the .osg file to use.
> > In fact, viewing the .osg file does not even give warnings that textures are
> > missing, so I guess the osgconv process just removed all references to the
> > textures.
> >
> > Perhaps I've done it in the past and just forget how I did it... Perhaps
> > it's staring me in the face. Is there a command line switch to do this? Or
> > will I have to write a tool to do it with a visitor?
> >
> > Thanks in advance,
> >
> > J-S
> > --
> > __
> > Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
> >   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


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com

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


Re: [osg-users] Back and trawling through backlog...

2009-04-20 Thread Carlos M . Gutiérrez Ceñal

Hi Robert,

i've a call to compileGLObjects but i think it's not called right now.
I don't have setCompileGLObjectsForContextID in the code, i'll try adding 
it.


Thanks!
Carlos.



- Original Message - 
From: "Robert Osfield" 

To: "OpenSceneGraph Users" 
Sent: Monday, April 20, 2009 4:47 PM
Subject: Re: [osg-users] Back and trawling through backlog...


Hi Carlos,

Thanks for the explanation.  Using SceneView rather than osgViewer
will mean that you can create your own graphics context that
DatabasePager will never know about, unless your explicitly tell it.
Do you call the DatabasePager method:

   void setCompileGLObjectsForContextID(unsigned int contextID, bool 
on);


At all in your app?

Could you try adding this.  To see if it fixes the problem.  I'll do
the reverse at my end (comment out it's usage in osgViewer) to see if
can reproduce the problem.

Robert.


No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Converting .ive model to .osg - including textures

2009-04-20 Thread Pierre Bourdin (gmail)
Hi J-S,

you can query the options via:

osgconv --format osg

It's verbose, but very useful...

Pierre.
Le lundi 20 avril 2009 à 10:27 -0400, Jean-Sébastien Guay a écrit :

> Hi all,
> 
> I would like to convert an .ive to .osg including textures. I've looked 
> through osgconv --help but didn't find anything to help me do this. When 
> I run osgconv file.ive file.osg I just get the .osg file, the textures 
> which were embedded in the .ive file are not extracted for the .osg file 
> to use. In fact, viewing the .osg file does not even give warnings that 
> textures are missing, so I guess the osgconv process just removed all 
> references to the textures.
> 
> Perhaps I've done it in the past and just forget how I did it... Perhaps 
> it's staring me in the face. Is there a command line switch to do this? 
> Or will I have to write a tool to do it with a visitor?
> 
> Thanks in advance,
> 
> J-S


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com

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


Re: [osg-users] ref_ptr<>::release() and Quick Start Guide

2009-04-20 Thread Paul Martz
Sorry, I pasted the admin link by accident. Here is the actual link:
  http://code.google.com/p/osgqsg/

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Nico
Kruithof
Sent: Monday, April 20, 2009 2:21 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] ref_ptr<>::release() and Quick Start Guide

Dear Paul,

First of all, I'd like to thank you for your QSG! It's a great overview of
OSG and a nice introduction of the main aspects of the library. I'm looking
forward to the update.

I tried the link to code.google.com, but it gave me a permission denied. Do
I need to register somewhere first?

Bests,
Nico Kruithof

On Sun, Apr 19, 2009 at 1:21 AM, Paul Martz  wrote:
> FYI -- As part of my revision to the OSG Quick Start Guide (in 
> progress), I've modified the current svn head of the example code to 
> use ref_ptr<>::release(). This technique will be discussed in the 
> upcoming revision but is not mentioned in the current edition of the 
> book. So I thought I should discuss it briefly here.
>
> ref_ptr<>::release() tells the ref_ptr<> variable to stop managing the 
> memory that it points to. It will decrement the reference count on the 
> memory but will not delete the memory, not even if its reference count 
> goes to zero. This makes release() well-suited for returning the 
> address of Reference memory from functions that allocate that memory. 
> The function can use a ref_ptr<> locally to store the address of the 
> allocated memory, return it with release(), and as long as the calling 
> code store the returned address in another ref_ptr<>, no memory is deleted
and no memory leaks.
>
> The source code can be downloaded from:
> http://code.google.com/p/osgqsg/admin
>
> The current edition of the book can be ordered from www.lulu.com. Just 
> search for "OpenSceneGraph".
>
>
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> +1 303 859 9466
>
> ___
> 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] Converting .ive model to .osg - including textures

2009-04-20 Thread Robert Osfield
Try:

> osgconv --format osg
Plugin osgPlugins-2.9.3/osgdb_osg.so
{
ReaderWriter : OSG Reader/Writer
{
features   : readObject readNode writeObject writeNode
extensions : .osg  OpenSceneGraph Ascii file format
extensions : .osgs Psuedo OpenSceneGraph file
loaded, with file encoded in filename string
options: OutputTextureFilesWrite out the texture
images to file
options: precision Set the floating point
precision when writing out files
}
}

Then:

osgconv myfile.ive myfile.osg -O OutputTextureFiles

Worked for me, but only if the directories that the original files
came from were already created.

Robert.


On Mon, Apr 20, 2009 at 3:27 PM, Jean-Sébastien Guay
 wrote:
> Hi all,
>
> I would like to convert an .ive to .osg including textures. I've looked
> through osgconv --help but didn't find anything to help me do this. When I
> run osgconv file.ive file.osg I just get the .osg file, the textures which
> were embedded in the .ive file are not extracted for the .osg file to use.
> In fact, viewing the .osg file does not even give warnings that textures are
> missing, so I guess the osgconv process just removed all references to the
> textures.
>
> Perhaps I've done it in the past and just forget how I did it... Perhaps
> it's staring me in the face. Is there a command line switch to do this? Or
> will I have to write a tool to do it with a visitor?
>
> Thanks in advance,
>
> J-S
> --
> __
> Jean-Sebastien Guay    jean-sebastien.g...@cm-labs.com
>                               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


Re: [osg-users] Back and trawling through backlog...

2009-04-20 Thread Robert Osfield
Hi Carlos,

Thanks for the explanation.  Using SceneView rather than osgViewer
will mean that you can create your own graphics context that
DatabasePager will never know about, unless your explicitly tell it.
Do you call the DatabasePager method:

void setCompileGLObjectsForContextID(unsigned int contextID, bool on);

At all in your app?

Could you try adding this.  To see if it fixes the problem.  I'll do
the reverse at my end (comment out it's usage in osgViewer) to see if
can reproduce the problem.

Robert.

2009/4/20 Carlos M. Gutiérrez Ceñal :
> I'm afraid i've no way to reproduce it with a little app right now. It's
> part of our library wich is used in our visual simulation apps. I've tried
> to use the database pager as seen in osgviewer classes but we're not using
> viewer in our library. I call updateSceneGraph method from pager in our
> update method and signalBeginFrame/signalEndFrame during render, apart from
> this there is only the pager init, something like:
>
> m_databasePager = osgDB::DatabasePager::create();
> m_databasePager->setTargetFrameRate(60.0);
> m_databasePager->registerPagedLODs( sceneView->getSceneData() );
> sceneView->getCullVisitor()->setDatabaseRequestHandler( m_databasePager );
>
> and thread configuration (setup, affinity and start).
>
> Hope this helps.
>
> Regards.
>
>
> - Original Message -
> From: Robert Osfield
> To: OpenSceneGraph Users
> Sent: Monday, April 20, 2009 3:24 PM
> Subject: Re: [osg-users] Back and trawling through backlog...
> 2009/4/20 Carlos M. Gutiérrez Ceñal 
>>
>> Hi Robert,
>>
>> remember to look for the database pager bug ;)
>
> Thanks for the reminder.  It's still on my TODO list.
>
> Could you explain how I might reproduce the problem as none of the OSG
> examples have a problem like this.  Once I can reproduce the bug I can then
> fix the code and confirm that it's fixed.
>
> Cheers.
> Robert.
>
> 
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraphorg/listinfo.cgi/osg-users-openscenegraph.org
>
> 
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09
> 20:04:00
>
>
> No virus found in this outgoing message.
> Checked by AVG - www.avg.com
> Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09
> 20:04:00
>
> ___
> 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] Dynamic Modification..

2009-04-20 Thread Ignazio
Hi,
I'm a new member of this forum..So if I make mistakes please apologize me..
I have a problem... :)
I create a 3d application(a simple application, I have a set of cones and 
Cylinders).
The structure of application is :

osg::ref_ptr root;
Cosg::Cone* unitCone;
osg::Cylinder* unitCylinder; 

I associate to each Cone and Cyclinder a color using a osg::ShapeDrawable 
elements in his way:
ObjectDrawable[i] = new osg::ShapeDrawable(unitCone);
With a osgViewer::viewer element i set the scene,
viewer.SetSceneData(root),and run th application,viewer.run().

Now I want apply a dinamic modification to a scene.I want modify the color of 
cones or cylinders when the application is just running.For example I read a 
file when i write what solid must change color .
  
Thank you.

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





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


Re: [osg-users] Back and trawling through backlog...

2009-04-20 Thread Carlos M . Gutiérrez Ceñal
I'm afraid i've no way to reproduce it with a little app right now. It's part 
of our library wich is used in our visual simulation apps. I've tried to use 
the database pager as seen in osgviewer classes but we're not using viewer in 
our library. I call updateSceneGraph method from pager in our update method and 
signalBeginFrame/signalEndFrame during render, apart from this there is only 
the pager init, something like:

m_databasePager = osgDB::DatabasePager::create();
m_databasePager->setTargetFrameRate(60.0);
m_databasePager->registerPagedLODs( sceneView->getSceneData() );
sceneView->getCullVisitor()->setDatabaseRequestHandler( m_databasePager );

and thread configuration (setup, affinity and start).

Hope this helps.

Regards.

  - Original Message - 
  From: Robert Osfield 
  To: OpenSceneGraph Users 
  Sent: Monday, April 20, 2009 3:24 PM
  Subject: Re: [osg-users] Back and trawling through backlog...


  2009/4/20 Carlos M. Gutiérrez Ceñal 

Hi Robert,

remember to look for the database pager bug ;)

  Thanks for the reminder.  It's still on my TODO list.

  Could you explain how I might reproduce the problem as none of the OSG 
examples have a problem like this.  Once I can reproduce the bug I can then fix 
the code and confirm that it's fixed.

  Cheers.
  Robert.



--


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



--



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00

No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Robert Osfield
On Mon, Apr 20, 2009 at 3:01 PM, david bruyer  wrote:
> Hi robert,
>
> I can't find the FFMpegHeaders.h to include the #include  
> parameter...
> Si I can not try to compile it again...
>
> Can you tell me where to find that file ?

OpenSceneGraph/src/osgPlugins/ffmpeg/

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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread david bruyer
Do i have to modify it this way ? (sorry but i never make programmation...)



Code:
#ifndef HEADER_GUARD_FFMPEG_HEADERS_H
#define HEADER_GUARD_FFMPEG_HEADERS_H


extern "C"
{
#define __STDC_CONSTANT_MACROS
#include // for error codes defined in avformat.h
#include 
#include 
#include 
#include 

#ifdef USE_SWSCALE
#include 
#endif

}



#endif // HEADER_GUARD_FFMPEG_HEADERS_H



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





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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Jean-Sébastien Guay

Hello David,


Well, this file still contain this parameter, i can't put again...
Can i try to remove it ?


Just remove the "#ifdef WIN32" and accompanying "#endif" and try to 
recompile... Then the error defines should be included by #include 
.


J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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] Converting .ive model to .osg - including textures

2009-04-20 Thread Jean-Sébastien Guay

Hi all,

I would like to convert an .ive to .osg including textures. I've looked 
through osgconv --help but didn't find anything to help me do this. When 
I run osgconv file.ive file.osg I just get the .osg file, the textures 
which were embedded in the .ive file are not extracted for the .osg file 
to use. In fact, viewing the .osg file does not even give warnings that 
textures are missing, so I guess the osgconv process just removed all 
references to the textures.


Perhaps I've done it in the past and just forget how I did it... Perhaps 
it's staring me in the face. Is there a command line switch to do this? 
Or will I have to write a tool to do it with a visitor?


Thanks in advance,

J-S
--
__
Jean-Sebastien Guayjean-sebastien.g...@cm-labs.com
   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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Paul Martz
I thought about this too. But there is already a wealth of information on
the wiki. I think this info would get lost if we post it there.
 
I'm wondering if it might be useful to automatically post "debugging tips"
(these and others) once every two weeks, or once a month, or something like
that? I don't want to flood the mail list / forum, but I would like to get
this information in front of people's faces.
 
Vincent -- Good tip about use of the .osg file.
 
Art -- Thanks.
 
Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com  
+1 303 859 9466
 

  _  

From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Pierre
Bourdin (gmail)
Sent: Monday, April 20, 2009 2:59 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OSG debugging tips


Hi Paul and thank you, 
this is a nice help.

May I suggest to put it on the wiki ?

Regards, Pierre.

Le samedi 18 avril 2009 à 12:10 -0600, Paul Martz a écrit : 

Yet more debugging tips:



5) Set OSG_NOTIFY_LEVEL to either INFO or DEBUG and examine the output. OSG

might be trying to well you why things are going wrong.



6) Run the osgUtil::Optimizer on your scene graph with the CHECK_GEOMETRY

flag (to check for simple mistakes like not having enough colors in your

color array when using BIND_PER_VERTEX). With OSG_NOTIFY_LEVEL set verbose

enough, the Optimizer will display warnings if it encounters these types of

issues.



7) Read the function comments in the header files for functions you use.

This will help you avoid the accidental use of deprecated functions (like

Geometry::setVertexIndices()) that are inefficient (but remain in OSG for

compatibility reasons).



Paul Martz

Skew Matrix Software LLC

http://www.skew-matrix.com

+1 303 859 9466



-Original Message-

From: osg-users-boun...@lists.openscenegraph.org

[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz

Sent: Saturday, April 18, 2009 11:49 AM

To: osg-users@lists.openscenegraph.org

Subject: [osg-users] OSG debugging tips



Hi all -- It seems like there has been a rash of "help me debug my

code"-type questions lately, so I thought I'd post a short list of debugging

techniques and other aids to help people out. I hope people find this

information to be useful.



1) You are a software engineer and you have the OSG source code. Use it.

Step through it in a debugger. (Many of the posts I've seen lately indicate

that the poster has not looked inside the OSG code at all. This is a great,

free resource; learn to use it. The code doesn't lie.)



2) For simple rendering problems, use a tool like GLIntercept to capture the

OpenGL calls. If you know OpenGL, this is a great way to track down why

things don't render correctly. If you don't know OpenGL, buy the red book

and learn it, otherwise you'll never be effective at coding OSG.



3) Here are a few ways to learn some basic OSG concepts that get covered in

this email list very frequently:

  a) Buy/download the Quick Start Guide

 

http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-guide/

767629

 There is a color version, b&w (which is cheaper), PDF (which is free),

and a Chinese version.

  B) Search the mail list archives: 

 http://groups.google.com/group/osg-users?hl=en

 If you're a beginner, your question has probably been discussed and

answered multiple times.

  C) Get familiar with the OSG wiki:

 http://www.openscenegraph.org



4) If you really need professional help, consider purchasing a support

contract from myself or Robert Osfield, or contracting with someone else on

the list for support. You are more likely to get quality help if you pay for

it.



Paul Martz

Skew Matrix Software LLC

http://www.skew-matrix.com  

+1 303 859 9466



___

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


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com

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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread david bruyer
Ok, thank you,


Well, this file still contain this parameter, i can't put again...
Can i try to remove it ?



Code:
#ifndef HEADER_GUARD_FFMPEG_HEADERS_H
#define HEADER_GUARD_FFMPEG_HEADERS_H


extern "C"
{
#define __STDC_CONSTANT_MACROS
#ifdef WIN32
#include // for error codes defined in avformat.h
#endif
#include 
#include 
#include 
#include 

#ifdef USE_SWSCALE
#include 
#endif

}



#endif // HEADER_GUARD_FFMPEG_HEADERS_H




robertosfield wrote:
> On Mon, Apr 20, 2009 at 3:01 PM, david bruyer <> wrote:
> 
> > Hi robert,
> > 
> > I can't find the FFMpegHeaders.h to include the #include  
> > parameter...
> > Si I can not try to compile it again...
> > 
> > Can you tell me where to find that file ?
> > 
> 
> OpenSceneGraph/src/osgPlugins/ffmpeg/
> 
> Robert.
> ___
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread david bruyer
Hi robert,

I can't find the FFMpegHeaders.h to include the #include  parameter...
Si I can not try to compile it again...

Can you tell me where to find that file ?

Thanks in advance,
David


robertosfield wrote:
> Hi David,
> 
> Did the changes that the compiler and J-S suggested work?
> 
> Robert.
> 
> On Mon, Apr 20, 2009 at 2:03 PM, david bruyer < ()> wrote:
> 
> > hi robert,
> > 
> > I'm compiling OSG-dev on a Mandriva 2009.0
> > 
> > 
> > Code:
> > [da...@mandrake ~]$ uname -a
> > Linux Mandrake 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008 
> > i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
> > [da...@mandrake ~]$
> > 
> > 
> > 
> > And i'm using the 0.4.9 version of ffmpeg
> > =>
> > 
> > 
> > Code:
> > [da...@mandrake ~]$ rpm -qa | grep ffmpeg
> > libffmpeg-devel-0.4.9-3.pre1.14161.1.1plf2009.0
> > libffmpeg51-0.4.9-3.pre1.14161.1.1plf2009.0
> > ffmpeg-0.4.9-3.pre1.14161.1.1plf2009.0
> > [da...@mandrake ~]$
> > 
> > 
> > 
> > Thanks for your interest
> > David
> > 
> > --
> > Read this topic online here:
> > 
> > http://forum.openscenegraph.org/viewtopic.php?p=10430#10430 
> > (http://forum.openscenegraph.org/viewtopic.php?p=10430#10430)
> > 
> > 
> > 
> > 
> > 
> > 
> > ___
> > osg-users mailing list
> >  ()
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org 
> > (http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org)
> > 
> > 
> > 
> 
> 
>  --
> Post generated by Mail2Forum


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





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


Re: [osg-users] 3D Point to ScreenSpace Coordinates

2009-04-20 Thread Paul Martz
Very recently, I did this in a shader to create a projected texture,
generating the texture coordinates by projecting the vertices. The process
is essentially the same in OSG as in OpenGL.

Find the lowest Transform that applies to your vertex, and its NodePath (use
a NodeVisitor), then call computeLocalToWorldMatrix(). This gives you the
accumulated local to world matrix (l2w). Then you multiply by the view
matrix, as you have below. But you also need the projection matrix. Get both
of these from the Camera. This gets you clip coordinates. So you have
something like:

  // Get clip coordinates from object coordinates.
  Vec3 cc = oc * l2w * view * proj;

Then do the perspective divide (divide by w). Next you need to scale and
bias by the viewport and depth range into window space.

  // Get window coords from clip coords.
  float wc.x() = (cc.x() / cc.w() + 1.) * (vp.width() * .5) + vp.x;
  float wc.y() = (cc.y() / cc.w() + 1.) * (vp.height() * .5) + vp.y;
  float wc.z() = (cc.z() / cc.z() + 1.) ... // something similar here for
depth range, if you care about the z value.

After this, you'll probably want to invert y to account for the window
origin in upper left corner (instead of lower left corner like in OpenGL).

To get screen space, you will finally need to offset the xy window coords by
the window position on the screen. Off the top of my head, I don't know how
to obtain the window offsets from OSG.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-Original Message-
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Hagen
Sent: Monday, April 20, 2009 5:00 AM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] 3D Point to ScreenSpace Coordinates

Hi,

given a 3d Point and i want to know the corresponding screenspace
coordinates.
given a
osg::Vec3 p

do i have to do that this way?
osg::vec3 result = p * viewer->getViewMatrix(); and then i just ignore z?

Thank you.

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





___
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] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread David Callu
Hi all

same issue for me,

# uname -a
Linux mrburns 2.6.27.21-170.2.56.fc10.i686.PAE #1 SMP Mon Mar 23 23:24:26
EDT 2009 i686 i686 i386 GNU/Linux
# gcc --version
gcc (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)


Update ffmpeg from 0.49 to 0.5 solve the problem.

HTH
David

2009/4/20 Robert Osfield 

> Hi David,
>
> Did the changes that the compiler and J-S suggested work?
>
> Robert.
>
>
> On Mon, Apr 20, 2009 at 2:03 PM, david bruyer wrote:
>
>> hi robert,
>>
>> I'm compiling OSG-dev on a Mandriva 2009.0
>>
>>
>> Code:
>> [da...@mandrake ~]$ uname -a
>> Linux Mandrake 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008
>> i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
>> [da...@mandrake ~]$
>>
>>
>>
>> And i'm using the 0.4.9 version of ffmpeg
>> =>
>>
>>
>> Code:
>> [da...@mandrake ~]$ rpm -qa | grep ffmpeg
>> libffmpeg-devel-0.4.9-3.pre1.14161.1.1plf2009.0
>> libffmpeg51-0.4.9-3.pre1.14161.1.1plf2009.0
>> ffmpeg-0.4.9-3.pre1.14161.1.1plf2009.0
>> [da...@mandrake ~]$
>>
>>
>>
>> Thanks for your interest
>> David
>>
>> --
>> Read this topic online here:
>> http://forum.openscenegraph.org/viewtopic.php?p=10430#10430
>>
>>
>>
>>
>>
>> ___
>> 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] OpenSceneGraph / Webaddon3D (GPU)

2009-04-20 Thread Robert Osfield
Hi Adrian,

On Mon, Apr 20, 2009 at 2:23 PM, Adrian Egli OpenSceneGraph (3D)
<3dh...@gmail.com> wrote:
>
> Well the current version just send us just feedback that the program ended 
> correctly. But i am thinking of sending back to our server some rendering 
> checks, for example. depth buffer info, color at some predefined points after 
> start up / initialisation. so we would be able to understand wether the 
> application renders correct or not. Or do you have a better idea for future 
> improvement.


The "ideal" info would be whether everything rendered correctly and
with stable framerate of acceptable magnitude (i.e. 30/60fps).   Alas
getting whether info on rendering quality is hard to get, it requires
end users to know what to expect and report problems.

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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Robert Osfield
Hi David,

Did the changes that the compiler and J-S suggested work?

Robert.

On Mon, Apr 20, 2009 at 2:03 PM, david bruyer  wrote:

> hi robert,
>
> I'm compiling OSG-dev on a Mandriva 2009.0
>
>
> Code:
> [da...@mandrake ~]$ uname -a
> Linux Mandrake 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008
> i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
> [da...@mandrake ~]$
>
>
>
> And i'm using the 0.4.9 version of ffmpeg
> =>
>
>
> Code:
> [da...@mandrake ~]$ rpm -qa | grep ffmpeg
> libffmpeg-devel-0.4.9-3.pre1.14161.1.1plf2009.0
> libffmpeg51-0.4.9-3.pre1.14161.1.1plf2009.0
> ffmpeg-0.4.9-3.pre1.14161.1.1plf2009.0
> [da...@mandrake ~]$
>
>
>
> Thanks for your interest
> David
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10430#10430
>
>
>
>
>
> ___
> 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] anaglyphic OSG_STEREO and rotated cameras

2009-04-20 Thread Robert Osfield
Hi Dardo,

The inbuilt stereo support assumes a power wall setup.

If you want to do fine grained control of stereo as you'll need to novel
display setups you'll need to set up the cameras by hand.

Robert.

On Mon, Apr 20, 2009 at 2:01 PM, Dardo D Kleiner - CONTRACTOR <
dklei...@cmf.nrl.navy.mil> wrote:

> I have a modified osgViewer::View with a setUpViewForXXX that configures
> my 3-projector system for a hemispherical screen.  All I  do is rotate
> the left and right cameras by about 41 degrees in each direction.  In
> normal operation, the app I'm running (ossimplanetviewer) looks fantastic.
> When I turn on OSG_STEREO in anaglyphic mode the center pipe looks great
> but the left and right displays are "way off" (by some definition of the
> term, I don't know how to better describe it).  Is there something obvious
> that would prevent this from "just working", and more importantly is there
> some quick fix I can apply to correct the configuration?
>
> Many thanks for the great work!
>
> - Dardo
> ___
> 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] CullCallback problem

2009-04-20 Thread Robert Osfield
Hi Hagen,

There is too many unkowns about your scene graph and cull callback set up to
know what might be wrong, but the culling code in CullVisitor is *very* well
tested, it's been tested in current form by thousands of developers over
many years and has no known bugs.

Robert.

On Mon, Apr 20, 2009 at 12:07 PM, Hagen  wrote:

> Hi,
>
> I have made a simple scenegraph
> a posititonattitudetransform with a geode as child that has a sqhere with
> radius 0.05 as drawable
> i then set the cullcallback of the positionattributetransform to a
> customized one.
> the cullcallback tries to check for actual visibility like this
>
> traverse(node,nv);
> if (!((osgUtil::CullVisitor*)nv)->isCulled(*node))
>   ...
>  else
>  ...
>
> The problem now:
> Although i clearly see my sqhere on screen the isCulled-Check is always
> true.
> How can that be?
>
> Thank you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10416#10416
>
>
>
>
>
> ___
> 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] 3D Point to ScreenSpace Coordinates

2009-04-20 Thread Robert Osfield
Hi Hagen,

You'll need to multiply the local vertex by Model*View*WindowMatrix.  The
Model matrix comes from the scene graph, you can use
node->getWorldMatrices() for this, the View matrix comes from the Camera,
and the WindowMatrix you can get from the camera viewport.

Robert.



On Mon, Apr 20, 2009 at 12:00 PM, Hagen  wrote:

> Hi,
>
> given a 3d Point and i want to know the corresponding screenspace
> coordinates.
> given a
> osg::Vec3 p
>
> do i have to do that this way?
> osg::vec3 result = p * viewer->getViewMatrix();
> and then i just ignore z?
>
> Thank you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10412#10412
>
>
>
>
>
> ___
> 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] Back and trawling through backlog...

2009-04-20 Thread Robert Osfield
2009/4/20 Carlos M. Gutiérrez Ceñal 

>  Hi Robert,
>
> remember to look for the database pager bug ;)
>

Thanks for the reminder.  It's still on my TODO list.

Could you explain how I might reproduce the problem as none of the OSG
examples have a problem like this.  Once I can reproduce the bug I can then
fix the code and confirm that it's fixed.

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


Re: [osg-users] osgCuda / osgCompute now available

2009-04-20 Thread Robert Osfield
Hi Mick,

Congrats on the release ;-)

Robert.

On Mon, Apr 20, 2009 at 10:22 AM, Mick  wrote:

> Hi OSG-Community,
>
> we just released a first developer version of osgCuda which is based on the
> osgCompute library
> and implements the specific functionality for NVIDIA's CUDA. It gives the
> user the possibility to
> jump to the Graphics Processing Unit (GPU) within the OSG scenegraph for
> any kind of calculations.
> The manipulated data is then afterwards available to the scenegraph for
> further processing (e.g. rendering).
>
> Here you can find more detailed information and examples:
> http://www.cg.informatik.uni-siegen.de/svt/osgcompute/
>
> For support please subscribe to the  public mailing list (
> http://www.openscenegraph.org/projects/osg/wiki/MailingLists) of
> OpenSceneGraph or go directly to the/this
> OpenSceneGraph forum (http://forum.openscenegraph.org/)  which is
> synchronized with the mailing lists.
>
> Best regards,
> Mick
>
> 
> SVT Group
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10390#10390
>
>
>
>
>
> ___
> 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] Erratic intersections with long line segments

2009-04-20 Thread Robert Osfield
2009/4/20 David Karlsson 

>  Hi,
> We also created a version with doubles for the project that I'm working on.
> (The reason for this was that we needed to calculate the derivative of a
> geocentric terrain given a lat/long coordinate.) It would be convenient for
> us if this option was given as a cmake flag. I'm pretty new to osg so my
> question is basically what "it never got into the trunk" means - was it not
> a good idea? Why has it been rejected?
>


The submission wasn't merged as is I don't feel it's appropriate to manage
the internal double support as an optional compile, rather we should have
two LineSegment compute methods - one using doubles, and one using floats
and have a setting to switch between the two at runtime.  You needn't even
need a separate class for it.

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


Re: [osg-users] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread david bruyer
hi robert,

I'm compiling OSG-dev on a Mandriva 2009.0


Code:
[da...@mandrake ~]$ uname -a
Linux Mandrake 2.6.22.19-desktop-2mdv #1 SMP Mon May 5 20:55:05 EDT 2008 i686 
Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
[da...@mandrake ~]$



And i'm using the 0.4.9 version of ffmpeg
=>


Code:
[da...@mandrake ~]$ rpm -qa | grep ffmpeg
libffmpeg-devel-0.4.9-3.pre1.14161.1.1plf2009.0
libffmpeg51-0.4.9-3.pre1.14161.1.1plf2009.0
ffmpeg-0.4.9-3.pre1.14161.1.1plf2009.0
[da...@mandrake ~]$



Thanks for your interest
David

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





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


Re: [osg-users] osgdem write permission error

2009-04-20 Thread Robert Osfield
Hi Yurii,

You really just need to double check your permissions as clearly VPB is
having problems opening the file and specifically highlighting issues with
permissions.  If you really think the fault is somewhere in VPB then go
debug it - as you have all the source code.   I might have all the source
code, as do others, but we're all running VPB just fine so can't reproduce
the problems you are seeing.

Robert.

On Thu, Apr 16, 2009 at 10:39 AM, Yurii Monakov  wrote:

> Hi All!
>
> I have a problem generating whole planet elevation database from SRTM 1 km
> source ( 43200x21600 )
> and custom *.vrt file:
>
> 
>  
>Gray
>MSB
>orthoplus.bin
>  
> 
>
> osgdem command line looks like:
> osgdem --geocentric --whole-globe -l 3 -d test.vrt
>
> And this is what osgdem outputs:
>
> --geocentric
> -d test.vrt
> loaded layer test.vrt
> Adding terrainTile
> DataSet::_run() 0 0
> started DataSet::createDestination(8)
> Time for after_reproject 0.09
> AR=2.00 C1=2 R1=1
> createNewDestinationGraph
> Time for _destinationGraph->computeMaximumSourceResolution() = 0.013281
> Time for createDestinationGraph 0.217807
> Time for after_computeNeighbours 0.022597
> completed DataSet::createDestination(8)
> There are 1 contributing source files:
> test.vrt
> mkpath()
> Need to create output task directory = output_root_L0_X0_Y0
> mkpath(output_root_L0_X0_Y0)
>created directory output_root_L0_X0_Y0
> Task output directory = output_root_L0_X0_Y0\
> started DataSet::writeDestination(output.ive)
> _readRow 1
>reading tile level=0 X=0 Y=0
> DestinationTile::readFrom(SetName=, FileName=test.vrt)
> _equalizeRow 1
>equalizing tile level=0 X=0 Y=0
> _writeRow 1
>getDirectory()=
>writeNodeFile = 0 X=0 Y=0 filename=output.ive
> _writeNodeFile(output.ive)
> vpb::access(output.ive, W_OK)=-1
> vpb::access(., W_OK)=0
> Error: do not have write permission to write out file output.ive
> Caught exception : Error: do not have write permission to write out file
> output.ive
>
> Thanks, YM
>
> PS. test.vrt and elevation file (orthoplus.bin) are on the path, there is
> enough free disk space and all output folders are not write-protected.
> PPS. Using osg v.2.8.0 and vpb v.0.9.10
>
> ___
> 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] anaglyphic OSG_STEREO and rotated cameras

2009-04-20 Thread Dardo D Kleiner - CONTRACTOR

I have a modified osgViewer::View with a setUpViewForXXX that configures
my 3-projector system for a hemispherical screen.  All I  do is rotate
the left and right cameras by about 41 degrees in each direction.  In
normal operation, the app I'm running (ossimplanetviewer) looks fantastic.
When I turn on OSG_STEREO in anaglyphic mode the center pipe looks great
but the left and right displays are "way off" (by some definition of the
term, I don't know how to better describe it).  Is there something obvious
that would prevent this from "just working", and more importantly is there
some quick fix I can apply to correct the configuration?

Many thanks for the great work!

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


Re: [osg-users] setUseLocalParticleSystem(false) make FireEffect can't be seen

2009-04-20 Thread Robert Osfield
HI Renl iwei,

Have a look at the osgparticleeffects example, it has a specific code path
for when a particle effect is attached to a moving object.

Robert.

2009/4/19 renlw 

>  Hi,
> I add a FireEffect into scene under a MatrixTransform node, and 
> setUseLocalParticleSystem(false)
> to let its father's matrix applied to the effect, code like this:
> osgParticle::FireEffect* fire = new
> osgParticle::FireEffect(osg::Vec3d(0,0,0), 10.f);
> fire->setUseLocalParticleSystem(false);
> root->addChild(fire); // root is a MatrixTransform
> But i cant find the fire in the scene then[image: 难过 图释]
>Could anybody be so pleased to show me the reason.
>
> -renliwei
>
> ___
> 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] Exporting from Blender

2009-04-20 Thread Ümit Uzun
Hi Jordan;

I can export materials but I haven't tried exporting Light. And I think it
can't be supported by osgexport.
I mean by "hierarchical mode" your created scene graph nodes. I am new on
Blender too, so I don't know much about exporter, I know only experimented
functionalties by myself.

regards.

2009/4/20 Lars Jordan 

> Hi Ümit,
>
> are you also exporting materials or lights? What is your experience with
> these artefacts? What do you mean with "hierarchical mode"?
>
>
> Lars
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10422#10422
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


Re: [osg-users] Changing OSG License to GPL

2009-04-20 Thread Robert Osfield
Hi Coz,

I can't add much to what everyone else has said in this thread.  The OSG is
compatible with GPL'd apps.  You can also create your own code that extends
the OSG that is GPL'd.  The LGPL does premit you to distribute under GPL as
well so again you can do this.  However, it does effectively bar you changes
form being merged with the OSG as I'm not going to merge changes that change
code that is OSGPL/LGPL to GPL as it would preclude the use of the OSG by
the majority of it's user base.  This would mean you'll have to maintain a
branch of the code yourself.  Frankly this would be a bit dumb, licensing
under the OSGPL/LGPL would not curtail your own usage of your codes and it
would enable your changes if deemed appropriate to be merged in to the core
OSG and matinained/improved by the rest of the OSG community.

Robert.

2009/4/17 Eduardo Alberto Hernández Muñoz 

> Hi list,
>
> I'm interested in taking some code from osgFX( particulary cartoon and
> bump mapping ), modifying it, and putting the result under the GPL.
> Since the OpenSceneGraph Public License is based on the LGPL, and the
> LGPL permits switching to the GPL, you would think I just have to
> change any references.
>
> However at http://www.openscenegraph.org/projects/osg/wiki/Legal it
> reads "You may not distribute the source code or libraries under any
> other license, unless authorised to do so by the Copyright holders.",
> so it contradicts itself.
>
> My question( mostly directed at Robert ) is if the OSGPL permits
> switching to the GPL. If it does not, I would like to request
> permission, and in the case you are not the copyright holder, if you
> could point me in the direction of that person.
>
> If you are interested in knowing what kind of changes I want to make,
> it's to separate them from osgFX:: Effect class( maybe subclass from
> osg:: Group ), allow them to be mixed with the ambient color, allow
> the Cartoon effect to select the texture unit and remove the outline(
> and possibly try to avoid using fragment programs at all ), and for
> the bump mapping effect to not require a diffuse texture.
>
> - Coz
> ___
> 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] terrain database popping...

2009-04-20 Thread Robert Osfield
Hi Shayne,

How much popping you'll see depends upon your database, database pager
configuration and hardware.  To reduce popping you basically want the higher
level of details to pop in sooner so the transition happens with a smaller
pixel shift.   You have provided any info about your specific database
setup/OSG version/hardware target etc. so I can't really add much more.

W.r.t fade lod, this might be the way forward, but it would require creating
a new node in the LOD to support it.  It would be a useful feature to have
in the OSG, and these days with frame buffer object being readily available
it's should certainly be easier now to implement it than ever before.  How
to go about it is a long topic of conservation though so I won't dive into
it right now.

W.r.t looking at alternative terrain systems, such as libmini, this might
offer a solution, but it will only deal with the terrain not the extra
cultral information that might be in your scene.  It'd also require you to
rebuild your databases.

W.r.t VirtualTerrainProject, unless it now start fully support paged
databases and double matrices I would suggest you give it a miss as it'll
complicate your application a lot whilst curtailing the scalability of the
OSG.

Robert.

On Tue, Apr 14, 2009 at 4:59 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC  wrote:

>  Just a quick question for the experts out there…
>
>
>
> When I’m flying through my terrain database, I’m seeing a lot of “popping”
> as the database pager brings in higher LODs of terrain. My question is, is
> there a way to minimize this popping? Is there any geomorphing support in
> the way OSG pages in the terrain? If there’s no geomorphing support to
> smooth out the LOD transitions across several rendering frames, that would
> be a nice feature to have in a future release…J
>
>
>
> Thanks in advance…
>
> -Shayne
>
> ___
> 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] cannot set child stateset in pagedLOD?

2009-04-20 Thread Robert Osfield
Hi Ufuk,

I can't say why you aren't achieving the result you want.  State inheritance
is well tested part of the OSG, and the use of PagedLOD has no baring on it,
so my guess is that something has gone amiss in your scene graph setup.

One item that looks a bit odd with your data is that you have four children
of the PagedLOD that all have the same distance range, while this is
probably legal usage, it certainly isn't something I would recommend.
Instead put all the children of the same distance range under a single
group, and have this group as a single external tile.  This is how
VirtualPlanetBuilder creates it's paged quad tree.

Robert.

On Fri, Apr 17, 2009 at 2:01 PM, Ufuk  wrote:

> Hi,
> i have an .osg file which is like this:
>
> PagedLOD {
>   nodeMask 0x
>   cullingActive TRUE
>   Center 512 512 0
>   Radius 724.077
>   RangeMode DISTANCE_FROM_EYE_POINT
>   RangeList 5 {
> 1448.15 5792.62
> 0 1448.15
> 0 1448.15
> 0 1448.15
> 0 1448.15
>   }
>   NumChildrenThatCannotBeExpired 0
>   FileNameList 5 {
> ter_0_0_0.ive
> ter_1_0_0.osg
> ter_1_1_0.osg
> ter_1_0_1.osg
> ter_1_1_1.osg
>   }
>   num_children 0
> }
>
> and every .osg file which is in this file is like this file. they have 1
> ive file and 4 osg files.
>
> by this method, we are loading child nodes in paging.
>
> here i want to render all of these in a shader. So i set the parent node
> stateSet but childs does not effect :(
>
> do you have any idea why i cant set the child node's stateset by changing
> the stateset of parent?
>
>
>
> --
> Ufuk
>
> ___
> 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] Exporting from Blender

2009-04-20 Thread Lars Jordan
Hi Ümit,

are you also exporting materials or lights? What is your experience with these 
artefacts? What do you mean with "hierarchical mode"?


Lars

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





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


Re: [osg-users] Exporting from Blender

2009-04-20 Thread Ümit Uzun
Hi Jordan;

If you organize your model and save them in osg format in hierarchical mode
I advice you to use Blender and so osgexport. I have been using this
exporter and it is as successful as many operation. Although it had been
updated too long time ago, it can work with new Blender version 2.48a. I
have tried, trust me :)

And as you can see from the examples which are in the osgexport folder, you
can create animated model by using armetures and export in osg format and
use your animated model with glad :D

Hope this helps.

2009/4/20 Lars Jordan 

> Hi,
>
> I am currently looking for a good working tool to export blender models to
> osg.
>
> The first thing I had found was the osgexport project in the blender
> community (http://projects.blender.org/projects/osgexport/). Unfortunately
> this one is rather old and it seems that it is not actively maintained any
> longer - at least there is no newer version than for blender 2.42.
>
> The second approach I found is osgAnimation which seems to be currently
> under development (Is this one only for animations or can the exporter be
> used as a general exporter?). Up until now I havent found the time to use it
> - just found it ;-)
>
> Are there any other alternatives that could be recommeneded? It's important
> that I can edit the scenegraph (change names of osg nodes) after having
> exported it from blender. Currently I am doing this with osgDirector. It
> would also be great if the tool supported other artefacts than just meshes.
>
>  The reason I am trying to go directly from .blend to .osg is that I don't
> want to insert any in-between-steps via other formats to avoid messing up
> the scenegraph structure. Nevertheless, if there are recommendable workflows
> that do not complicate the toolchain too much and that do not change the
> scenegraph to heavily I'd be glad to learn about them.
>
>
> Thanks
>
> Lars
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10420#10420
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] Exporting from Blender

2009-04-20 Thread Lars Jordan
Hi,

I am currently looking for a good working tool to export blender models to osg. 

The first thing I had found was the osgexport project in the blender community 
(http://projects.blender.org/projects/osgexport/). Unfortunately this one is 
rather old and it seems that it is not actively maintained any longer - at 
least there is no newer version than for blender 2.42.

The second approach I found is osgAnimation which seems to be currently under 
development (Is this one only for animations or can the exporter be used as a 
general exporter?). Up until now I havent found the time to use it - just found 
it ;-)

Are there any other alternatives that could be recommeneded? It's important 
that I can edit the scenegraph (change names of osg nodes) after having 
exported it from blender. Currently I am doing this with osgDirector. It would 
also be great if the tool supported other artefacts than just meshes.

 The reason I am trying to go directly from .blend to .osg is that I don't want 
to insert any in-between-steps via other formats to avoid messing up the 
scenegraph structure. Nevertheless, if there are recommendable workflows that 
do not complicate the toolchain too much and that do not change the scenegraph 
to heavily I'd be glad to learn about them.


Thanks 

Lars

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





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


Re: [osg-users] OSG begginer question - osg crash on run-time

2009-04-20 Thread Sh Ha
Hi thank you both again,

after re-installing the graphics card drivers its finally working.. (grrr..)

thanks

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





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


Re: [osg-users] Initial cut at CMake support + branch of osgEphemeris

2009-04-20 Thread Robert Osfield
HI Philip + Mattias,

On Thu, Apr 16, 2009 at 10:38 PM, Mattias Helsing wrote:

> Hi Robert,
>
> Philip was right on track and attached is the proof.


Cool, it works fine for me under Linux, fix now merged and submitted to
svn.


> I tried to build it on WinXP some days ago and succeeded with a few
> tweaks to the cmake files. Not sure if you are interested or where you
> are going with osgEphemeris in svn but will submit the changes and let
> you decide.
>

Getting osgEphemeris to compile easily against up to date versions of the
OSG is my immediate aim.  Thanks to your fix this now works :-)

Plans after this aren't too specific.  I would like to see the OSG support
an ephemeris model out of the box, but one that seamlessly handles whole
earth databases with movement near to the gound to outside the atmosphere.
osgEphemeris doesn't have this capability, so it'd either have to be added
to it, or for a new NodeKit with this capability to be written.

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


Re: [osg-users] [build] osgText crashes win32 w/ certain link orders

2009-04-20 Thread Robert Osfield
Hi Aron,

I don't know why the link order makes a difference, but it does sound like a
compile/linker bug to me.

> In the debugger, it appears that osgText's osgDrawable parent members were
not > initialized... they were garbage like 222313 parents after the osgText
was constructed.

osgText::Text relies upon osg::Drawable constructor for initialization of
the parent pointers.  By default it should be just an empty list of
std::vector.

Again this would seem to be compiler/linker issue as the code is correct.

Robert.



On Thu, Apr 16, 2009 at 10:23 PM, Aron  wrote:

> Hello,
>
> Many thanks to the "community" for a great scenegraph! I'm a new user but
> hope to contribute someday...
>
> Anyway, I found this out the hard way on OSG 2.8.0...
>
> Take any program w/ osgText (examples/osgtext in the distro works fine).
>
> Change link options to link with these OSG libs, in this order:
>
>
> Code:
> osg.lib osgUtil.lib osgDB.lib osgText.lib osgVolume.lib
>
>
>
> The exe will link fine, but as soon as you create an osgText... CRASH!!!
>
> Now link with these osg libs, just like the Visual studio project does:
>
>
> Code:
> OpenThreads.lib osg.lib osgDB.lib osgUtil.lib osgGA.lib osgViewer.lib
> osgText.lib
>
>
>
> Works fine!
>
> I haven't gone in to figgure out why, I just wanted to throw this out there
> in case others have an exe where osgText does nothing but crash -- this may
> help.
>
> In the debugger, it appears that osgText's osgDrawable parent members were
> not initialized... they were garbage like 222313 parents after the osgText
> was constructed.
>
> Happy OSGing.
>
> -Aron B.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10323#10323
>
>
>
>
>
> ___
> 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] CullCallback problem

2009-04-20 Thread Hagen
Hi,

I have made a simple scenegraph
a posititonattitudetransform with a geode as child that has a sqhere with 
radius 0.05 as drawable
i then set the cullcallback of the positionattributetransform to a customized 
one.
the cullcallback tries to check for actual visibility like this

traverse(node,nv);
if (!((osgUtil::CullVisitor*)nv)->isCulled(*node))
   ...
 else
  ...

The problem now:
Although i clearly see my sqhere on screen the isCulled-Check is always true.
How can that be?

Thank you.

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





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


Re: [osg-users] 1D texture loading by model loading plugins

2009-04-20 Thread Robert Osfield
Hi Coz,

Is there a reason why you want them to use Texture1D instead of Texture2D?
A 1D Texture2D will behave pretty well th same a Texture1D.  Putting in
detection code would just waste time and add potential for coding errors.

Robert.

2009/4/16 Eduardo Alberto Hernández Muñoz 

> Hi list,
>
> it seems that currently none of the model loading plugins can load a
> 1D texture( did a quick grep for Texture1D ), except the .osg and .ive
> formats. If you try loading a .png file with a height and depth of 1,
> loading fails( as it probably tries to load it as a Texture2D ), and ,
> and I'm not aware of any image file formats made for 1D textures( and
> I doubt there is the need for one ).
>
> Would it be fine if I sent a patch to make it so the loaders check if
> the texture's height is 1, and if so load the files as a
> Texture1D instead of a Texture2D ?
>
> I'm specially interested in doing this for the .ac and .3ds format.
>
> - Coz
> ___
> 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] How to Read Symbols from "ttf" file and using them as osgText ?

2009-04-20 Thread Robert Osfield
Hi RJ,

I don't have time to go chasing examples and fonts.  The osgtext examples
shows how to set the font on osgText::Text obejcts... so please read this.
Looks for cases of text->setFont(fontfilename);

Robert.

On Thu, Apr 16, 2009 at 4:29 PM, Rahul Jain  wrote:

> Hi Guys
>
> I have a font file in ".ttf" format with  mainly symbols. I want to use
> these symbols as osgText::Text in my application. I am not able to
> understand what should I specify in "text->setString" Function so that I can
> visualize the symbols. I am attaching the font file which i am using as test
> case. The fonts can be visualized in a small standalone application which
> can be downloaded from "http://us.fontviewer.de/";.  It will be great if
> somebody can tell me how can these fonts be used as normal text.
>
> Cheers
> RJ
>
> ___
> 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] 3D Point to ScreenSpace Coordinates

2009-04-20 Thread Hagen
Hi,

given a 3d Point and i want to know the corresponding screenspace coordinates.
given a
osg::Vec3 p

do i have to do that this way?
osg::vec3 result = p * viewer->getViewMatrix();
and then i just ignore z?

Thank you.

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





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


Re: [osg-users] Ask for osgProducer pagkage

2009-04-20 Thread Robert Osfield
Hi Doung,

These tutorials need updating to use osgViewer.  Could you provide a link to
them?

Robert.

On Thu, Apr 16, 2009 at 2:59 PM, Duong  wrote:

> Hi,
>
> I am a beginner, I look at some tutorials and see that they require
> osgProducer in their included files, but i can not find where the folder
> lies on OSG. Anyone please sends me a osgProducer pakage which I can add
> into include folder of my OSG.
>
> Thanks in advance!
> Regards!
>
> Duong
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10303#10303
>
>
>
>
>
> ___
> 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] multiple paging contexts...

2009-04-20 Thread Robert Osfield
Hi Shayne,

The pager will work fine with two separate view points.   The page itself
doesn't track view points so doesn't care, all it cares about is what tiles
are being requested, and what tiles have expired.

Robert.

On Thu, Apr 16, 2009 at 4:11 PM, Tueller, Shayne R Civ USAF AFMC 519
SMXS/MXDEC  wrote:

>  Does anyone know if OSG supports multiple paging contexts into the same
> database? For example let’s say I have two different viewpoints (cameras)
> positioned in a VPB database. Will each camera page in its own LOD which is
> independent of the other even though they’re accessing the same terrain
> database?
>
>
>
> Thanks,
>
> -Shayne
>
> ___
> 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] OpenScenegraph MFC application freezes in Vista when cpu is maxed out.

2009-04-20 Thread Can T. Oguz
CWnd::OnDraw should be CView::OnDraw(); if it's a CWnd then it's
CWnd::OnPaint()

2009/4/20 Can T. Oguz 

> I think it's better not to call frame() within BeginPaint() / EndPaint()
> block. That's the main difference of CWnd::OnDraw(). We don't care about the
> invalidated region of Windows, so you can call frame() later, and do not
> forget to disable background erasing which also has no use in an OSG window.
>
>
> 2009/4/20 Jesper D. Thomsen 
>
>>  Hi, and thank you for answering.
>>
>> I'm currently doing that by calling frame() within my OnDraw() handler,
>> but I'm suspecting (without any proof) that it gets called too often
>> somehow, and that there's some queuing within OSG that I'm not using
>> properly. When calling a pure OpenGL rendering pipeline from OnDraw() (the
>> old viewport renderer which OSG is replacing) I do not have the problem.
>>
>>
>> Jesper D. Thomsen
>>
>> **
>>
>>  --
>> *From:* osg-users-boun...@lists.openscenegraph.org [
>> osg-users-boun...@lists.openscenegraph.org] On Behalf Of Can T. Oguz [
>> cto...@gmail.com]
>> *Sent:* Monday, April 20, 2009 12:41 PM
>> *To:* OpenSceneGraph Users
>> *Subject:* Re: [osg-users] OpenScenegraph MFC application freezes in
>> Vista when cpu is maxed out.
>>
>>   Hi,
>>
>> You may want to try posting frame requests as windows messages (via
>> PostMessage()). Call frame() within the handler.
>>
>> Regards,
>>
>> Can
>>
>>
>> 2009/4/20 Jesper D. Thomsen 
>>
>>>  Hi all, I have a somewhat irritating error in Vista (and to a lesser
>>> degree Windows XP).
>>>
>>> I'm using OSG 2.6.1 to render a viewport in an MFC application (built in
>>> Visual Studio 2005 SP1). I'm running in single-threaded mode (although I
>>> have tried multithreaded also without any luck). I'm manually calling frame
>>> when I want the viewport to be updated rather than using run(), as I don't
>>> want to waste cpu/gpu on redrawing a stationary viewport. My problem is that
>>> when I have a somewhat complex model loaded, the cpu-load on the single core
>>> sometimes spikes out at maximum load when doing updates fast (such as during
>>> a fast drag). When this happens the machine often freezes the OSG viewport
>>> (and the cpu load continues at maximum for a single core). In Vista I have
>>> to terminate the application, but in Windows XP I can change focus to
>>> another application window and the viewport returns to normal (0% cpu load)
>>> when I switch back to my application.
>>>
>>> I'm all out of ideas as to exactly why this happens, as I don't
>>> completely understand if I'm allowed to call frame() rapidly or not. I'm
>>> looking for a function which can tell me if the previous frame() has
>>> completed, in order to not call a new frame() before the previous is done. I
>>> don't believe this should be necessary, but I have obviously done something
>>> to offend OSG :)
>>>  Any ideas or insights will be much appreciated.
>>>
>>> regards, and thanks in advance.
>>>
>>>
>>> Jesper D. Thomsen
>>>
>>> **
>>>
>>> ___
>>> 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] OpenScenegraph MFC application freezes in Vista when cpu is maxed out.

2009-04-20 Thread Can T. Oguz
I think it's better not to call frame() within BeginPaint() / EndPaint()
block. That's the main difference of CWnd::OnDraw(). We don't care about the
invalidated region of Windows, so you can call frame() later, and do not
forget to disable background erasing which also has no use in an OSG window.

2009/4/20 Jesper D. Thomsen 

>  Hi, and thank you for answering.
>
> I'm currently doing that by calling frame() within my OnDraw() handler, but
> I'm suspecting (without any proof) that it gets called too often somehow,
> and that there's some queuing within OSG that I'm not using properly. When
> calling a pure OpenGL rendering pipeline from OnDraw() (the old viewport
> renderer which OSG is replacing) I do not have the problem.
>
>
> Jesper D. Thomsen
>
> **
>
>  --
> *From:* osg-users-boun...@lists.openscenegraph.org [
> osg-users-boun...@lists.openscenegraph.org] On Behalf Of Can T. Oguz [
> cto...@gmail.com]
> *Sent:* Monday, April 20, 2009 12:41 PM
> *To:* OpenSceneGraph Users
> *Subject:* Re: [osg-users] OpenScenegraph MFC application freezes in Vista
> when cpu is maxed out.
>
>   Hi,
>
> You may want to try posting frame requests as windows messages (via
> PostMessage()). Call frame() within the handler.
>
> Regards,
>
> Can
>
>
> 2009/4/20 Jesper D. Thomsen 
>
>>  Hi all, I have a somewhat irritating error in Vista (and to a lesser
>> degree Windows XP).
>>
>> I'm using OSG 2.6.1 to render a viewport in an MFC application (built in
>> Visual Studio 2005 SP1). I'm running in single-threaded mode (although I
>> have tried multithreaded also without any luck). I'm manually calling frame
>> when I want the viewport to be updated rather than using run(), as I don't
>> want to waste cpu/gpu on redrawing a stationary viewport. My problem is that
>> when I have a somewhat complex model loaded, the cpu-load on the single core
>> sometimes spikes out at maximum load when doing updates fast (such as during
>> a fast drag). When this happens the machine often freezes the OSG viewport
>> (and the cpu load continues at maximum for a single core). In Vista I have
>> to terminate the application, but in Windows XP I can change focus to
>> another application window and the viewport returns to normal (0% cpu load)
>> when I switch back to my application.
>>
>> I'm all out of ideas as to exactly why this happens, as I don't completely
>> understand if I'm allowed to call frame() rapidly or not. I'm looking for a
>> function which can tell me if the previous frame() has completed, in order
>> to not call a new frame() before the previous is done. I don't believe this
>> should be necessary, but I have obviously done something to offend OSG :)
>>  Any ideas or insights will be much appreciated.
>>
>> regards, and thanks in advance.
>>
>>
>> Jesper D. Thomsen
>>
>> **
>>
>> ___
>> 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] Skybox example problem

2009-04-20 Thread Robert Osfield
2009/4/16 Großer Martin 

> Hello Robert,
>
> I'm sorry, thats right. I mean the osgvertexprogram. This example use a
> Skybox. When I zoom out or when I use a bigger scene then I get
> artefacts in the Skybox. When I change the following line from ...
>
> clearNode->setRequiresClear(false);
>
> ... in ...
>
> clearNode->setRequiresClear(true);
>
> ... then the environment sphere go missing and I see the clear color.
>
> Now again my questions. Is the problem the distance of the far clipping
> plane? And I think the environment sphere is translate with the eye
> position?
>

I didn't write the example. But best guess would be that sphere gets culled
or something similar.

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


Re: [osg-users] vertex data in byte precision

2009-04-20 Thread Robert Osfield
Hi Luigi,

I don't know whether this would be an OpenGL driver issue or an OSG one.
Neither are going to like byte vertex data very much though as both are
written around vertex data being a float property.

Robert.

On Thu, Apr 16, 2009 at 1:58 AM, Luigi Calori  wrote:

> Probably a newbie question:
>
> Is it possible to store vertex data in byte array like Vec3bArray ?
>
> I' ve tried but it seem not allowed: I obtain crash when call
> setVertexArray
> Is it something dependent on driver?
>
> I attach two sample files, short working, byte hanging
>
> Thanks
>   Luigi
>
> Group {
>  UniqueID Group_0
>  nodeMask 0x
>  cullingActive TRUE
>  num_children 2
>  ClearNode {
>nodeMask 0x
>cullingActive FALSE
>StateSet {
>  DataVariance STATIC
>  rendering_hint DEFAULT_BIN
>  renderBinMode USE
>  binNumber -1
>  binName RenderBin
>}
>requiresClear TRUE
>clearColor 0 0 0 1
>clearMask 16640
>  }
>  Geode {
>nodeMask 0x
>cullingActive TRUE
>StateSet {
>  DataVariance STATIC
>  rendering_hint DEFAULT_BIN
>  renderBinMode INHERIT
>  GL_LIGHTING OFF
>  GL_DEPTH_TEST OFF
>  GL_BLEND ON
>  0x8861 ON
>  Point {
>size 20
>fade_threshold_size  1
>distance_attenuation  1 0 0
>  }
>  BlendFunc {
>source SRC_ALPHA
>destination DST_ALPHA
>  }
>  textureUnit 0 {
>GL_TEXTURE_2D ON
>Texture2D {
>  file "Images/particle.rgb"
>  wrap_s CLAMP
>  wrap_t CLAMP
>  wrap_r CLAMP
>  min_filter LINEAR_MIPMAP_LINEAR
>  mag_filter LINEAR
>  maxAnisotropy 1
>  borderColor 0 0 0 0
>  borderWidth 0
>  useHardwareMipMapGeneration TRUE
>  unRefImageDataAfterApply FALSE
>  internalFormatMode USE_IMAGE_DATA_FORMAT
>  resizeNonPowerOfTwo TRUE
>}
>PointSprite {
>  coordOriginMode UPPER_LEFT
>}
>  }
>}
>num_drawables 1
>Geometry {
>  DataVariance STATIC
>  useDisplayList TRUE
>  useVertexBufferObjects FALSE
>  PrimitiveSets 1
>  {
>DrawArrays POINTS 0 128
>  }
>  VertexArray Vec3sArray 128
>  {
>0 11 2 3 16 0
>7 18 -8 15 14 9
>16 10 -10 4 0 -3
>5 4 -8 16 8 -11
>3 9 2 7 9 2
>7 15 -8 4 4 2
>20 19 7 5 2 4
>24 22 0 5 -1 -4
>22 9 8 10 11 8
>17 14 5 0 0 -7
>12 10 -7 8 -7 6
>10 14 4 6 4 3
>14 14 0 10 -1 6
>18 14 3 8 -4 1
>14 20 0 0 -8 3
>11 34 -4 13 -7 1
>9 16 -4 13 -5 5
>1 34 0 15 -10 -4
>15 30 3 6 0 0
>-1 21 -3 21 -8 0
>7 26 1 13 -6 2
>4 27 3 12 -10 -4
>-1 31 4 20 -15 4
>-3 24 3 23 -9 -1
>-7 22 2 36 -10 0
>-15 30 0 35 -7 3
>-20 34 0 32 -13 -2
>-6 25 2 36 -8 -3
>-23 25 -1 31 8 -1
>-24 22 0 43 5 1
>-23 8 2 28 -4 2
>-26 5 -2 41 -2 0
>-16 13 0 42 1 -2
>-18 2 0 40 7 0
>-20 -3 1 42 25 2
>-29 -3 0 36 29 3
>-30 -1 2 34 22 -2
>-14 -11 0 36 32 -1
>-18 -8 0 40 30 0
>-12 -7 0 42 38 0
>-24 -13 -1 38 45 -1
>-13 -17 0 37 38 -2
>-8 -22 1 35 48 -2
>-8 -19 1 38 49 -2
>-3 -20 -1 22 51 -1
>-10 -24 -1 29 57 0
>-7 -42 0 21 60 0
>3 -39 -1 13 55 0
>14 -40 1 16 66 1
>10 -28 1 -2 49 0
>21 -29 0 -8 65 0
>16 -37 2 -9 53 0
>32 -44 0 -9 54 1
>34 -38 0 -10 56 0
>29 -29 1 -27 56 0
>49 -31 0 -26 57 0
>57 -26 -1 -35 46 1
>62 -23 -2 -42 42 0
>49 -14 0 -30 43 1
>51 -24 -1 -36 39 -1
>57 -10 0 -47 28 0
>73 -1 1 -46 29 1
>62 0 -1 -51 16 1
>62 2 0 -50 12 -1
>  }
>  ColorBinding PER_VERTEX
>  ColorArray Vec4Array 128
>  {
>1 1 0 0.5
>1 1 0 0.5
>0.984375 0.984375 0.015625 0.507813
>0.984375 0.984375 0.015625 0.507813
>0.96875 0.96875 0.03125 0.515625
>0.96875 0.96875 0.03125 0.515625
>0.953125 0.953125 0.046875 0.523438
>0.953125 0.953125 0.046875 0.523438
>0.9375 0.9375 0.0625 0.53125
>0.9375 0.9375 0.0625 0.53125
>0.921875 0.921875 0.078125 0.539063
>0.921875 0.921875 0.078125 0.539063
>0.90625 0.90625 0.09375 0.546875
>0.90625 0.90625 0.09375 0.546875
>0.890625 0.890625 0.109375 0.554688
>0.890625 0.890625 0.109375 0.554688
>0.875 0.875 0.125 0.5625
>0.875 0.875 0.125 0.5625
>0.859375 0.859375 0.140625 0.570313
>0.859375 0.859375 0.140625 0.570313
>0.84375 0.84375 0.15625 0.578125
>0.84375 0.84375 0.15625 0.578125
>0.828125 0.828125 0.171875 0.585938
>0.828125 0.828125 0.171875 0.585938
>0.8125 0.

Re: [osg-users] OverlayNode question

2009-04-20 Thread Robert Osfield
Hi Paul,

osgSim::OverlayNode is for rendering subgraph to texture that is then
overlayed on top of a scene graph as a texture layer using multi-texturing.
Have a look at the osggeometry or osgsimiluation exampes as they both have
code paths that illustrate OverlayNode.



On Wed, Apr 15, 2009 at 9:47 PM,  wrote:

>
> Can somebody give me a explanation of how an OverlayNode is used?
>
> I need to render some geometry stuff (i.e. geopolitical, grid lines) on top
> of terrain elevation geometry and currently, I'm rendering to a texture and
> laying this texture on my terrain polygons.
>
> Should I be using an Overlay node for this? If so, I'm confused by how the
> OverlayNode should be configured.
>
> Thanks,
> Paul P.
>
>
>
> ___
> 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] OpenScenegraph MFC application freezes in Vista when cpu is maxed out.

2009-04-20 Thread Jesper D. Thomsen
Hi, and thank you for answering.

I'm currently doing that by calling frame() within my OnDraw() handler, but I'm 
suspecting (without any proof) that it gets called too often somehow, and that 
there's some queuing within OSG that I'm not using properly. When calling a 
pure OpenGL rendering pipeline from OnDraw() (the old viewport renderer which 
OSG is replacing) I do not have the problem.

Jesper D. Thomsen

From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Can T. Oguz 
[cto...@gmail.com]
Sent: Monday, April 20, 2009 12:41 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] OpenScenegraph MFC application freezes in Vista when 
cpu is maxed out.


Hi,

You may want to try posting frame requests as windows messages (via 
PostMessage()). Call frame() within the handler.

Regards,

Can


2009/4/20 Jesper D. Thomsen mailto:j...@anybodytech.com>>
Hi all, I have a somewhat irritating error in Vista (and to a lesser degree 
Windows XP).

I'm using OSG 2.6.1 to render a viewport in an MFC application (built in Visual 
Studio 2005 SP1). I'm running in single-threaded mode (although I have tried 
multithreaded also without any luck). I'm manually calling frame when I want 
the viewport to be updated rather than using run(), as I don't want to waste 
cpu/gpu on redrawing a stationary viewport. My problem is that when I have a 
somewhat complex model loaded, the cpu-load on the single core sometimes spikes 
out at maximum load when doing updates fast (such as during a fast drag). When 
this happens the machine often freezes the OSG viewport (and the cpu load 
continues at maximum for a single core). In Vista I have to terminate the 
application, but in Windows XP I can change focus to another application window 
and the viewport returns to normal (0% cpu load) when I switch back to my 
application.

I'm all out of ideas as to exactly why this happens, as I don't completely 
understand if I'm allowed to call frame() rapidly or not. I'm looking for a 
function which can tell me if the previous frame() has completed, in order to 
not call a new frame() before the previous is done. I don't believe this should 
be necessary, but I have obviously done something to offend OSG :)
Any ideas or insights will be much appreciated.

regards, and thanks in advance.


Jesper D. Thomsen



___
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] osgTerrain

2009-04-20 Thread Robert Osfield
Hi GuiYei,

The osgterrain is a little complex due to it's illustration of custom paging
and lots of command line parsing, but it is probably the best place to
learn.

Robert.

2009/4/15 GuiYe 

>
>  Hello,robert!
>  Can you provide some examples about how to use the library of osgTerrain
> except osgTerrain! The library is so complex that I don't know how to use it
> to render terrain data! Can you provide some documents about the library! On
> the other hand , I hope that the example of osgTerrain with its' own data to
> show the screenshot!Can you give me the data to run the example?
> Thank you! Good Luck!
>
>
>
> --
> 网易邮箱,中国第一大电子邮件服务商 
> ___
> 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] [build] make : Build error on FFmpegDecoder.cpp while compiling OSG-dev

2009-04-20 Thread Robert Osfield
Hi David,

Which version of ffmpeg plugin and OS are you compiling on?

Robert.

On Wed, Apr 15, 2009 at 9:45 AM, david bruyer  wrote:

> Hi,
>
> I'm trying to compile the last version of OSG-dev but I have a build error
> at the "make" :
>
>
> Code:
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:90:
> erreur: 'ENOMEM' was not declared in this scope
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:91:
> erreur: 'EILSEQ' was not declared in this scope
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:92:
> erreur: 'ENOSYS' was not declared in this scope
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:93:
> erreur: 'ENOENT' was not declared in this scope
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:
> In member function 'bool osgFFmpeg::FFmpegDecoder::readNextPacketNormal()':
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:286:
> attention : comparaison entre des expressions entières signée et non signée
> /home/player/FlightGear-dev/build/OpenSceneGraph/src/osgPlugins/ffmpeg/FFmpegDecoder.cpp:293:
> attention : comparaison entre des expressions entières signée et non signée
> make[2]: ***
> [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/FFmpegDecoder.o] Erreur 1
> make[1]: *** [src/osgPlugins/ffmpeg/CMakeFiles/osgdb_ffmpeg.dir/all] Erreur
> 2
> make: *** [all] Erreur 2
> error 4: compilation has encountered problems...
>
>
>
> Someone can help me to build OSG-dev correctly ?
>
> Thanks in advance.
> ...
> David
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10239#10239
>
>
>
>
>
> ___
> 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] OpenScenegraph MFC application freezes in Vista when cpu is maxed out.

2009-04-20 Thread Can T. Oguz
Hi,

You may want to try posting frame requests as windows messages (via
PostMessage()). Call frame() within the handler.

Regards,

Can


2009/4/20 Jesper D. Thomsen 

>  Hi all, I have a somewhat irritating error in Vista (and to a lesser
> degree Windows XP).
>
> I'm using OSG 2.6.1 to render a viewport in an MFC application (built in
> Visual Studio 2005 SP1). I'm running in single-threaded mode (although I
> have tried multithreaded also without any luck). I'm manually calling frame
> when I want the viewport to be updated rather than using run(), as I don't
> want to waste cpu/gpu on redrawing a stationary viewport. My problem is that
> when I have a somewhat complex model loaded, the cpu-load on the single core
> sometimes spikes out at maximum load when doing updates fast (such as during
> a fast drag). When this happens the machine often freezes the OSG viewport
> (and the cpu load continues at maximum for a single core). In Vista I have
> to terminate the application, but in Windows XP I can change focus to
> another application window and the viewport returns to normal (0% cpu load)
> when I switch back to my application.
>
> I'm all out of ideas as to exactly why this happens, as I don't completely
> understand if I'm allowed to call frame() rapidly or not. I'm looking for a
> function which can tell me if the previous frame() has completed, in order
> to not call a new frame() before the previous is done. I don't believe this
> should be necessary, but I have obviously done something to offend OSG :)
> Any ideas or insights will be much appreciated.
>
> regards, and thanks in advance.
>
>
> Jesper D. Thomsen
>
> * *
>
> ___
> 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] The orthographic projection near/far plane

2009-04-20 Thread Robert Osfield
Hi Kees,

I have just checked the OSG's code for setting up the Matrix from ortho
parameters and it looks like it exactly matches OpenGL definition and
language.  The code that does the work is:

void Matrix_implementation::makeOrtho(double left, double right,
   double bottom, double top,
   double zNear, double zFar)
{
// note transpose of Matrix_implementation wr.t OpenGL documentation,
since the OSG use post multiplication rather than pre.
double tx = -(right+left)/(right-left);
double ty = -(top+bottom)/(top-bottom);
double tz = -(zFar+zNear)/(zFar-zNear);
SET_ROW(0, 2.0/(right-left),   0.0,   0.0, 0.0 )
SET_ROW(1,  0.0,  2.0/(top-bottom),   0.0, 0.0 )
SET_ROW(2,  0.0,   0.0,  -2.0/(zFar-zNear), 0.0
)
SET_ROW(3,   tx,ty, tz, 1.0
)
}

Since the intention of the OSG's ortho convenience methods is to exactly
mirror that of OpenGL it does looks like to me that everything is correct
and it's just you expectations of how OpenGL/OSG works in this respect that
is off.

Robert.

On Wed, Apr 15, 2009 at 11:48 AM, Kees van Kooten <
kvankoo...@virtualproteins.com> wrote:

> Hi,
>
> I don't know whether this has been brought up before (I couldn't find any
> posts regarding this matter in the user forum), but when using the
> orthographic projection matrix's setProjectionMatrixAsOrtho(), the near/far
> plane z values supplied as arguments are not set as according to the OpenGL
> spec. Specifically, the third column of the projection matrix as applied by
> osg is:
>
> 0.0,
> 0.0,
> -2.0/(zFar-zNear),
> -(zFar+zNear)/(zFar-zNear)
>
> with zFar and zNear being the actual Z values of the far and near plane -
> as opposed to the distance to the far and near plane mentioned in the spec,
> which in practice turns out to be the negated z value of the far and near
> plane.
>
> If this has been a conscious choice, it seems highly confusing to me. For
> example, the vector (0,0,zNear,1) now transforms to
> (0,0,-(3zN+zF)/(zF-zN),1) in clip space, while the expected transformation
> would yield (0,0,-1,1). In practice, it gave me a few problems integrating
> an orthographic projection with depth to a partially rendered scene.
>
> Of course, the workaround is easy, as one should just supply the negated
> zNear and zFar to setProjectionMatrixAsOrtho(), and in a certain way this is
> all just a matter of interpretation of the function arguments. In my
> opinion, supplying the actual z values for the near and far plane is the
> more intuitive choice, as this is what the names of the function arguments
> imply.
>
> Best regards,
> Kees van Kooten
>
>
>
>
> ___
> 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] How to compile VPB in Windows With MinGW?

2009-04-20 Thread Robert Osfield
Hi Zhu Liangxiong

Did this change work?

What version of g++ are you using?  I'm compiling VPB using:

g++ --version
g++ (Ubuntu 4.3.3-5ubuntu4) 4.3.3

Robert.

On Wed, Apr 15, 2009 at 12:57 AM,  wrote:

> I download VPB 0.9.10 from SVN.and have set all required include path and
> library path/file,
> when compile ,fellowing error break the compile process.
> #error "GCC no longer implements 
> #error "Revise your code to use 
>
>
> how can I fix it?
>
>
> sincerely
>
> zhu liangxiong
>
>
>
> ___
> 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] ray tracing using OSG

2009-04-20 Thread Robert Osfield
On Tue, Apr 14, 2009 at 7:19 PM, ami guru  wrote:

> Thanks for all  the feedback
>
>
> I wondering if osgvolume is doing ray tracing and what is its type.
>
>
The osgVolume NodeKit does ray tracing in the fragment shader, but this ray
tracing is very specific to 3D textures, it doesn't work for geometric
models.

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


Re: [osg-users] How to share texture object when loading a model many times?

2009-04-20 Thread Robert Osfield
Hi Roger,

You make no mention of how you are creating/reading your tree models.  Are
they all they all separate trees models loaded form disk?  One tree that is
instanced many times?

How you manage things depends upon how you've created the models.  The OSG
allows share of state, and there is even a visitor in the osgUtil::Optimizer
that seeks out duplicate state and removes it so try using the Optimizer.

Robert.

On Tue, Apr 14, 2009 at 3:30 PM, Roger  wrote:

> Hi,
>
> In my case,many trees models are readed in memory and they use the same
> image as their textures. I have realized all models in memory share the same
> image object.
>
> as shown in :
> http://forum.openscenegraph.org/viewtopic.php?t=2215
>
> while in rendering stage, I found out that 1G or so memory were consumed.
>
> is it because I  texture objects are not shared between models?
> or
> is it because mipmap are created during rendering stage?
>
> could we have some remedy to solve this problem?
>
> thank you!
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10208#10208
>
>
>
>
>
> ___
> 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] osgslice example can not run in windows vista?

2009-04-20 Thread Robert Osfield
HI Will,

Which version of OSG are you using?

Robert.

On Tue, Apr 14, 2009 at 3:24 PM, Will Clock  wrote:

> Hi,
>
> osgslice example can not run in windows vista? but linux works.
> Error: unable to create graphics window
>
> Thank you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10206#10206
>
>
>
>
>
> ___
> 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] HDR Skybox

2009-04-20 Thread Robert Osfield
Hi Rob,

The OSG doesn't yet support reading cube maps from dds files.  To add this
support will require a new osg::Image subclass to handle the cubemap.  This
is on my TODO but not near the top I'm afraid.

Robert.

On Tue, Apr 14, 2009 at 2:36 PM, Rob  wrote:

> I've tried it with both R32G32B32A32 DDS file and HDR files. I recently
> upgraded to 2.8, but no luck still. I'm wondering if it has something to do
> with the textures being coppied into the cube image from seperate files, so
> I'll see about loading those files into a non cube texture.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10198#10198
>
>
>
>
>
> ___
> 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] Drawable optimization

2009-04-20 Thread Robert Osfield
Hi Harold,

On Tue, Apr 14, 2009 at 12:37 PM, Harold Comere  wrote:

> Hi all,
>
> I am currently working on a kind of drawable optimizer.
> My goal is to make primitive set groups and have only one drawable per
> group. ( grouping vertexs linked by any face of the group )
> The effect will be to avoid to have separated objects in a same drawable.
> In same way, i want to merge small drawables containing only few faces but
> are in the same object.
> I have a node visitor wich will do this for all drawable in each geode.
>
> When i look at primitive set types generated by any importer, i notice that
> sometimes it is drawArrays, and other times drawElements.
> So my question is if there is any osg optimisation wich choose between
> drawArrays or drawElements alone ? drawElements is usually faster than
> drawArray calls, so i wonder if i can convert everything in drawElements
> type without lose fps ..



This would make a useful addition to osgUtil::Optimizer if you'd care to
submit it ;-)

As for the performance benefits - I'd expect they'd vary with type of scene
and drivers/hardware.  Cases like drawing points or lines will be better
done with DrawArrays.  Cases like meshes where many triangles have shared
vertices DrawElements should work best.

It'd be interesting to do a test against various drivers on various
machines.

It would also be interesting to see which import routes prefer DrawArrays vs
DrawElements and may well be down modeller's preference as well.



> Another question, osg doesnt seem to use VBOs by default, is there any
> reason ?
>

As Paul said the OSG's use of display lists predates the existence of
VBO's.  Now that OpenGL and OSG supports VBO's the question then comes
should VBO's be made the default...  we'll that depends upon the performance
of the two.  In my own tests big city models where you have lots of separate
pieces of geometry the performance is better with disply lists.  Whereas for
scenes where you have a moderate number of large objects then VBO's are
better.

I believe the reason that VBO's aren't faster than display lists on all
cases is that the function call overhead of setting up VBO's introduces a
penalty that outweighs their benefit on scenes with lots of separate
geometry.  The fact that we have to use function pointers to set up VBO's
compounds this, we have to use function pointers rather than straight
functions as the OSG has to query for VBO support at runtime as not all
drivers support VBOs.

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


Re: [osg-users] [osgPlugins] DXF-Plugin SmoothingVisitor

2009-04-20 Thread Robert Osfield
Hi Michael,

No need to include any plugin in your app, just run the smoothing visitor in
your app:

osg:::ref_ptr node = osgDB::readNodeFile("myfile.dxf");
osgUtil::SmoothingVisitor sv;
node->accept(sv);

Robert.

On Tue, Apr 14, 2009 at 8:59 AM, Michael Hasler  wrote:

> Hi,
>
> Im Using the OsgDXFPlugin to read DXF Files, i searched for an solution
> to add more normals for better smoothing, and found the SmoothingVisitor.
>
> I applied it in the scene.h (osgdxfplugin) under the function
> createTriGeometry and createQuadGeometry
> osgUtil::SmoothingVisitor::smooth(*geom) and works fine.
>
> But now i need to include the hole osgdfxplugin in my application
> how can i apply the smooth after the readNodeFile Operation ?
> So i would not need to include the hole dxfplugin and execeute
> the smooth after the read out on the resulting Node.
>
>
> Thank you.
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10185#10185
>
>
>
>
>
> ___
> 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] Back and trawling through backlog...

2009-04-20 Thread Carlos M . Gutiérrez Ceñal
Hi Robert,

remember to look for the database pager bug ;)

>Hi Carlos,
>
>I've just reviewed the code and this is definitely a bug, I presume others 
>haven't come across it before because you viewer usage model >must be a little 
>different.  A proper fix would probably be to pass to _dataToCompileMap to the 
>FindCompileableGLObjectsVisitor.
>
>I'm away on trip this week so can't tackle the bug fix, when I get back please 
>remind me if I don't get to it right away.


  - Original Message - 
  From: Robert Osfield 
  To: OpenSceneGraph Users 
  Sent: Monday, April 20, 2009 10:42 AM
  Subject: [osg-users] Back and trawling through backlog...


  Hi All,

  I'm now back from doing a training course and will be steadily wading through 
osg-users and submissions through today.

  Robert.



--


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



--



  No virus found in this incoming message.
  Checked by AVG - www.avg.com 
  Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00

No virus found in this outgoing message.
Checked by AVG - www.avg.com
Version: 8.0.238 / Virus Database: 270.12.0/2068 - Release Date: 04/19/09 
20:04:00
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] OpenScenegraph MFC application freezes in Vista when cpu is maxed out.

2009-04-20 Thread Jesper D. Thomsen
Hi all, I have a somewhat irritating error in Vista (and to a lesser degree 
Windows XP).

I'm using OSG 2.6.1 to render a viewport in an MFC application (built in Visual 
Studio 2005 SP1). I'm running in single-threaded mode (although I have tried 
multithreaded also without any luck). I'm manually calling frame when I want 
the viewport to be updated rather than using run(), as I don't want to waste 
cpu/gpu on redrawing a stationary viewport. My problem is that when I have a 
somewhat complex model loaded, the cpu-load on the single core sometimes spikes 
out at maximum load when doing updates fast (such as during a fast drag). When 
this happens the machine often freezes the OSG viewport (and the cpu load 
continues at maximum for a single core). In Vista I have to terminate the 
application, but in Windows XP I can change focus to another application window 
and the viewport returns to normal (0% cpu load) when I switch back to my 
application.

I'm all out of ideas as to exactly why this happens, as I don't completely 
understand if I'm allowed to call frame() rapidly or not. I'm looking for a 
function which can tell me if the previous frame() has completed, in order to 
not call a new frame() before the previous is done. I don't believe this should 
be necessary, but I have obviously done something to offend OSG :)
Any ideas or insights will be much appreciated.

regards, and thanks in advance.

Jesper D. Thomsen

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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Art Tevs
Hi Paul,

I've sticked your debugging tips in the forum. So hopefully people will get 
read them first, before asking the same questions again and again ;)

cheers

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





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


[osg-users] osgCuda / osgCompute now available

2009-04-20 Thread Mick
Hi OSG-Community,

we just released a first developer version of osgCuda which is based on the 
osgCompute library
and implements the specific functionality for NVIDIA's CUDA. It gives the user 
the possibility to
jump to the Graphics Processing Unit (GPU) within the OSG scenegraph for any 
kind of calculations.
The manipulated data is then afterwards available to the scenegraph for further 
processing (e.g. rendering). 

Here you can find more detailed information and examples:
http://www.cg.informatik.uni-siegen.de/svt/osgcompute/

For support please subscribe to the  public mailing list 
(http://www.openscenegraph.org/projects/osg/wiki/MailingLists) of 
OpenSceneGraph or go directly to the/this
OpenSceneGraph forum (http://forum.openscenegraph.org/)  which is synchronized 
with the mailing lists. 

Best regards,
Mick


SVT Group

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





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


Re: [osg-users] OSG debugging tips

2009-04-20 Thread Vincent Bourdier
Hi

I suggest adding :

8) Writing a node in .osg file can help you having a good overview of the
graph, the state, the transforms, the geometries, ... (in particular if your
debugger is not a very good one)

Vincent.

2009/4/20 Pierre Bourdin (gmail) 

>  Hi Paul and thank you,
> this is a nice help.
>
> May I suggest to put it on the wiki ?
>
> Regards, Pierre.
>
> Le samedi 18 avril 2009 à 12:10 -0600, Paul Martz a écrit :
>
> Yet more debugging tips:
>
> 5) Set OSG_NOTIFY_LEVEL to either INFO or DEBUG and examine the output. OSG
> might be trying to well you why things are going wrong.
>
> 6) Run the osgUtil::Optimizer on your scene graph with the CHECK_GEOMETRY
> flag (to check for simple mistakes like not having enough colors in your
> color array when using BIND_PER_VERTEX). With OSG_NOTIFY_LEVEL set verbose
> enough, the Optimizer will display warnings if it encounters these types of
> issues.
>
> 7) Read the function comments in the header files for functions you use.
> This will help you avoid the accidental use of deprecated functions (like
> Geometry::setVertexIndices()) that are inefficient (but remain in OSG for
> compatibility reasons).
>
> Paul Martz
> Skew Matrix Software LLChttp://www.skew-matrix.com
> +1 303 859 9466
>
> -Original Message-
> From: osg-users-boun...@lists.openscenegraph.org
> [mailto:osg-users-boun...@lists.openscenegraph.org 
> ] On Behalf Of Paul Martz
> Sent: Saturday, April 18, 2009 11:49 AM
> To: osg-users@lists.openscenegraph.org
> Subject: [osg-users] OSG debugging tips
>
> Hi all -- It seems like there has been a rash of "help me debug my
> code"-type questions lately, so I thought I'd post a short list of debugging
> techniques and other aids to help people out. I hope people find this
> information to be useful.
>
> 1) You are a software engineer and you have the OSG source code. Use it.
> Step through it in a debugger. (Many of the posts I've seen lately indicate
> that the poster has not looked inside the OSG code at all. This is a great,
> free resource; learn to use it. The code doesn't lie.)
>
> 2) For simple rendering problems, use a tool like GLIntercept to capture the
> OpenGL calls. If you know OpenGL, this is a great way to track down why
> things don't render correctly. If you don't know OpenGL, buy the red book
> and learn it, otherwise you'll never be effective at coding OSG.
>
> 3) Here are a few ways to learn some basic OSG concepts that get covered in
> this email list very frequently:
>   a) Buy/download the Quick Start Guide
>  http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-guide/
> 767629
>  There is a color version, b&w (which is cheaper), PDF (which is free),
> and a Chinese version.
>   B) Search the mail list archives:
>  http://groups.google.com/group/osg-users?hl=en
>  If you're a beginner, your question has probably been discussed and
> answered multiple times.
>   C) Get familiar with the OSG wiki:
>  http://www.openscenegraph.org
>
> 4) If you really need professional help, consider purchasing a support
> contract from myself or Robert Osfield, or contracting with someone else on
> the list for support. You are more likely to get quality help if you pay for
> it.
>
> Paul Martz
> Skew Matrix Software LLChttp://www.skew-matrix.com 
> 
> +1 303 859 9466
>
> ___
> osg-users mailing 
> listosg-us...@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ___
> osg-users mailing 
> listosg-us...@lists.openscenegraph.orghttp://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>   
> Pierre BOURDIN
> I.M.E.R.I.R.
> Av. Pascot BP 90443
> 66004 PERPIGNAN
> tél: 04 68 56 84 95
> fax: 04 68 55 03 86
> email: bour...@imerir.com
> 
>
> ___
> 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] OSG debugging tips

2009-04-20 Thread Pierre Bourdin (gmail)
Hi Paul and thank you, 
this is a nice help.

May I suggest to put it on the wiki ?

Regards, Pierre.

Le samedi 18 avril 2009 à 12:10 -0600, Paul Martz a écrit :

> Yet more debugging tips:
> 
> 5) Set OSG_NOTIFY_LEVEL to either INFO or DEBUG and examine the output. OSG
> might be trying to well you why things are going wrong.
> 
> 6) Run the osgUtil::Optimizer on your scene graph with the CHECK_GEOMETRY
> flag (to check for simple mistakes like not having enough colors in your
> color array when using BIND_PER_VERTEX). With OSG_NOTIFY_LEVEL set verbose
> enough, the Optimizer will display warnings if it encounters these types of
> issues.
> 
> 7) Read the function comments in the header files for functions you use.
> This will help you avoid the accidental use of deprecated functions (like
> Geometry::setVertexIndices()) that are inefficient (but remain in OSG for
> compatibility reasons).
> 
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> +1 303 859 9466
> 
> -Original Message-
> From: osg-users-boun...@lists.openscenegraph.org
> [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Paul Martz
> Sent: Saturday, April 18, 2009 11:49 AM
> To: osg-users@lists.openscenegraph.org
> Subject: [osg-users] OSG debugging tips
> 
> Hi all -- It seems like there has been a rash of "help me debug my
> code"-type questions lately, so I thought I'd post a short list of debugging
> techniques and other aids to help people out. I hope people find this
> information to be useful.
> 
> 1) You are a software engineer and you have the OSG source code. Use it.
> Step through it in a debugger. (Many of the posts I've seen lately indicate
> that the poster has not looked inside the OSG code at all. This is a great,
> free resource; learn to use it. The code doesn't lie.)
> 
> 2) For simple rendering problems, use a tool like GLIntercept to capture the
> OpenGL calls. If you know OpenGL, this is a great way to track down why
> things don't render correctly. If you don't know OpenGL, buy the red book
> and learn it, otherwise you'll never be effective at coding OSG.
> 
> 3) Here are a few ways to learn some basic OSG concepts that get covered in
> this email list very frequently:
>   a) Buy/download the Quick Start Guide
>  
> http://www.lulu.com/content/paperback-book/openscenegraph-quick-start-guide/
> 767629
>  There is a color version, b&w (which is cheaper), PDF (which is free),
> and a Chinese version.
>   B) Search the mail list archives: 
>  http://groups.google.com/group/osg-users?hl=en
>  If you're a beginner, your question has probably been discussed and
> answered multiple times.
>   C) Get familiar with the OSG wiki:
>  http://www.openscenegraph.org
> 
> 4) If you really need professional help, consider purchasing a support
> contract from myself or Robert Osfield, or contracting with someone else on
> the list for support. You are more likely to get quality help if you pay for
> it.
> 
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com  
> +1 303 859 9466
> 
> ___
> 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


Pierre BOURDIN
I.M.E.R.I.R.
Av. Pascot BP 90443
66004 PERPIGNAN
tél: 04 68 56 84 95
fax: 04 68 55 03 86
email: bour...@imerir.com

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


[osg-users] Back and trawling through backlog...

2009-04-20 Thread Robert Osfield
Hi All,

I'm now back from doing a training course and will be steadily wading
through osg-users and submissions through today.

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


Re: [osg-users] ref_ptr<>::release() and Quick Start Guide

2009-04-20 Thread Nico Kruithof
Dear Paul,

First of all, I'd like to thank you for your QSG! It's a great
overview of OSG and a nice introduction of the main aspects of the
library. I'm looking forward to the update.

I tried the link to code.google.com, but it gave me a permission
denied. Do I need to register somewhere first?

Bests,
Nico Kruithof

On Sun, Apr 19, 2009 at 1:21 AM, Paul Martz  wrote:
> FYI -- As part of my revision to the OSG Quick Start Guide (in progress),
> I've modified the current svn head of the example code to use
> ref_ptr<>::release(). This technique will be discussed in the upcoming
> revision but is not mentioned in the current edition of the book. So I
> thought I should discuss it briefly here.
>
> ref_ptr<>::release() tells the ref_ptr<> variable to stop managing the
> memory that it points to. It will decrement the reference count on the
> memory but will not delete the memory, not even if its reference count goes
> to zero. This makes release() well-suited for returning the address of
> Reference memory from functions that allocate that memory. The function can
> use a ref_ptr<> locally to store the address of the allocated memory, return
> it with release(), and as long as the calling code store the returned
> address in another ref_ptr<>, no memory is deleted and no memory leaks.
>
> The source code can be downloaded from:
> http://code.google.com/p/osgqsg/admin
>
> The current edition of the book can be ordered from www.lulu.com. Just
> search for "OpenSceneGraph".
>
>
> Paul Martz
> Skew Matrix Software LLC
> http://www.skew-matrix.com
> +1 303 859 9466
>
> ___
> 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] animating textures

2009-04-20 Thread Julia Guo
hi, 


> I added them just as convenience for quickly visualizing the shape 
> primitives, without any intention of it being widely used.

thats interesting to know. OK I will try to stay away from them until they are 
refactored.

I found that like with lights there is an OpenGL limit on the maximum number of 
textures (GL_MAX_TEXTURE_UNITS_ARB), which can be quite small on some platforms.
How do people deal with this limitation? Because Ive used OpenGL based CAD 
programs that let me load as many textures as I want.

Julia

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





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


  1   2   >