[osg-users] [vpb] Build globe around one hires region

2011-07-06 Thread Roman Grigoriev
Hi, I've built some hires regions diveded by 5 by 5 degrees like SRTM data. 
And now I want to create globe around it.
So I download bluemarble.tiff and built database by using vbpmaster whole globe 
and finnaly I've got z-fighting.
Because I have lowres and hi-res in the same time. 
Is there some way to insert hires into lowres?

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Build globe around one hires region

2011-07-06 Thread Torben Dannhauer
Hi,

I asume you built 2 different databases and tried to display both of them.

You have to build all your data in single database and only load that database.

Search also in the mailing list for "optional layer" to learn more about 
advanced database setup.


Cheers,
Torben

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





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


Re: [osg-users] Building OpenThreads with Qt Support: Any benefits?

2011-07-06 Thread George Bekos
Thanks a lot for your answer dude!

Cheers!


Wang Rui wrote:
> Hi George and Chris,
> 
> The QThread support was submitted initially for the further migrating
> to Symbian and Meego. AFAIK, the Meego version of OSG is already
> workable in a Chinese lab. But I don't have a clear plan of when and
> how to merge it to the trunk version at present.
> 
> And yes, until the 4.7 release, Qt doesn't support setting CPU
> affinity so far. And I'm not sure if Qt's threading model is safer or
> not. But at least, it should be a good start for porting OSG to
> another few mobile platforms. :-)
> 
> Wang Rui
> 
> 
> 2011/7/5 Chris 'Xenon' Hanson <>:
> 
> > On 7/5/2011 4:03 AM, George Bekos wrote:
> > 
> > > Hello again guys! :D
> > > I want to ask you about this "BUILD_OPENTHREADS_WITH_QT" CMake flag when 
> > > you build OSG. From what I saw the only thing this flag does is to use 
> > > the Qt Threading library for OpenThreads. Are there any benefits from 
> > > using Qt Threading library over for example Win32 threads or pThreads? I 
> > > understand that Qt Threading library acts as an extra layer on top of 
> > > some other library (Win32threads,pThreads etc) depending on the platform.
> > > In our main application we use Qt Framework a lot for the GUI. Building 
> > > OpenThreads with Qt Thread support makes it any safer? Are there evidence 
> > > that I might have threading issues when I use OSG with Qt Framework 
> > > without OpenThreads Qt support enabled?
> > > 
> > 
> >  I'm interested in this answer too.
> > 
> >  I seem to recall that Qt's threading library doesn't expose a CPU affinity 
> > mask, which
> > OSG kind of likes. Is any of this true?
> > 
> > --
> > Chris 'Xenon' Hanson, omo sanza lettere.  http://www.alphapixel.com/
> >  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
> > Contracting.
> >    "There is no Truth. There is only Perception. To Perceive is to Exist." 
> > - Xen
> > ___
> > osg-users mailing list
> > 
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> > 
> > 
> ___
> 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=41184#41184





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


[osg-users] CullingSet::computePixelSizeVector and AutoTransform

2011-07-06 Thread J.P. Delport

Hi all,

I'm having some issues with AutoTransform (scale to screen) and wide 
aspect viewports. To reproduce do something like:


export OSG_WINDOW="0 0 800 600"
osgautotransform

Then zoom out until only "Autoscale with no min, max limits" is visible. 
Then make the aspect of the window larger/wider. You will see that the 
size of the text gets smaller.


I've followed that AutoTransform uses CullStack->pixelSize() (to 
determine its scale) and that this uses 
CullingSet::computePixelSizeVector().


I can't quite follow the code in computePixelSizeVector, but noticed 
that the scaleRatio depends on both horizontal and vertical scales, but 
AFAIK OSG automatically adjusts the projection matrix so that only 
vertical scale matters. If I change:


float scaleRatio  = 
0.7071067811f/sqrtf(scale_00.length2()+scale_10.length2());


into

float scaleRatio  = 0.5/sqrtf(scale_10.length2());

then the osgautotransform example behaves like I would expect, i.e. the 
text stays the same size no matter what the window aspect. I'm not sure 
this is a "solution" though.


So my questions:
- What does the output of computePixelSizeVector represent? Can I write 
in a matrix multiplation form? MVP*vec?

- Will it work for ortho projections?

thanks
jp

BTW, the text getting smaller for wide aspect is also present in the 
osgtext example for the pixel_size_on_screen line.


--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


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


Re: [osg-users] [vpb] Questions regarding setname, optional layers and layer inheritance

2011-07-06 Thread Torben Dannhauer
Hi Brad,

thank you very much for your detailed tips and tricks!

I'll go through it and give you feedback as soon as I can. I'm looking forward 
to write an article in the VPB wiki about the optional layer issue so others 
can dive in that topic with the same help I got from you.

Thank you!

Cheers,
Torben

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





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


[osg-users] When is it safe to resize an osg::Camera viewport?

2011-07-06 Thread Alessandro Terenzi
Hi,
I have an osg:Camera (beyond the viewer's default camera) and I need to resize 
the viewport of that camera when a RESIZE event occurs (actually when the user 
resizes the app window).

So I thought to handle the viewer's RESIZE event by calling the setViewport(.) 
method on my custom camera because my custom osg::Camera viewport is not 
resized automatically.

I wonder if it is safe to call setViewport(.) in the handle() method of an 
event handler or if I'm supposed to change camera's properties (like the 
viewport) somewhere else (for example in an UpdateCallback or in a 
CullCallback...).

I'm asking this because I often experience a system crash when toggling 
fullscreen on/off...but I'm not sure that this is related to the way I call 
setViewport(.).

One more question: what are 'slave' cameras used for? Are them supposed to be 
used only if they need to follow a parent's transform?

Thanks.
Alessandro

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





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


Re: [osg-users] [vpb] Build globe around one hires region

2011-07-06 Thread Roman Grigoriev
Hi,

I know that I have to load one database but I think that I have to build at 
first lowres globe and after that I have to patch this database with hires 
data. 
But I've already had hires chunks and want simply insert into globe.
Is it possible to patch one .osgb with another .osgb in vpb?

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] Shadow mapping using different scene graph for mapping

2011-07-06 Thread Sergey Polischuk
Hi, Sebastian

I think you can create stateset on top of your shadow casting graph, and set 
all state you need to enable and disable explicilty with override flag, like 
disable textures, blend, color write, texenv stuff, lighting etc with 
appropriate attributes\modes. Also you can copy graph (with DEEP_COPY_NODES | 
DEEP_COPY_DRAWABLES), strip statesets out of it completely, and then use it for 
rendering.

Cheers, Sergey.

