Re: near clip & FOV problem

New Message Reply Date view Thread view Subject view Author view

Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Sat, 2 Mar 1996 15:53:54 +0100


On Mar 1, 4:33pm, Shawn Soeder wrote:
> Subject: near clip & FOV problem
> Performers,
>
> Question 1:
> I have an app that is based on perfly. I modified the frustum via
> pfMakePerspFrust() and everything is fine. However, when moving the near
> clipping plane via the gui (pfChanNearFar()), I find that the vertical FOV
> changes. This was verified by printing the results of pfGetFrustFOV() before
> and after pfChanNearFar(). Note that changing the far clipping plane seems
> to work correctly. What am I doing wrong?

pfMakePerspFrust specifies the field of view by defining a window on the
near clip plane, if you move the near clip you'll change the angles the
window borders subtend with the viewing direction.
Perhaps you are seeing an associated side effect.
If you have a pfFrustum try using ratios & pfMakePerspFrust to correct the
angle.
If not then this may be a pfChannel bug due to the above, try respecifying
the FOV for the channel after you make the change to the near clip.

>
> Question 2:
> I'm trying to model an out-the-window scene for an aircraft flying at high
> altitude (40,000 ft) on a relatively clear day. Because I must be able to
> see things far away (the horizon) and things close (my wing man), my near
> clipping plane is small, and my far clipping plane is large. It seems that
> I'm out of luck trying to get Performer's fog model to give me a little haze
> near the horizon. (It works if the near clipping plane is relatively large).
> Is there a way to do this?
>

Try defining two overlapping pfChannels with different clip distances, one
for the immediate foreground and one for the world. Make sure the far
clip of the foreground extends beyond the near of the world, the overlap
should be big enough to accomodate transitioning objects & avoid having to
draw them to both channels in a single frame.
You could then use traversal masks and/or multiple scenes to move the
wingman between near & far scenes. You'd only need a very small
foreground frustum since pushing out your near clip by a little will
help your fog a lot.
Fog transition between channels shouldn't be a problem because you only
require it in the distance.
The major problem you will have is the zbuffer. You should draw your near
channel second and in its pre-draw function call pfClear(PFCL_DEPTH)
instead of pfClearChan(). Don't use the multisample tag clear because this
will destroy anti-aliasing between the foreground objects and the background
scene, I don't expect a z clear to cause the same problem but I haven't tried
this.

Good Luck,
Angus.

>
> For the record: Performer 1.2, Crimson RE, Irix 5.3.
>
> Thanks,
> Shawn
>
>
>-- End of excerpt from Shawn Soeder

-- 
Angus Dorbie,
Silicon Graphics Ltd, UK
dorbie++at++reading.sgi.com

New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:31 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.