Re: [osg-users] Terrain Center and Size/Extent (TXP, LoD)

2016-07-01 Thread Robert Osfield
Hi John,

The txp database itself will determine the default distances at with
the LOD's will transistion, this including the furthest distance
objects can be seen.

You can bias the distances that LOD transition by using the
Camera::setLODScale(scale)  method.

In general txp databases are built for decade+ old hardware so tends
to be very conservative w.r.t LOD scales, so often you'll be able to
use LODScale to get better visuals without loosing 60Hz.

Robert.

On 1 July 2016 at 14:54, John Farrier  wrote:
> Hi,
>
> I am using the terrapage (TXP) plugin to render large terrain.  I want to 
> push the terrain out to the horizon more, but it seems to page out a bit 
> early (at distance).  Is there a way to
>
> 1.) Control the amount (extent) of terrain that is paged in or the distance 
> at which it pages out terrain (i.e. the maximum distance for it to render).  
> Could I set the maximum distance to "x" and override some other default?  
> What determines the point at which the terrain is not being loaded at 
> distance?
>
> or
>
> 2.) Control the center of the terrain?  It seems to center high-resolution 
> terrain UNDER the camera, even when the camera is looking OUT.  Ideally I'd 
> like to have high resolution terrain where the camera is looking.
>
> These are two different issues, but related.  Improving either would be a big 
> help.
>
> Thank you!
>
> Cheers,
> John
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67956#67956
>
>
>
>
>
> ___
> 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] osgViewer Threading Model problem.

2016-07-01 Thread Robert Osfield
HI Dario,

On 1 July 2016 at 14:26, Dario Minieri  wrote:
> All data change on osg tree are made inside callback, so theoretically we 
> have no "parallel" change during frame. However there are a lot of visitors 
> that I have to check, may be could do data alteration. In my test, actually, 
> there is osgHimmel and osgOcean also inside scene.
>
> This type of problem, anyway, is generated by osg tree alteration parallel to 
> frame only?

The DrawThreadPerContext threading model enables the draw thread of
one frame to run in parallel with the update, event and cull
traversals of the next frame.  This means that if you modify Drawable
or StateSet/Texture etc. state within the update, event or cull
traversals then you'll end up with a race condition.

The OSG uses a osg::Object::setDataVariance(osg::Object::STATIC |
osg::Object::DYNAMIC) hint to tell the draw traversal whether it's
safe the next frame proceed.  The way it works is the draw traversal
holds back the next frame till all the Drawable and StateSet's marked
with DYNAMIC DataVariance are dispatched.

My best guess is that you're modifying some state or drawable in the
update or event traversal (via callback for instance) without marking
the Drawable's or StateSet that encloses the dynamic state with a
DataVaraince of DYNAMIC.

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


Re: [osg-users] Controlling drawing order

2016-07-01 Thread Trajce Nikolov NICK
Hi Valerian,

you can try:
node->getOrCreateStateSet()->setRenderBinDetails(MY_ORDER_NUMBER,
"RenderBin");

On Fri, Jul 1, 2016 at 4:59 PM, Valerian Merkling 
wrote:

> Hi,
>
>  0
> down vote
> favorite
>
>
> I'm working on a little GIS app using OSG.
>
> First I need to say that I do not need to get more than 15fps.
>
> I have to draw multiple layers on the same view. Layers may overlaps, but
> not always.
>
> Right now, to be able to choose which layer is on top of the others, i'm
> using the PolygonOffet properties, but I don't like it.
>
> So here is what I want to try :
> -put a clear node on my root to clear all the buffers
> -put a clear node on top of each layer node to clear only the depth buffer
> -Try to control the rendering order with the child index (assuming that
> the first child is rendered first , and the second after ...)
>
> Problem is that the Color buffer is never cleared with this setup, and I
> think I misunderstood how to use clear nodes.
>
> So my question is : - Is it possible ? - How can I choose the rendering
> order of my layer's node ?
>
>
> Thank you!
>
> Valerian
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67959#67959
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] Controlling drawing order

2016-07-01 Thread Valerian Merkling
Hi,

 0
down vote
favorite


I'm working on a little GIS app using OSG.

First I need to say that I do not need to get more than 15fps.