05.07.2011, 22:43, "Sebastian Messerschmidt" :
> Hi,
>
> Currently I'm trying to improve performance regarding shadow mapping.
> So far I've managed to get reasonable results for large outdoor scenes
> using LightSpacePerspectiveMaps.
> In order to improve performance further, I did come up with the
> following idea:
> As my scene-graph consists of many objects, I'd like to set up a special
> graph which skips all materials and textures not using alpha masking.
> I know that I can skip complete nodes using the traversal mask. The
> question is: how to use a graph which omits most of heavy state changing
> objects to actually change the state.
> E.g. I have a couple of buildings, each using ~200 different state sets
> per individual building type. I'd like to reduce this overload, by
> presenting a optimized graph not performing this state changes during
> shadow traversal. In other words, I want to render the shadow casting
> graph with a lower footprint.
>
> So, is there some mechanism to present a different scene graph to the
> ShadowTechniques for shadow casting than for actual rendering?
>
> Cheers
> Sebastian
> ___
> 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] [vpb] Build globe around one hires region

2011-07-06 Thread Torben Dannhauer
Hi Adun,

no, you can only patch with source imagery, not with a VPB database as far as I 
know.

Your suggested approach seems to be:
1. Build globe from sources
2. build hi-res insets from sources
3. Patch globe with results from 2.

My recommendation is:
1. Build globe from source
2. Patch resulting DB with hi-res sources.

If you want to integrate hi-res "patches" dynamically at runtime learn how to 
use optional layers. Here I can't help you, I still try to learn it myself.


Cheers,
Torben

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





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


Re: [osg-users] [vpb] Questions regarding setname, optional layers and layer inheritance

2011-07-06 Thread Torben Dannhauer
Hi Brad,

I realized that I missed a very central question regarding optional layers:

How to they affect the rendering performance? 

Of course it takes some computation time to merge all different layers, but 
have you some hints how the performance is im comparison to a native database 
with all data directly integrated?

Thank you!

Cheers,
Torben

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





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


Re: [osg-users] Shadow mapping using different scene graph for mapping

2011-07-06 Thread Sebastian Messerschmidt

Hi Sergey,

Thanks so far for the hints. I was thinking something similar.
The problem however is how tell the shadow-technique that one graph is 
for casting while the other is for receiving.  Do I have to overwrite 
certain parts of the ShadowedScene class to achive this?


cheers
Sebastian


Hi, Sebastian

I think you can create stateset on top of your shadow casting graph, and set 
all state you need to enable and disable explicilty with override flag, like 
disable textures, blend, color write, texenv stuff, lighting etc with 
appropriate attributes\modes. Also you can copy graph (with DEEP_COPY_NODES | 
DEEP_COPY_DRAWABLES), strip statesets out of it completely, and then use it for 
rendering.

Cheers, Sergey.



05.07.2011, 22:43, "Sebastian Messerschmidt":

Hi,

Currently I'm trying to improve performance regarding shadow mapping.
So far I've managed to get reasonable results for large outdoor scenes
using LightSpacePerspectiveMaps.
In order to improve performance further, I did come up with the
following idea:
As my scene-graph consists of many objects, I'd like to set up a special
graph which skips all materials and textures not using alpha masking.
I know that I can skip complete nodes using the traversal mask. The
question is: how to use a graph which omits most of heavy state changing
objects to actually change the state.
E.g. I have a couple of buildings, each using ~200 different state sets
per individual building type. I'd like to reduce this overload, by
presenting a optimized graph not performing this state changes during
shadow traversal. In other words, I want to render the shadow casting
graph with a lower footprint.

So, is there some mechanism to present a different scene graph to the
ShadowTechniques for shadow casting than for actual rendering?

Cheers
Sebastian
___
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] Building OpenThreads with Qt Support: Any benefits?

2011-07-06 Thread Ryan Pavlik
So if this is primarily for mobile devices, would that be useful info to add
to the CMakeLists.txt file as the option documentation, so it pops up as a
tool-tip? Something like this patch?
https://github.com/rpavlik/osg/compare/openscenegraph:master...clarify-qthreads

Ryan

On Wed, Jul 6, 2011 at 3:07 AM, George Bekos  wrote:

> Thanks a lot for your answer dude!
>
> Cheers!
>
>
> Wang Rui wrote:
> > Hi George and Chris,
> >
> > The QThread support was submitted initially for the further migrating
> > to Symbian and Meego. AFAIK, the Meego version of OSG is already
> > workable in a Chinese lab. But I don't have a clear plan of when and
> > how to merge it to the trunk version at present.
> >
> > And yes, until the 4.7 release, Qt doesn't support setting CPU
> > affinity so far. And I'm not sure if Qt's threading model is safer or
> > not. But at least, it should be a good start for porting OSG to
> > another few mobile platforms. :-)
> >
> > Wang Rui
> >
> >
> > 2011/7/5 Chris 'Xenon' Hanson <>:
> >
> > > On 7/5/2011 4:03 AM, George Bekos wrote:
> > >
> > > > Hello again guys! :D
> > > > I want to ask you about this "BUILD_OPENTHREADS_WITH_QT" CMake flag
> when you build OSG. From what I saw the only thing this flag does is to use
> the Qt Threading library for OpenThreads. Are there any benefits from using
> Qt Threading library over for example Win32 threads or pThreads? I
> understand that Qt Threading library acts as an extra layer on top of some
> other library (Win32threads,pThreads etc) depending on the platform.
> > > > In our main application we use Qt Framework a lot for the GUI.
> Building OpenThreads with Qt Thread support makes it any safer? Are there
> evidence that I might have threading issues when I use OSG with Qt Framework
> without OpenThreads Qt support enabled?
> > > >
> > >
> > >  I'm interested in this answer too.
> > >
> > >  I seem to recall that Qt's threading library doesn't expose a CPU
> affinity mask, which
> > > OSG kind of likes. Is any of this true?
> > >
>

-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] How do I get osgviewer on Cygwin to compile with -lX11 & -lXrandr

2011-07-06 Thread Brian Keener
I tried building OSG on Cygwin 1.7 and I first tried to do it without X 
but it seems that osgviewer seems to insist on X11 and that WIN32 
option has been removed (or is that what you get if you leave it at 
none).  

