[osg-users] PagedLOD range for 2D image tiles
Bruno Oliveira
bruno.manata.oliveira at gmail.com
Wed Sep 14 02:09:45 PDT 2016
Thank you for the answers.
So, Let me draw a specific scenario: an image pyramid, starting at scale
0.125, going all the way up to 0.25, 0.5, 1.0.
I am also using an Ortho2D projection (field of view 30 degrees). The tiles
are fixed size, and I know their size in pixels.
Can I use PIXEL_SIZE_ON_SCREEN for my purpose?
The first level (scale = 0.125), I should setRange(id, 0, A);
Second level (scale = 0.25), setRange(id, A, B); and so on,
and on Last Level (scale = 1.0, hence original image size), setRange(id, X,
FLT_MAX);
For one texel being 1 pixel on screen, how do I calculate A, B, and so on?
Or am I thinking this the wrong way?
2016-09-14 8:38 GMT+01:00 Valerian Merkling <niarkoleptik at gmail.com>:
> Hi Bruno,
>
> I recently had the same thing to do !
>
> To solve this, I first used a Ortho2D projection matrix for my camera.
>
> I also change the Z value of the camera when I move it, to make it work
> almost as a perspective camera
> - eyepoint Z = 100 for a 1:1 zoom ratio
> - eyepoint Z = 1000 for a 1:10 ratio
>
> With this you can use the DISTANCE_FROM_EYE point configuration of the
> pagedLOD.
>
> I also made my own LOD class, derivated from pagedLOD, and changed the
> traverse function a bit to only use the Z value of the eye point and not
> this position.
>
>
> I hope this can help you and give you ideas !
>
> Valerian
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=68599#68599
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160914/28013d08/attachment-0003.htm>
More information about the osg-users
mailing list