I have to draw multiple layers on the same view. Layers may overlaps, but not 
always.

Right now, to be able to choose which layer is on top of the others, i'm using 
the PolygonOffet properties, but I don't like it.

So here is what I want to try : 
-put a clear node on my root to clear all the buffers 
-put a clear node on top of each layer node to clear only the depth buffer 
-Try to control the rendering order with the child index (assuming that the 
first child is rendered first , and the second after ...)

Problem is that the Color buffer is never cleared with this setup, and I think 
I misunderstood how to use clear nodes.

So my question is : - Is it possible ? - How can I choose the rendering order 
of my layer's node ?


Thank you!

Valerian

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





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


Re: [osg-users] Terrain Center and Size/Extent (TXP, LoD)

2016-07-01 Thread Trajce Nikolov NICK
Hi John,

1). TerraPage (and TerraVista) uses this SmartMesh for LOD management, and
these are obviouslly set by TerraVista. So this is one way of controling
it. The other way is to set the LOD scale for your camera (if you are using
osgviewer press 'h' onscreen help with some key bindings will appear for
this, but you can set it through code as well)

2). Probably you are using osgviewer (or alike application) where the
initial position is set a bit far from the archive. If you want to center
it I believe you get the bounds of the node representing the trpage archive
and place it at the center. The extent of the trpage archive is set in the
header, so other way is to use the trpage API (part of the txp loader) and
access the header and set the eye accordingly .

Hope this helps. It's been more then 10years since I was trpage engineer .
I thought it is dead by this new CDB from Presagis :-)

Cheers!
Nick

On Fri, Jul 1, 2016 at 3:54 PM, John Farrier  wrote:

> Hi,
>
> I am using the terrapage (TXP) plugin to render large terrain.  I want to
> push the terrain out to the horizon more, but it seems to page out a bit
> early (at distance).  Is there a way to
>
> 1.) Control the amount (extent) of terrain that is paged in or the
> distance at which it pages out terrain (i.e. the maximum distance for it to
> render).  Could I set the maximum distance to "x" and override some other
> default?  What determines the point at which the terrain is not being
> loaded at distance?
>
> or
>
> 2.) Control the center of the terrain?  It seems to center high-resolution
> terrain UNDER the camera, even when the camera is looking OUT.  Ideally I'd
> like to have high resolution terrain where the camera is looking.
>
> These are two different issues, but related.  Improving either would be a
> big help.
>
> Thank you!
>
> Cheers,
> John
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67956#67956
>
>
>
>
>
> ___
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



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


[osg-users] Terrain Center and Size/Extent (TXP, LoD)

2016-07-01 Thread John Farrier
Hi,

I am using the terrapage (TXP) plugin to render large terrain.  I want to push 
the terrain out to the horizon more, but it seems to page out a bit early (at 
distance).  Is there a way to 

1.) Control the amount (extent) of terrain that is paged in or the distance at 
which it pages out terrain (i.e. the maximum distance for it to render).  Could 
I set the maximum distance to "x" and override some other default?  What 
determines the point at which the terrain is not being loaded at distance?

or 

2.) Control the center of the terrain?  It seems to center high-resolution 
terrain UNDER the camera, even when the camera is looking OUT.  Ideally I'd 
like to have high resolution terrain where the camera is looking.

These are two different issues, but related.  Improving either would be a big 
help.

Thank you!

Cheers,
John

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





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


Re: [osg-users] osgViewer Threading Model problem.

2016-07-01 Thread Dario Minieri
Hi,

All data change on osg tree are made inside callback, so theoretically we have 
no "parallel" change during frame. However there are a lot of visitors that I 
have to check, may be could do data alteration. In my test, actually, there is 
osgHimmel and osgOcean also inside scene.

This type of problem, anyway, is generated by osg tree alteration parallel to 
frame only? 

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] osgViewer Threading Model problem.

2016-07-01 Thread Robert Osfield
Hi Dairo,

Are you modifying data during the frame?

Robert.