At any rate I finally accepted the defaults (except adding -DNOMINMAX 
and was bale to get osg to build but to get edit several link.txt files 
during the build.  I ran Cmake and did the configure and generate and 
then each time it bombed using something involving osgviewer then I 
would go edit the appropriate link.txt file and add -lX11 -lXrandr to 
the executable line in that file and then execute the file.  This would 
complete the link and then when I started my make again it would move 
past that build and continue.  I did this for each link failure as 
follow:

In the build directory for OSG (my build root is /usr/develop/obj/osg):
/usr/develop/obj/osg/src/osgViewer

I edited the file:

vi ./CMakeFiles/osgViewer.dir/link.txt

and added the -lX11 -lXrandr to the line in link.txt.  I then executed 
the link.txt file as in :

./CMakeFiles/osgViewer.dir/link.txt

and the file built - so that was all it needed for osgViewer but...

I then would have to do this other parts of the build (osgArchive, 
osgConv and so on ) to get it to finish.

My question(s) is/are where do I find the logic that dictates during 
the Cmake configure what libs to include and in what files will I find 
this when the generate finishes.  I would like to tweak this so the 
cmake configure and generate for cygwin was smart enough add the X11 
and Xrandr libs.  

I would also like to know (if any knows) what in general should be the 
setting to get osgviewer to build without X11 on Cygwin and just use 
the opengl and no X.

thanks

bk


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


Re: [osg-users] How do I get osgviewer on Cygwin to compile with -lX11 & -lXrandr

2011-07-06 Thread Alberto Luaces
Hi Brian,

Brian Keener writes:

[...]

> My question(s) is/are where do I find the logic that dictates during 
> the Cmake configure what libs to include and in what files will I find 
> this when the generate finishes.  I would like to tweak this so the 
> cmake configure and generate for cygwin was smart enough add the X11 
> and Xrandr libs.  
>

It should be smart enough to do it by itself; however I guess that you
can manually configure it by setting X11_X11_LIB and X11_Xrandr_LIB
parameters of CMake. These take the path of the libraries, as in
"/usr/lib/libXrandr.so". As a last resort, you can set the parameters
CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS to include "-lX11 -lXrandr".

>
> I would also like to know (if any knows) what in general should be the
> setting to get osgviewer to build without X11 on Cygwin and just use 
> the opengl and no X.

It's been some time since I don't build OSG in Cygwin, but using the
Win32 API on Cygwin applications should be more and more difficult every
day. Coherently, the CMake port for Cygwin is deprecating the WIN32
definition, since it aims to be a POSIX platform. However, I have seen
that X for Cygwin has now experimental support for hardware
acceleration.

Regards,

-- 
Alberto

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


Re: [osg-users] Shadow mapping using different scene graph for mapping

2011-07-06 Thread Sergey Polischuk
Hi, Sebastian

You should be able to manage this with cull masks on cameras (cullmask on 
camera that render shadowmap to render shadow graph, cullmask for main camera 
to render main graph ), like use 0x1 on shadow graph and camera, 0x2 on main 
graph and camera.

Cheers,
Sergey.

06.07.2011, 17:42, "Sebastian Messerschmidt" :
> Hi Sergey,
>
> Thanks so far for the hints. I was thinking something similar.
> The problem however is how tell the shadow-technique that one graph is
> for casting while the other is for receiving.  Do I have to overwrite
> certain parts of the ShadowedScene class to achive this?
>
> cheers
> Sebastian
>
>>  Hi, Sebastian
>>
>>  I think you can create stateset on top of your shadow casting graph, and 
>> set all state you need to enable and disable explicilty with override flag, 
>> like disable textures, blend, color write, texenv stuff, lighting etc with 
>> appropriate attributes\modes. Also you can copy graph (with DEEP_COPY_NODES 
>> | DEEP_COPY_DRAWABLES), strip statesets out of it completely, and then use 
>> it for rendering.
>>
>>  Cheers, Sergey.
>>  05.07.2011, 22:43, "Sebastian 
>> Messerschmidt";:
>>>  Hi,
>>>
>>>  Currently I'm trying to improve performance regarding shadow mapping.
>>>  So far I've managed to get reasonable results for large outdoor scenes
>>>  using LightSpacePerspectiveMaps.
>>>  In order to improve performance further, I did come up with the
>>>  following idea:
>>>  As my scene-graph consists of many objects, I'd like to set up a special
>>>  graph which skips all materials and textures not using alpha masking.
>>>  I know that I can skip complete nodes using the traversal mask. The
>>>  question is: how to use a graph which omits most of heavy state changing
>>>  objects to actually change the state.
>>>  E.g. I have a couple of buildings, each using ~200 different state sets
>>>  per individual building type. I'd like to reduce this overload, by
>>>  presenting a optimized graph not performing this state changes during
>>>  shadow traversal. In other words, I want to render the shadow casting
>>>  graph with a lower footprint.
>>>
>>>  So, is there some mechanism to present a different scene graph to the
>>>  ShadowTechniques for shadow casting than for actual rendering?
>>>
>>>  Cheers
>>>  Sebastian
>>>  ___
>>>  osg-users mailing list
>>>  osg-users@lists.openscenegraph.org
>>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>  ___
>>  osg-users mailing list
>>  osg-users@lists.openscenegraph.org
>>  http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi, I try to build globe database. Works fine but when I try to build poligonal 
database got segmentation fault. 
vpbmaster --geocentric --POLYGONAL --compressor-nvtt --compressed-dxt1 
--compression-quality-fastest  -t bluemarble.tif -o earth.osgb

Thank you!

Cheers,
Roman

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





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


[osg-users] possible OSG 3.0.0 regression - different handling of transparencies in DDS texture loader?

2011-07-06 Thread Christian Buchner
Hi,

I've just tested our app against OSG 3.0.0, mostly because it has some
rudimentary Multitouch support which I hope to extend on. During the
upgrade we only stumbled across a renamed header file
(MatrixManipulator to CameraManipulator). No big deal - some extra
preprocessor macros in the code fixed that.

My application features some hundred or thousand walking persons
(implemented as animated billboards) that read their texture data from
a DDS file. It seems handling of transparencies has changed though.
Where previously the billboards had a transparent background, the
walking persons now appear in inside solid black squares. So the
entire billboard is opaque.

Would anyone know if there was a breaking change in the DDS plug-in
between OSG 2.8.2 and 3.0.0 regarding transparency handling? Before I
start digging into documentation, maybe someone here knows.

With kind regards,

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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Torben Dannhauer
Hi Adun,

Sorry that are not enough information about your setup, can't help you.

What is your
- OS
- Compiler
- OSG version
- VPB version
- NVTT version

Anyway, if you VPBmaster run fails, try to simplify the command and remove all 
unnecessary options like compression etc. if it works, add each run one 
argument and determine which of you arguments causes the crash.

have you tried to run vpmaster without options? 


Cheers,
Torben

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi,
Lubuntu 11.04 x86 
VPB from trunk 
osg from trunk 
nvtt from trunk 
gcc 4.5.1
here is output 

i@t520:~/work/atlantik/earth$ vpbmaster --geocentric --POLYGONAL -t 
bluemarble.tif -l 6 -o 1.osgb
--geocentric 
-t bluemarble.tif
ADD: bluemarble.tif
-o 1.osgb
Adding terrainTile 
DataSet::generateTasks_new
local_extents = xMin() -180.00 180.00
yMin() -90.00 90.00
AR=2.00 C1=2 R1=1
Computed maximum source level = 5
Selected single split at 2
local_extents = xMin() -180.00 180.00
yMin() -90.00 90.00
AR=2.00 C1=2 R1=1
   Task directory already created
   Log directory already created
totalNumOfTasksSansRoot = 2
getTaskName(1,0,0) no nest, 2 0
getTaskName(1,1,0) no nest, 2 0
Generated tasks file = build_master.tasks
Revsion source = 1.osgb.0.source
Setting up MachinePool to use all 4 cores on this machine.
Begining run
scheduling task : tasks/build_root_L0_X0_Y0.task
scheduling task : tasks/build_subtile_L1_X0_Y0.task
scheduling task : tasks/build_subtile_L1_X1_Y0.task
machine=t520 running task=tasks/build_root_L0_X0_Y0.task
machine=t520 running task=tasks/build_subtile_L1_X0_Y0.task
machine=t520 running task=tasks/build_subtile_L1_X1_Y0.task
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
Segmentation fault
machine=t520 completed task=tasks/build_subtile_L1_X0_Y0.task in 0.8 seconds
Number of tasks completed 1, running 2, pending 0. Estimated time to completion 
0 seconds, 54.1 percent done.

Warning: Task tasks/build_subtile_L1_X0_Y0.task has failed, blacklisting 
machine t520 and resubmitting task.

Segmentation fault
machine=t520 completed task=tasks/build_subtile_L1_X1_Y0.task in 0.9 seconds
Number of tasks completed 2, running 1, pending 0. Estimated time to completion 
1 seconds, 56.1 percent done.

Warning: Task tasks/build_subtile_L1_X1_Y0.task has failed, blacklisting 
machine t520 and resubmitting task.

osg::Registry::removeImageProcessor();
machine=t520 completed task=tasks/build_root_L0_X0_Y0.task in 1.0 seconds
Number of tasks completed 3, running 0, pending 1. Estimated time to completion 
0 seconds, 61.7 percent done.
End of TaskSet: tasksPending=2 taskCompleted=1 taskRunning=0 tasksFailed=0
End of run: tasksPending=2 taskCompleted=1 taskRunning=0 tasksFailed=0
MachinePool::reportTimingStats()
Machine : t520
Task::type=''   minTime=0.770286maxTime=1.021428
averageTime=0.888108totalComputeTime=2.664324   numTasks=3
Finished run, but did not complete 2 tasks.
Total elapsed time = 2.408422
Run Complete.
Recieved signal 15, doing TERMINATE_RUNNING_TASKS_THEN_EXIT.
MachinePool::signal(15)
Machine::signal(15)
Machine::cancelThreads() hostname=t520, threads=4
  Cancel thread
  Cancel thread
  Cancel thread
  Cancel thread
Completed Machine::cancelThreads() hostname=t520, threads=4

Thank you!

Cheers,
Roman

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





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


[osg-users] OSG 3.0 and osgShadow texture unit problems

2011-07-06 Thread Roger James
Hi,

I had some shadow code that was working well on 2.8.5 but will not work on 
3.0.0. I verified that the same problem occurs with the OSG shadow example 
source. My test machine GPU (Nvidia) reports 16 texture units available. If I 
set the shadow texture unit number to anything higher than 7 then my OpenGL 
trace reports errors as soon as this texture unit is accessed (for texgens from 
the positionalStateContainer). This can be verified by adding the following 
patch to osgshadow.cpp.

Code:
else /* if (arguments.read("--sm")) */
{
osg::ref_ptr sm = new osgShadow::ShadowMap;
sm->setTextureUnit(8);
shadowedScene->setShadowTechnique(sm.get());

int mapres = 1024;
while (arguments.read("--mapres", mapres))
sm->setTextureSize(osg::Vec2s(mapres,mapres));
}




Here is a snippet of the OpenGL trace.

Code:
glGetString(GL_VERSION)="2.1.2" 
glGetString(GL_RENDERER)="GeForce Go 7600/PCI/SSE2/..." 
glGetString(GL_VERSION)="2.1.2" 
...
glActiveTexture(GL_TEXTURE8)
glLoadMatrixd([1.00,0.00,0.00,0.00,0.00,1.00,0.00,0.00,0.00,0.00,1.00,0.00,0.00,0.00,0.00,1.00])
glTexGendv(GL_S,GL_EYE_PLANE,0x2715740) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_T,GL_EYE_PLANE,0x2715768) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_R,GL_EYE_PLANE,0x2715790) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_Q,GL_EYE_PLANE,0x27157b8) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_R,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_Q,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION



Has anyone got any idea what is going on here. Has 3.0 reserved some resources 
that have in some way reduced the number of available texture units?

I am at a loss! Obviously I don't see any shadows!

Roger


Cheers,
Roger[/code]

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





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


Re: [osg-users] How do I get osgviewer on Cygwin to compile with -lX11 & -lXrandr

2011-07-06 Thread brianklistacct

 Alberto Luaces  wrote: 
> It should be smart enough to do it by itself; however I guess that you
> can manually configure it by setting X11_X11_LIB and X11_Xrandr_LIB
> parameters of CMake. These take the path of the libraries, as in
> "/usr/lib/libXrandr.so". As a last resort, you can set the parameters
> CMAKE_{EXE,MODULE,SHARED}_LINKER_FLAGS to include "-lX11 -lXrandr".

Strange thing is - the configure populates those - it apparently finds them 
during configure but then either the generate or something when I do the build 
doesn't because when i do the build the -lX11 and -lXrandr isn't included (at 
least according to the link.txt files I look at.

thanks.

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


Re: [osg-users] possible OSG 3.0.0 regression - different handling of transparencies in DDS texture loader?

2011-07-06 Thread Jason Daly

On 07/06/2011 01:32 PM, Christian Buchner wrote:

Hi,

I've just tested our app against OSG 3.0.0, mostly because it has some
rudimentary Multitouch support which I hope to extend on. During the
upgrade we only stumbled across a renamed header file
(MatrixManipulator to CameraManipulator). No big deal - some extra
preprocessor macros in the code fixed that.

My application features some hundred or thousand walking persons
(implemented as animated billboards) that read their texture data from
a DDS file. It seems handling of transparencies has changed though.
Where previously the billboards had a transparent background, the
walking persons now appear in inside solid black squares. So the
entire billboard is opaque.

Would anyone know if there was a breaking change in the DDS plug-in
between OSG 2.8.2 and 3.0.0 regarding transparency handling? Before I
start digging into documentation, maybe someone here knows.


It most likely has to do with this thread:

http://forum.openscenegraph.org/viewtopic.php?t=8168


Briefly, there was some confusion on how DXT1 files with alpha were 
detected and handled.  My original fix was to assume that all DXT1 
blocks with a particular bit pattern were transparent.  However, another 
(arguably more complete) interpretation is that the bit pattern means 
either transparent or black, with the deciding factor being the image 
format.  This is the behavior that Robert has now implemented.  Of 
course, the .dds format header doesn't identify the image format 
completely, so it's not really possible to distinguish between DXT1a and 
DXT1c in a .dds file.


In short, there are a new set of options that will let you alter the 
behavior to work with your data.  You probably want to use the 
"dds_dxt1_detect_rgba" option.


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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Torben Dannhauer
Hi,

ah!
vpbmaster calls osgdem to perform all the single processing tasks.

osgdem failed, therefor vpbmaster blacklistes the according host which is 
unfortunately in your case your OS. Now vpbmaster has no machine available and 
stops to process pending tasks.

look in the according *.task file of that task, it cointains the command line 
which is used to start osgdem for that task. Then you can start osgdem with 
that commandline and produce a callstack to get the reason.

Cheers,
Torben

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





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


Re: [osg-users] Reliable OpenSceneGraph asset import pipeline for animated skeletal models

2011-07-06 Thread Chris 'Xenon' Hanson
On 7/5/2011 6:31 PM, Garthy Dee wrote:
> I'm wondering if it is a reasonable assumption to make that the FBX plugin is 
> a bit more mature then the others, or better suited to the purpose, with 
> respect to animated skeletal models? At the very least, I suspect that I'm on 
> the right track now. :)

  Well, I believe that both FBX and DAE are currently used in production by 
