Discussion:
PagedLODs and PIXEL_TO_SCREEN_SIZE
(too old to reply)
Aaron Rolett
2006-06-23 01:28:09 UTC
Permalink
Hello All,
I'm currently working on writing a panorama viewer in OpenSceneGraph
to view very large (multi-gigapixel images). I can't fit the entire
image in computer memory at once and am currently using PagedLOD to
bring in the more detailed images of the panorama.

The problem I'm having -- currently the point at which the next level
of detail varies with the field of view of the camera and the size of
the overall panorama. What I really need to do is figure out how to
bring in the more detailed panorama information based on the amount of
amount of pixels on the screen. I've been looking through the LOD
source code and have noticed that there is a setRangeMode() function
that can be set to PIXEL_TO_SCREEN_SIZE.

The problem: I don't understand how the LOD range is calculated when
working in PIXEL_TO_SCREEN_SIZE mode. How does LOD determine when to
bring in the next level / how does one typically calculate the ranges
used for LOD? Thus far, all the numbers I am using have just been
empirically determined.

Currently I am just setting the range with
pagedlod->addChild(tile, cut_off_distance, max_visible_distance);
pagedlod->setRange(1, 0.0f, cut_off_distance);

Thanks in advance,
Aaron
Robert Osfield
2006-06-23 07:48:32 UTC
Permalink
Hi Aaron,

The pixel based LOD ranges settings uses the bounding sphere of the
LOD projected into screenspace as the metric of the pixel size.

Robert.
Post by Aaron Rolett
Hello All,
I'm currently working on writing a panorama viewer in OpenSceneGraph
to view very large (multi-gigapixel images). I can't fit the entire
image in computer memory at once and am currently using PagedLOD to
bring in the more detailed images of the panorama.
The problem I'm having -- currently the point at which the next level
of detail varies with the field of view of the camera and the size of
the overall panorama. What I really need to do is figure out how to
bring in the more detailed panorama information based on the amount of
amount of pixels on the screen. I've been looking through the LOD
source code and have noticed that there is a setRangeMode() function
that can be set to PIXEL_TO_SCREEN_SIZE.
The problem: I don't understand how the LOD range is calculated when
working in PIXEL_TO_SCREEN_SIZE mode. How does LOD determine when to
bring in the next level / how does one typically calculate the ranges
used for LOD? Thus far, all the numbers I am using have just been
empirically determined.
Currently I am just setting the range with
pagedlod->addChild(tile, cut_off_distance, max_visible_distance);
pagedlod->setRange(1, 0.0f, cut_off_distance);
Thanks in advance,
Aaron
_______________________________________________
osg-users mailing list
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
Antoine Hue
2006-06-23 17:24:51 UTC
Permalink
Post by Robert Osfield
Hi Aaron,
The pixel based LOD ranges settings uses the bounding sphere of the
LOD projected into screenspace as the metric of the pixel size.
You may actually modify the LOD reference sphere by setting its center
and/or radius. This is sometimes very useful.

Antoine
Chris Hanson
2006-06-26 16:40:26 UTC
Permalink
Post by Aaron Rolett
Currently I am just setting the range with
pagedlod->addChild(tile, cut_off_distance, max_visible_distance);
pagedlod->setRange(1, 0.0f, cut_off_distance);
The "distance range" values in PagedLOD are no longer distanced when in
PIXEL_TO_SCREEN_SIZE mode. Instead, they are pixel sizes. When the bounding-sphere of the
PagedLOD becomes larger or smaller onscreen than these thresholds is when the LOD changes.
It's a very good system that allows you to have your LOD adapt to larger and smaller
screen resolutions, camera zoom, etc. It's much more practical than arbitrary "distances".
Post by Aaron Rolett
Thanks in advance,
Aaron
--
Chris 'Xenon' Hanson aka Eric Hammil | http://www.3DNature.com/ eric at logrus
"I set the wheels in motion, turn up all the machines, activate the programs,
and run behind the scenes. I set the clouds in motion, turn up light and sound,
activate the window, and watch the world go 'round." -Prime Mover, Rush.
Loading...