On 1 July 2016 at 10:13, Dario Minieri  wrote:
> Hi,
>
> I'm using SingleThreaded model inside the Viewer. Using another model 
> threading like DrawThreadPerContext I have various errors like:
>
> Warning:TextureRectangle::apply(..) failed, texture rectangle is not support 
> by your OpenGL drivers.
>
> and
>
> Warning: RenderStage::runCameraSetUp(State&) Pbuffer does not support 
> multiple color outputs.
>
> That is strange, because the card is Nvidia GTX 770, driver 352.63 which have 
> to support texturerectangle...
>
> Have you some ideas about this problem?
>
> Thank you!
>
> Cheers,
> Dario
>
> --
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=67949#67949
>
>
>
>
>
> ___
> 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] Get current Billboard ModelView matrix?

2016-07-01 Thread Philipp Meyer
Hi,


> If you only need the movement towards/away from you, you can use the
> previous frames depth and perform difference computation based on the
> difference of the linear depth. 


Im not exactly sure what you mean here. Are you talking about rendering the 
depth of each frame to a texture and comparing the values with the next frame 
to compute the delta?

If so, wouldnt that be a pixel based approach again suffering the same problems 
as I mentioned earlier as a response to mp3butcher?


> I'd simply pass the view matrix inverse (pre frame) and calculate the
> modelmatrix via inverse_view * model_view_matrix.


That works, but only gives me the current modelMatrix. I need the modelMatrix 
of the previos frame though. Because objects can move in my scene, I can not 
calculate the old vertex position by simply using the current modelMatrix with 
the old viewMatrix.

Thank you!

Cheers,
Philipp

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





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


[osg-users] osgViewer Threading Model problem.

2016-07-01 Thread Dario Minieri
Hi,

I'm using SingleThreaded model inside the Viewer. Using another model threading 
like DrawThreadPerContext I have various errors like: 

Warning:TextureRectangle::apply(..) failed, texture rectangle is not support by 
your OpenGL drivers. 

and

Warning: RenderStage::runCameraSetUp(State&) Pbuffer does not support multiple 
color outputs.

That is strange, because the card is Nvidia GTX 770, driver 352.63 which have 
to support texturerectangle... 

Have you some ideas about this problem?

Thank you!

Cheers,
Dario

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





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


Re: [osg-users] Get current Billboard ModelView matrix?

2016-07-01 Thread Sebastian Messerschmidt

Hi Phillip,

Hi,

I'm using shaders to do some pre computations for a realtime radar simulation. 
(Some further processing is done with CUDA) The delta distance is required for 
the calculation of the doppler effect.

So yes, I guess I'm using shaders in a weird way. Unfortunately it would be 
very difficult do migrate to CUDA, because that would require me to do all 
graphics calculations by myself in the cuda kernel (Z test etc.)
If you only need the movement towards/away from you, you can use the 
previous frames depth and perform difference computation based on the 
difference of the linear depth.




So, to get back to my original question, is there any way to get a current 
Billboards modelMatrix? How do I use billboard->computeMatrix() properly?
I'd simply pass the view matrix inverse (pre frame) and calculate the 
modelmatrix via inverse_view * model_view_matrix.


Cheers
Sebastian


Thank you!

Cheers,
Philipp

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





___
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] Get current Billboard ModelView matrix?

2016-07-01 Thread Philipp Meyer
Hi,

I'm using shaders to do some pre computations for a realtime radar simulation. 
(Some further processing is done with CUDA) The delta distance is required for 
the calculation of the doppler effect.

So yes, I guess I'm using shaders in a weird way. Unfortunately it would be 
very difficult do migrate to CUDA, because that would require me to do all 
graphics calculations by myself in the cuda kernel (Z test etc.)

So, to get back to my original question, is there any way to get a current 
Billboards modelMatrix? How do I use billboard->computeMatrix() properly?

Thank you!

Cheers,
Philipp

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





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


Re: [osg-users] Odd Text Distortion (Which Does Not Appear to Be Due to the 3.2 Bugfix)

2016-07-01 Thread Jens Georg



It's not entirely clear what the specific issue might be from your
description, it sounds like it's simply that the wrong font is being
used, from the the look of the picture it looks like the fallback
built in font is being used.  This would normally only happen if you
don't have the freetype plugin built.


Or trying to open a font that does not exist which can happen with
examples that reference data/times.ttf etc. or being on an embedded
system with no fonts at all
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org