users who keep
them up to date as needed.

  If there really is a problem tied to the DAE loader, you might discuss it 
with its
author(s).

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
"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] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi,
Maybe you try to reproduce this error that happens only if you try to build 
whole globe. I take world.tif from osgearth data.
vpbmaster --geocentric --POLYGONAL -t world.tif  -o 1.osgb
if I try to build some region all works fine.
Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi, here is gdb
Starting program: /usr/local/bin/osgdem --run-path /home/i/work/atlantik/earth 
-s build_master.source --record-subtile-on-leaf-tiles -l 2 --task 
tasks/build_root_L0_X0_Y0.task --log logs/build_root_L0_X0_Y0.log
[Thread debugging using libthread_db enabled]
RegisterWindowingSystemInterfaceProxy()
X11WindowingSystemInterface()
GraphicsContext::setWindowingSystemInterface() 0x80821280xbbcf60
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_osg.so
VPBReaderWriter::readNode()
readNode_new()
   found ReaderWriter, readNode_new()
Opened DynamicLibrary libosgTerrain.so
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osgterrain.so
Opened DynamicLibrary libosg.so
Constructing PixelBufferObject for image=0x80a93e0
Constructing PixelBufferObject for image=0x80b6238
CullSettings::readEnvironmentalVariables()
Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osg.so
Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
osg::Registry::addImageProcessor(ImageProcessor)
Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor

Program received signal SIGSEGV, Segmentation fault.
0x00de8fca in std::_Rb_tree, 
osg::ref_ptr, 
std::_Identity >, dereference_less, 
std::allocator > 
>::_M_erase(std::_Rb_tree_node >*) ()
   from /usr/local/lib/libosgUtil.so.78

Thank you!

Cheers,
Roman

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Torben Dannhauer
Hi,

Sorry I do not have time to dive into you seg fault, I showed you how you can 
get the correct osgdem call, now you have to dive into your stack trace with 
gdb and solve it.

As workaround:
I you discovered the whole globe option as problem, then avoid it. if your data 
cover the globe anyway, then osgdem will build the glob without the problematic 
parameter. Use --geocentric to build a round globe and not a flat one.

Good look!

Cheers,
Torben

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





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


Re: [osg-users] OSG 3.0 and osgShadow texture unit problems

2011-07-06 Thread Wojciech Lewandowski

Hi, Roger,

You might have 16 texture units but only 8 texture coords. And fixed 
pipeline texgens of course can be set up to 7th stage.


Cheers,
Wojtek

-Oryginalna wiadomość- 
From: Roger James

Sent: Wednesday, July 06, 2011 7:50 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] OSG 3.0 and osgShadow texture unit problems

Hi,

I had some shadow code that was working well on 2.8.5 but will not work on 
3.0.0. I verified that the same problem occurs with the OSG shadow example 
source. My test machine GPU (Nvidia) reports 16 texture units available. If 
I set the shadow texture unit number to anything higher than 7 then my 
OpenGL trace reports errors as soon as this texture unit is accessed (for 
texgens from the positionalStateContainer). This can be verified by adding 
the following patch to osgshadow.cpp.


Code:
   else /* if (arguments.read("--sm")) */
   {
   osg::ref_ptr sm = new osgShadow::ShadowMap;
sm->setTextureUnit(8);
   shadowedScene->setShadowTechnique(sm.get());

   int mapres = 1024;
   while (arguments.read("--mapres", mapres))
   sm->setTextureSize(osg::Vec2s(mapres,mapres));
   }




Here is a snippet of the OpenGL trace.

Code:
glGetString(GL_VERSION)="2.1.2"
glGetString(GL_RENDERER)="GeForce Go 7600/PCI/SSE2/..."
glGetString(GL_VERSION)="2.1.2"
...
glActiveTexture(GL_TEXTURE8)
glLoadMatrixd([1.00,0.00,0.00,0.00,0.00,1.00,0.00,0.00,0.00,0.00,1.00,0.00,0.00,0.00,0.00,1.00])
glTexGendv(GL_S,GL_EYE_PLANE,0x2715740) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_T,GL_EYE_PLANE,0x2715768) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_R,GL_EYE_PLANE,0x2715790) glGetError() =GL_INVALID_OPERATION
glTexGendv(GL_Q,GL_EYE_PLANE,0x27157b8) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_R,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION
glTexGeni(GL_Q,GL_TEXTURE_GEN_MODE,9216) glGetError() =GL_INVALID_OPERATION



Has anyone got any idea what is going on here. Has 3.0 reserved some 
resources that have in some way reduced the number of available texture 
units?


I am at a loss! Obviously I don't see any shadows!

Roger


Cheers,
Roger[/code]

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





___
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] Building OpenThreads with Qt Support: Any benefits?

