Angus Dorbie (dorbie++at++bitch.reading.sgi.com)
Sat, 2 Mar 1996 15:53:54 +0100
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
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:31 PDT