[osg-users] how to zoom in and out in orthographic projection

Ralph Kern usenet04 at rk-se.de
Mon May 5 00:11:40 PDT 2008


hi Rahul,

did you take care of the inverse effect of distance and pixel size?

An object far away (large distance) has a small pixel size on screen. So 
you perhaps have to reorder your LOD range.

regards Ralph

Rahul Jain schrieb:
> Hi Paul,
> Thanks for the answer and sorry for being so desperate last time.
> We tried the approach you mentioned by writing a node visitor and
> setting the range node(PIXEL_SIZE_ON_SCREEN)  for  LOD nodes. But the
> effect i am getting is completely opposite, as i zoom in the high
> resolution data disappears and when i zoom out high resolution data is
> loaded. I tried the same thing with perspective projection also and i am
> getting the same effect. I am not able to understand what am i doing wrong.
> cheers
> RJ
> 
> 
> Paul Melis wrote:
>> Posting your question just once and waiting a bit for an answer would be 
>> nice...
>>
>> santosh wrote:
>>   
>>> how to do zoom in and out in orthographic projection?
>>> As I zoom in  the detailed geometry should be loaded .
>>>
>>> Right now I am scaling the  geometry but in this method the details are 
>>> not getting loaded.
>>>     
>> How did you implement the zoom in your projection, just by changing the 
>> viewport to be smaller? In that case the distance from the viewpoint to 
>> your objects doesn't change and therefore the same LOD-level will 
>> continue to be selected, as the default RangeMode for an osg::LOD is 
>> DISTANCE_FROM_EYE_POINT. Changing it to PIXEL_SIZE_ON_SCREEN should make 
>> your LODs switch to more detailed models if you zoom in.
>>
>> Paul
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>>   
> 



More information about the osg-users mailing list