2011-07-06 Thread Scott Wasinger
I understand that this support is mostly for mobile devices but I and my 
development team do a majority of our work on linux/windows systems using Qt 
not only for the GUI but for its portability of using QThreads, QNetwork and 
etc.

Is there a possible problem if we mix OpenThreads and QThreads in a 
application?  Especially if we are trying to have simulate a behavior of a 
vehicle in a three dimensional environment (Visually) 

Scott

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





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


Re: [osg-users] osgAnimation and official Kinect SDK

2011-07-06 Thread Jason Daly

On 07/06/2011 08:38 AM, Aitor Ardanza wrote:

I'm confused ... not sure if xna and osg use the same axes (xyz or xzy​​). 
getBoneMatrixFromKinectNuiControl give me a local rotation matrix, but do I 
need to change these to global?
I know that in "pBoneUpdate.at (i) ->  getStackedTransforms (). Push_back (new 
osgAnimation: StackedQuaternionElement (
"rotate" boneMatrices [i] ->  getMatrix (). getRotate ()));" I have to apply a 
local array... but I guess I missed something, because the rotations are no goods in the model.


I haven't touched the Kinect SDK, so I don't know for sure, but I have 
worked with DirectX in the past, and the coordinate systems between DX 
and OpenGL are quite different.


Microsoft historically has used a left-handed coordinate system for all 
of its coordinate frames, while OpenGL, and hence OSG, is right-handed.  
Beyond this, there's also a good chance that the base coordinate systems 
at each joint aren't what you're expecting.  The best approach would 
probably be to start with a simple one-joint model (if possible), and 
get that working properly first.  Then, you can generalize that to the 
whole body.


Sorry I can't give you any specifics, but I thought I'd say something 
since there hadn't been any replies yet.


--"J"

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


Re: [osg-users] OSG 3.0 and osgShadow texture unit problems

2011-07-06 Thread Roger James

Wojciech Lewandowski wrote:
> Hi, Roger,
> 
> You might have 16 texture units but only 8 texture coords. And fixed 
> pipeline texgens of course can be set up to 7th stage.
> 
> Cheers,
> Wojciech


I must admit I had not thought of that. But it was working on 2.8.5 on the same 
Opengl driver and hardware. I quess I will have to revert to a 2.8.5 build and 
rerun the trace to see what is different. I wonder if the getmaxtextureunit (or 
whatever it is) OSG call is reporting something different on 2.8.5. I use the 
high unit number to keep the shadow out of the way of some other stuff.

Roger

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





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


[osg-users] RTT issue when switching from fullscreen to windowed mode

2011-07-06 Thread Alessandro Terenzi
I started playing with RTT cameras and, having looked at some OSG examples, I 
tried my own code but when I switch from fullscreen to windowed mode the 
rendered texture doesn't appear as expected: it seems not to cover the whole 
quad as it does while in fullscreen, only a part of it is updated and as you 
stretch the window the rendered texture is stretched too (refer to attached 
images).

Here's my code:


Code:

int main( int argc, char **argv )
{
osg::ArgumentParser arguments(&argc,argv);
osgViewer::Viewer viewer(arguments);

// add stats and window size handlers...
viewer.addEventHandler( new osgViewer::StatsHandler() );
viewer.addEventHandler( new osgViewer::WindowSizeHandler() );

int screenWidth = 1366;
int screenHeight = 768;

// create the texture to render to...
osg::ref_ptr texture_RTT = new osg::Texture2D;
texture_RTT->setTextureSize(screenWidth, screenHeight);
texture_RTT->setInternalFormat(GL_RGBA);
texture_RTT->setFilter(osg::Texture2D::MIN_FILTER, osg::Texture2D::LINEAR);
texture_RTT->setFilter(osg::Texture2D::MAG_FILTER, osg::Texture2D::LINEAR);
texture_RTT->setResizeNonPowerOfTwoHint(false);

// create the quad...
osg::ref_ptr quad_RTT = osg::createTexturedQuadGeometry(
   osg::Vec3(0.0, 0.0, 0.0),
   osg::Vec3(screenWidth, 0.0, 0.0),
   osg::Vec3(0.0, screenHeight, 
0.0));

quad_RTT->setDataVariance( osg::Object::DYNAMIC );

osg::ref_ptr quad_geode_RTT = new osg::Geode;
quad_geode_RTT->addDrawable(quad_RTT.get());
quad_geode_RTT->setDataVariance( osg::Object::DYNAMIC );

osg::StateSet *quadState = quad_geode_RTT->getOrCreateStateSet();
quadState->setTextureAttributeAndModes(0, texture_RTT.get(), 
osg::StateAttribute::ON);
quadState->setMode( GL_LIGHTING, osg::StateAttribute::OFF | 
osg::StateAttribute::PROTECTED );

// create the camera...
osg::ref_ptr camera_RTT = new osg::Camera;

#ifdef USE_IMAGE
osg::ref_ptr image_RTT = new osg::Image;
image_RTT->allocateImage(screenWidth, screenHeight, 1, GL_RGBA, 
GL_UNSIGNED_BYTE);
camera_RTT->attach(osg::Camera::COLOR_BUFFER, image_RTT.get());
texture_RTT->setImage(0, image_RTT.get());
#else
camera_RTT->attach(osg::Camera::COLOR_BUFFER, texture_RTT.get());
#endif
 

//camera_RTT->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT, 
osg::Camera::FRAME_BUFFER);
camera_RTT->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER);
camera_RTT->setRenderOrder(osg::Camera::PRE_RENDER);

camera_RTT->setReferenceFrame( osg::Camera::ABSOLUTE_RF );
camera_RTT->setClearColor( osg::Vec4( 0., 0., 1., 1. ) );
camera_RTT->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

// add whatever children you want drawn to the texture
osg::ref_ptr< osg::Node > node = osgDB::readNodeFile("cow.osg");
if(node.valid())
{
const osg::BoundingSphere& bs = node->getBound();
float znear = 1.0f*bs.radius();
float zfar  = 3.0f*bs.radius();
float proj_top   = 0.25f*znear;
float proj_right = 0.5f*znear;
znear *= 0.9f;
zfar *= 1.1f;


camera_RTT->setProjectionMatrixAsFrustum(-proj_right,proj_right,-proj_top,proj_top,znear,zfar);

camera_RTT->setViewMatrixAsLookAt(bs.center()-osg::Vec3(0.0f,2.0f,0.0f)*bs.radius(),bs.center(),osg::Vec3(0.0f,0.0f,1.0f));

camera_RTT->addChild(node.get());
}
else
osg::notify(osg::FATAL)<<"model not loaded"addChild(quad_geode_RTT.get());

// add model to the viewer.
viewer.setSceneData( rootNode );

