Hi,

I tried this change on my MacBook Pro with ATI Radeon X1600.

Setting .1 to znear increases a chance of flickering 3D clouds as Tim  
mentioned. Changing it to .4 reduces the flicker but not enough on my  
Mac. .7 will be sufficient to eliminate flicker in most of views but  
you cannot see very near side of the cockpit.

As Tim mentioned, we need to settle the default value of this property  
for reasonable result in many machines, but I guess it is a bit hard.  
I wonder if decreasing the zfar reduces the chance of flickering. Will  
try it tonight.

Anyway, it is very good to have these properties exposed so that users  
can adjust these for getting a suitable result. Thanks Tim!

In my own opinion, the default value can be .1 if we provide a brief  
guide for ajdusting these properties.
We can write a wiki page about it and advertise the guide via here and/ 
or the forums.

I also found the side effect of putting small number to near-field  
(the boundary of near and far camera). If you place the boundery in  
front of the propeller, the alpha blend of the propeller seems not  
working and thus it hides the 3D clouds behind it. For example,  
putting 1 to near-field when in the cockpit view of A6M2 hides the 3F  
clouds behind the propeller.

I think the far camera is for avoiding such problem so this can be  
predictable side effect. But if this can be solved, that would be  
great. (I'm not that sure if we need to though).

I also want to add a fact that the blackbox issue does not appear on  
my macs, and I have never heard about similar issues from Mac users yet.
So most of mac users don't have to adjust these properties.

Best,

Tat @ iPhone

On Dec 29, 2008, at 5:40 PM, Tim Moore <timo...@redhat.com> wrote:

> Alex Romosan wrote:
>> the latest commit to src/Main/CameraGroup.cxx changed the value of
>> zNear from .1 to .4 and this causes strange artifacts to show up when
>> panning around (like holes in the cockpit, etc.). the following patch
>> changes it back:
>>
>> --- src/Main/CameraGroup.cxx    27 Dec 2008 14:35:33 -0000      1.9
>> +++ src/Main/CameraGroup.cxx    29 Dec 2008 06:58:41 -0000
>> @@ -446,7 +446,7 @@
>>             cgroup->buildGUICamera(pNode);
>>         }
>>     }
>> -    bindMemberToNode(gnode, "znear", cgroup,  
>> &CameraGroup::_zNear, .4f);
>> +    bindMemberToNode(gnode, "znear", cgroup,  
>> &CameraGroup::_zNear, .1f);
>>     bindMemberToNode(gnode, "zfar", cgroup, &CameraGroup::_zFar, 120000.0 
>> f);
>>     bindMemberToNode(gnode, "near-field", cgroup,  
>> &CameraGroup::_nearField,
>>                      100.0f);
>>
>> any reason for the change?
> FlightGear displays an enormous visual range, from 4 inches in front  
> of your
> eyes out to 120km now and more in the future. It's a basic fact when  
> using
> Z-buffered computer graphics that the precision of the Z-buffer  
> deteriorates
> with huge near-far spreads and that the near plane distance has a  
> much greater
> effect than the far plane. The symptoms are flickering, jitter, and  
> other
> unpleasantness. About a year ago I added a scheme to use several  
> cameras within
> the scene graph to work around this problem. Each camera draws a  
> slice of the
> scene using the full range of the Z buffer. This mostly works well,  
> though
> depending on your video hardware you can occasionally see a line in  
> the scene.
> This should be able to be eliminated with some tuning. Recently, as  
> part of the
> work in implementing shadow maps, I moved the cameras out of the  
> scene graph to
> a "top level". For some reason this provoked the "black-rectangle"  
> bug on some
> video hardware that's reared its head in the forums, but that's  
> another story :)
> Anyway, my intention is to restrict shadows to the near camera.  
> Shadow maps are
> even more sensitive to near-far plane precision issues than the  
> normal Z buffer,
> so I'm experimenting with pushing the near plane out. .4 meters seemed
> sufficient to me, but others don't agree, so perhaps we can settle  
> on some value
> larger than .1. The near plane value is settable, both in the camera
> configuration and as a "live" property in /sim/rendering/camera- 
> group/znear.
>
> Tim
>
> --- 
> --- 
> --- 
> ---------------------------------------------------------------------
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel

------------------------------------------------------------------------------
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to