return viewer.run();
}




Sorry if the code doesn't visualize fine (I'm attaching a .cpp FYC).

The situation does not change if I use FRAME_BUFFER_OBJECT target instead of 
FRAME_BUFFER. On the other hand, it changes if I use an osg::Image (by defining 
USE_IMAGE in the above code, but performances are not so good (9 fps) as when 
using the texture).

What am I missing? 

Cheers.
Alessandro

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




Attachments: 
http://forum.openscenegraph.org//files/rtt_windowed_using_image_712.png
http://forum.openscenegraph.org//files/rtt_windowed_919.png
http://forum.openscenegraph.org//files/rtt_fullscreen_175.png
http://forum.openscenegraph.org//files/test_rtt_603.cpp


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


[osg-users] [build] OSG for Android build error

2011-07-06 Thread Kataev Victor
Hi, i try to compiling OSG for Android with OpenGL ES 2.0, using

http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android

and

http://www.openscenegraph.org/projects/osg/wiki/Community/OpenGL-ES

But had error

Code:

Compile++ thumb  : osgUtil <= RenderBin.cpp
arm-linux-androideabi-g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See  for instructions.
make[3]: *** 
[/home/victor/projects/AR/OpenSceneGraph-3.0.0/build/obj/local/armeabi-v7a/objs/osgUtil/RenderBin..o]
 Ошибка 1
make[3]: *** Ожидание завершения заданий...
make[2]: *** [Android-OpenSceneGraph] Ошибка 2
make[1]: *** [CMakeFiles/ndk.dir/all] Ошибка 2
make: *** [all] Ошибка 2




How to fix it?[/code]

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





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


Re: [osg-users] OSG 3.0 and osgShadow texture unit problems

2011-07-06 Thread Roger James
Wojciech,

You were right I was using

osg::Texture::Extensions::getNumTextureUnits
which on 2.8.5 returns GL_MAX_TEXTURE_UNITS
and on 3.0.0 returns GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS

I have reverted to a simple glGetIntegerv(GL_MAX_TEXTURE_UNITS)

Cheers,
Roger

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





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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Wang Rui
Hi Roman,

The EdgeCollapse::Edge belongs to osgUtil::Simplifier, which is used
for simplifying generated polygonal terrain tiles. I wonder if this
process causes the problem and we have to look for the bug into the
simplifier's implementation. Is it possible that you provide the
entire call stack information and where you downloaded the dem and dom
files?

Thanks,

Wang Rui


2011/7/7 Roman Grigoriev :
> Hi, here is gdb
> Starting program: /usr/local/bin/osgdem --run-path 
> /home/i/work/atlantik/earth -s build_master.source 
> --record-subtile-on-leaf-tiles -l 2 --task tasks/build_root_L0_X0_Y0.task 
> --log logs/build_root_L0_X0_Y0.log
> [Thread debugging using libthread_db enabled]
> RegisterWindowingSystemInterfaceProxy()
> X11WindowingSystemInterface()
> GraphicsContext::setWindowingSystemInterface() 0x8082128        0xbbcf60
> Opened DynamicLibrary osgPlugins-3.1.0/osgdb_osg.so
> VPBReaderWriter::readNode()
> readNode_new()
>   found ReaderWriter, readNode_new()
> Opened DynamicLibrary libosgTerrain.so
> Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osgterrain.so
> Opened DynamicLibrary libosg.so
> Constructing PixelBufferObject for image=0x80a93e0
> Constructing PixelBufferObject for image=0x80b6238
> CullSettings::readEnvironmentalVariables()
> Opened DynamicLibrary osgPlugins-3.1.0/osgdb_serializers_osg.so
> Now checking for plug-in osgPlugins-3.1.0/osgdb_nvtt.so
> osg::Registry::addImageProcessor(ImageProcessor)
> Loaded plug-in osgPlugins-3.1.0/osgdb_nvtt.so and located ImageProcessor
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x00de8fca in std::_Rb_tree, 
> osg::ref_ptr, 
> std::_Identity >, dereference_less, 
> std::allocator > 
> >::_M_erase(std::_Rb_tree_node >*) ()
>   from /usr/local/lib/libosgUtil.so.78
>
> Thank you!
>
> Cheers,
> Roman
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=41208#41208
>
>
>
>
>
> ___
> 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] Building OpenThreads with Qt Support: Any benefits?

2011-07-06 Thread Wang Rui
Hi Ryan,

Oh, I prefer so. It will be much clear for configuring OSG options for
specified use. :-)

Wang Rui


2011/7/6 Ryan Pavlik :
> So if this is primarily for mobile devices, would that be useful info to add
> to the CMakeLists.txt file as the option documentation, so it pops up as a
> tool-tip? Something like this patch?
> https://github.com/rpavlik/osg/compare/openscenegraph:master...clarify-qthreads
> Ryan
>
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Building OpenThreads with Qt Support: Any benefits?

2011-07-06 Thread Wang Rui
Hi Scott,

The osgQtBrowser and osgQtWidgets examples already make use of
QThreads and we don't see problems until now. But I'm not sure if
there will be any hidden bugs mixing two different threading APIs
(AFAIK, the MFC worker threads seem to have some conflicts with
OpenThreads). At least, I think it's not bad to unify your application
to use only Qt for threads, networks, GUIs and so on.

Wang Rui


2011/7/7 Scott Wasinger :
> I understand that this support is mostly for mobile devices but I and my 
> development team do a majority of our work on linux/windows systems using Qt 
> not only for the GUI but for its portability of using QThreads, QNetwork and 
> etc.
>
> Is there a possible problem if we mix OpenThreads and QThreads in a 
> application?  Especially if we are trying to have simulate a behavior of a 
> vehicle in a three dimensional environment (Visually)
>
> Scott
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=41211#41211
>
>
>
>
>
> ___
> 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] Reliable OpenSceneGraph asset import pipeline for animated skeletal models

2011-07-06 Thread Garthy Dee

Chris 'Xenon' Hanson wrote:
> 
> Well, I believe that both FBX and DAE are currently used in production by 
> users who keep
> them up to date as needed.
> 


Excellent, thanks for that. That's really useful to know. :)


> 
> If there really is a problem tied to the DAE loader, you might discuss it 
> with its
> author(s).
> 


Yes, that's a good idea. I think I should probably narrow it down a bit first 
before I did that though, in case the fault does not lie with the loader.

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





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


Re: [osg-users] [vpb] Questions regarding setname, optional layers and layer inheritance

2011-07-06 Thread Christiansen, Brad
Hi,

I haven't done a direct comparison on performance, but the only real overhead 
at tile loading is a small step in deciding which images to load. There are 
more files read from disk as the images are not inline which is probably a 
little slower that reading a single file but I don't think it will effect 
performance much.

>From my experience, the biggest hit is the 'unbounded' number of textures 
>required to render a single tile. Using the standard approach only a single 
>texture exists for each tile. Using optional layers you could theoretically 
>have an unlimited number of textures to render to each tile. In theory you 
>could even run out of texture units / samplers for each tile (though in 
>practice you need a lot of optional layers for this).

Accessing and blending multiple textures will obviously be slower than only 
using one, though I havent noticed much of a performance difference in practice 
when I turn on or off a bunch of optional layers. The other side effect of this 
is complicating the management of the shaders used to render the tile (assuming 
you are not using fixed function). To get good performance on both ATI and 
Nvidia cards I ended up creating a separate shader for all possible number of 
active optional layers and switching between them at run time. this works much 
better than my original approach which used dynamic branching in a single 
shader.

Cheers,

Brad


-Original Message-
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Torben 
Dannhauer
Sent: Wednesday, 6 July 2011 8:26 PM
To: osg-users@lists.openscenegraph.org
Subject: Re: [osg-users] [vpb] Questions regarding setname, optional layers and 
layer inheritance

Hi Brad,

I realized that I missed a very central question regarding optional layers:

How to they affect the rendering performance? 

Of course it takes some computation time to merge all different layers, but 
have you some hints how the performance is im comparison to a native database 
with all data directly integrated?

Thank you!

Cheers,
Torben

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





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


-
DISCLAIMER: This e-mail transmission and any documents, files and 
previous e-mail messages attached to it are private and confidential.  
They may contain proprietary or copyright material or information that 
is subject to legal professional privilege.  They are for the use of 
the intended recipient only.  Any unauthorised viewing, use, disclosure, 
copying, alteration, storage or distribution of, or reliance on, this 
message is strictly prohibited.  No part may be reproduced, adapted or 
transmitted without the written permission of the owner.  If you have 
received this transmission in error, or are not an authorised recipient, 
please immediately notify the sender by return email, delete this 
message and all copies from your e-mail system, and destroy any printed 
copies.  Receipt by anyone other than the intended recipient should not 
be deemed a waiver of any privilege or protection.  Thales Australia 
does not warrant or represent that this e-mail or any documents, files 
and previous e-mail messages attached are error or virus free.  

-

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


Re: [osg-users] [vpb] Can't build polygonal database with latest VPB an OSG (segmentation fault)

2011-07-06 Thread Roman Grigoriev
Hi, I download osgearth from git
take world.tif from osgearth/data
and run vpbmaster --POLYGONAL -t world.tif -o 1.osgb
 here is the stack
#0  0x00de8fca in std::_Rb_tree, 
osg::ref_ptr, 
std::_Identity >, dereference_less, 
std::allocator > 
>::_M_erase(std::_Rb_tree_node >*) ()
   from /usr/local/lib/libosgUtil.so.78
#1  0x00de902c in std::_Rb_tree, 
osg::ref_ptr, 
std::_Identity >, dereference_less, 
std::allocator > 
>::_M_erase(std::_Rb_tree_node >*) ()
   from /usr/local/lib/libosgUtil.so.78
#2  0x00de553f in EdgeCollapse::~EdgeCollapse() () from 
/usr/local/lib/libosgUtil.so.78
#3  0x00de6989 in osgUtil::Simplifier::simplify(osg::Geometry&, 
std::vector > const&) ()
   from /usr/local/lib/libosgUtil.so.78
#4  0x001d5b12 in vpb::DestinationTile::createPolygonal() () from 
/usr/local/lib/libvpb.so.12
#5  0x001dd512 in vpb::DestinationTile::createScene() () from 
/usr/local/lib/libvpb.so.12
#6  0x001de1c2 in vpb::CompositeDestination::createPagedLODScene() () from 
/usr/local/lib/libvpb.so.12
#7  0x001dea8f in vpb::CompositeDestination::createSubTileScene() () from 
/usr/local/lib/libvpb.so.12
#8  0x001be500 in vpb::DataSet::_writeRow(std::map, 
std::allocator > >&) 
() from /usr/local/lib/libvpb.so.12
#9  0x001bed8b in vpb::DataSet::_buildDestination(bool) () from 
/usr/local/lib/libvpb.so.12
#10 0x001c75bb in vpb::DataSet::_run() () from /usr/local/lib/libvpb.so.12
#11 0x001c7b2b in vpb::DataSet::run() () from /usr/local/lib/libvpb.so.12
#12 0x0804c3f8 in main ()




Thank you!

Cheers,
Roman

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





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


[osg-users] Setting the reference location for LOD calcs for a camera

2011-07-06 Thread Christiansen, Brad
Hi,

I am producing some depth textures for shadowing using a couple of RTT cameras.
When producing these depth maps I want to use the same LOD levels (from a VPB 
based PagedLOD database) that are rendered by the 'main' camera.

I am sure I have done this before and there was a simple method to do so 
(something like camera->setReferenceEyePoint()). Can anyone point me to the 
correct approach for doing this?

Cheers,

Brad


-
DISCLAIMER: This e-mail transmission and any documents, files and 
previous e-mail messages attached to it are private and confidential.  
They may contain proprietary or copyright material or information that 
is subject to legal professional privilege.  They are for the use of 
the intended recipient only.  Any unauthorised viewing, use, disclosure, 
copying, alteration, storage or distribution of, or reliance on, this 
message is strictly prohibited.  No part may be reproduced, adapted or 
transmitted without the written permission of the owner.  If you have 
received this transmission in error, or are not an authorised recipient, 
please immediately notify the sender by return email, delete this 
message and all copies from your e-mail system, and destroy any printed 
copies.  Receipt by anyone other than the intended recipient should not 
be deemed a waiver of any privilege or protection.  Thales Australia 
does not warrant or represent that this e-mail or any documents, files 
and previous e-mail messages attached are error or virus free.  

-

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


Re: [osg-users] [vpb] Questions regarding setname, optional layers and layer inheritance

2011-07-06 Thread Torben Dannhauer
Hi Brad,

thanks for the update.

Yesterday I successfully created a database with an optional imagery layer. The 
.dds files were created in the separate folder as desired. With the elevation I 
was not successful, but the question raised what file format would be used for 
the optional elevation layer? I don't think .dds is the appropriate one ;)

Anyway - it seems I was too naive regarding the integration of optional layers. 
I use FFP in my project and I'm still a beginner in shaders, so it will be a 
bumpy way for me to get optional layers working :)
I'll go in the next days through your advices how to display optional layers 
and try to get a basic idea what the main aspects are.

Cheers,
Torben

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





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