Thread: RE: [Algorithms] Return of the front clip plane
Brought to you by:
vexxed72
From: Steve W. <Ste...@im...> - 2000-08-03 19:15:40
|
> -----Original Message----- > From: Jason Zisk [mailto:zi...@n-...] > > Another solution is to just make your player's bounding > volume larger so you can't get close enough to stuff to > clip into it, this works okay but I find that you have > to keep the player from getting closer than 3 units with > a 1 unit clip because of viewport rotation (just keeping the > player 1 unit away is fine if you are staring straight at a > wall but as soon as you rotate the edges of your viewport > will clip it). > For my FPS I used a wall that I walked up to then looked up and down, then adjusted my collision detection to prevent the player's view from clipping the wall simply because of the view angle. It seems to work fine...I wouldn't want to get into changing the viewport dimensions cause wouldn't it distort the scene? I'd reserve changing viewport dimensions for special effects like underwater wooziness. R&R |
From: Tom F. <to...@mu...> - 2000-08-03 19:51:12
|
Moving the near (and possibly far - depends on your app) clip planes dynamically works very well indeed. Yes, there is the slight artifact that walking past a tree affects the Z precision of the far-off building that you're actually looking at, but then it's pretty hard to think of any system that will do it any better, apart from the Z-partition trick (which is expensive in some cases - though dead easy for flight sims). Tom Forsyth - Muckyfoot bloke. Whizzing and pasting and pooting through the day. > -----Original Message----- > From: Steve Wood [mailto:Ste...@im...] > Sent: 03 August 2000 20:09 > To: 'gda...@li...' > Subject: RE: [Algorithms] Return of the front clip plane > > > > -----Original Message----- > > From: Jason Zisk [mailto:zi...@n-...] > > > > Another solution is to just make your player's bounding > > volume larger so you can't get close enough to stuff to > > clip into it, this works okay but I find that you have > > to keep the player from getting closer than 3 units with > > a 1 unit clip because of viewport rotation (just keeping the > > player 1 unit away is fine if you are staring straight at a > > wall but as soon as you rotate the edges of your viewport > > will clip it). > > > > For my FPS I used a wall that I walked up to then looked up > and down, then > adjusted my collision detection to prevent the player's view > from clipping > the wall simply because of the view angle. It seems to work fine...I > wouldn't want to get into changing the viewport dimensions > cause wouldn't it > distort the scene? I'd reserve changing viewport dimensions > for special > effects like underwater wooziness. > > R&R > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |
From: Stephen J B. <sj...@li...> - 2000-08-04 12:18:25
|
On Thu, 3 Aug 2000, Tom Forsyth wrote: > Moving the near (and possibly far - depends on your app) clip planes > dynamically works very well indeed. Yes, there is the slight artifact that > walking past a tree affects the Z precision of the far-off building that > you're actually looking at, but then it's pretty hard to think of any system > that will do it any better, apart from the Z-partition trick (which is > expensive in some cases - though dead easy for flight sims). I think you want to limit the maximum value for Z near too - and doing that at some reasonable distance (like 3 feet say) should minimise the effect of walking past a tree. You could also only pull the range in closer when the object that's about to be clipped is inside the field-of-view. At any rate, the need to not clip out the ground you are standing on limits the maximum Z-near that you can achieve. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |
From: Feltman, H. <Fe...@se...> - 2000-08-03 20:59:57
|
So how does this sound: - Create a frustum which matches your graphics API's frustum with the exception of the near plane; for this, use the minimum near plane you can handle. - Clip world geometry (or a bounding version) to this frustum manually just like the good old days. - Use the closest clipped point of "whatever is left after clipping" to the eye plane as the distance for the near plane for a new frustum, send this frustum to the graphics API, and draw the world geometry for this frame. I'm sure it would work; is this the way you did it? Hamilton Feltman SEGA AMUS/ARCADE www.sega.com/alienfront > -----Original Message----- > From: Tom Forsyth [SMTP:to...@mu...] > Sent: Thursday, August 03, 2000 12:46 PM > To: gda...@li... > Subject: RE: [Algorithms] Return of the front clip plane > > Moving the near (and possibly far - depends on your app) clip planes > dynamically works very well indeed. Yes, there is the slight artifact that > walking past a tree affects the Z precision of the far-off building that > you're actually looking at, but then it's pretty hard to think of any > system > that will do it any better, apart from the Z-partition trick (which is > expensive in some cases - though dead easy for flight sims). > > Tom Forsyth - Muckyfoot bloke. > Whizzing and pasting and pooting through the day. > > > -----Original Message----- > > From: Steve Wood [mailto:Ste...@im...] > > Sent: 03 August 2000 20:09 > > To: 'gda...@li...' > > Subject: RE: [Algorithms] Return of the front clip plane > > > > > > > -----Original Message----- > > > From: Jason Zisk [mailto:zi...@n-...] > > > > > > Another solution is to just make your player's bounding > > > volume larger so you can't get close enough to stuff to > > > clip into it, this works okay but I find that you have > > > to keep the player from getting closer than 3 units with > > > a 1 unit clip because of viewport rotation (just keeping the > > > player 1 unit away is fine if you are staring straight at a > > > wall but as soon as you rotate the edges of your viewport > > > will clip it). > > > > > > > For my FPS I used a wall that I walked up to then looked up > > and down, then > > adjusted my collision detection to prevent the player's view > > from clipping > > the wall simply because of the view angle. It seems to work fine...I > > wouldn't want to get into changing the viewport dimensions > > cause wouldn't it > > distort the scene? I'd reserve changing viewport dimensions > > for special > > effects like underwater wooziness. > > > > R&R > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Robert D. <RD...@ac...> - 2000-08-03 21:21:07
|
a completely mad idea, but if this is first person, then make it really first person ... attach the camera to the front of the viewing persons head, and when they turn around the camera stays on the front of the head, and hence moves away from the wall. For a real life comparison, walk up to a wall and turn around when you are touching it. You will now have your head a long way from the wall. Just because people are not used to their characters in games behaving like real world ones doesn't mean they shouldn't, and maybe this is one case where if they did it would be better. Rob -----Original Message----- From: Jason Zisk [mailto:zi...@n-...] Sent: 03 August 2000 21:08 To: gda...@li... Subject: Re: [Algorithms] Return of the front clip plane Its wierd, for a wall this method works fine. But for something smaller like a tree it "feels" wrong, like you are colliding too early. I guess its because you can see the stuff around the tree so you have a frame of reference? - Jason Zisk - nFusion Interactive LLC ----- Original Message ----- From: "Steve Wood" <Ste...@im...> To: <gda...@li...> Sent: Thursday, August 03, 2000 3:09 PM Subject: RE: [Algorithms] Return of the front clip plane > > -----Original Message----- > > From: Jason Zisk [mailto:zi...@n-...] > > > > Another solution is to just make your player's bounding > > volume larger so you can't get close enough to stuff to > > clip into it, this works okay but I find that you have > > to keep the player from getting closer than 3 units with > > a 1 unit clip because of viewport rotation (just keeping the > > player 1 unit away is fine if you are staring straight at a > > wall but as soon as you rotate the edges of your viewport > > will clip it). > > > > For my FPS I used a wall that I walked up to then looked up and down, then > adjusted my collision detection to prevent the player's view from clipping > the wall simply because of the view angle. It seems to work fine...I > wouldn't want to get into changing the viewport dimensions cause wouldn't it > distort the scene? I'd reserve changing viewport dimensions for special > effects like underwater wooziness. > > R&R > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Jason Z. <zi...@n-...> - 2000-08-03 22:32:05
|
Well this is the same thing as just making the player's collision radius smaller. You'd still get too close to the wall and clip it out if you looked up/down. Maybe not left/right though, which might be where the thought came from. :) I could just not let the player look up and down, doom got away with it right? ;) - Jason Zisk - nFusion Interactive LLC ----- Original Message ----- From: "Robert Dibley" <RD...@ac...> To: <gda...@li...> Sent: Thursday, August 03, 2000 5:28 PM Subject: RE: [Algorithms] Return of the front clip plane > a completely mad idea, but if this is first person, then make it really > first person ... attach the camera to the front of the viewing persons head, > and when they turn around the camera stays on the front of the head, and > hence moves away from the wall. For a real life comparison, walk up to a > wall and turn around when you are touching it. You will now have your head > a long way from the wall. Just because people are not used to their > characters in games behaving like real world ones doesn't mean they > shouldn't, and maybe this is one case where if they did it would be better. > > Rob > > -----Original Message----- > From: Jason Zisk [mailto:zi...@n-...] > Sent: 03 August 2000 21:08 > To: gda...@li... > Subject: Re: [Algorithms] Return of the front clip plane > > > Its wierd, for a wall this method works fine. But for something smaller > like a tree it "feels" wrong, like you are colliding too early. I guess its > because you can see the stuff around the tree so you have a frame of > reference? > > - Jason Zisk > - nFusion Interactive LLC > > > ----- Original Message ----- > From: "Steve Wood" <Ste...@im...> > To: <gda...@li...> > Sent: Thursday, August 03, 2000 3:09 PM > Subject: RE: [Algorithms] Return of the front clip plane > > > > > -----Original Message----- > > > From: Jason Zisk [mailto:zi...@n-...] > > > > > > Another solution is to just make your player's bounding > > > volume larger so you can't get close enough to stuff to > > > clip into it, this works okay but I find that you have > > > to keep the player from getting closer than 3 units with > > > a 1 unit clip because of viewport rotation (just keeping the > > > player 1 unit away is fine if you are staring straight at a > > > wall but as soon as you rotate the edges of your viewport > > > will clip it). > > > > > > > For my FPS I used a wall that I walked up to then looked up and down, then > > adjusted my collision detection to prevent the player's view from clipping > > the wall simply because of the view angle. It seems to work fine...I > > wouldn't want to get into changing the viewport dimensions cause wouldn't > it > > distort the scene? I'd reserve changing viewport dimensions for special > > effects like underwater wooziness. > > > > R&R > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Robert D. <RD...@ac...> - 2000-08-04 08:23:28
|
You could just apply real world stuff to it.... look up, you head tilts back, so your eyes will pull away from the wall. look down, when standing with your nose against a wall and you hit the wall, so you either collide and can't look down when against a wall or if thats going to upset people either IK your body so the head is touching the wall, or move the body back. either way, in real life you cannot look down with your eyeball touching the wall, because you aren't built that way, so applying similar limitations in a game is not unreasonable. Rob -----Original Message----- From: Jason Zisk [mailto:zi...@n-...] Sent: 03 August 2000 23:32 To: gda...@li... Subject: Re: [Algorithms] Return of the front clip plane Well this is the same thing as just making the player's collision radius smaller. You'd still get too close to the wall and clip it out if you looked up/down. Maybe not left/right though, which might be where the thought came from. :) I could just not let the player look up and down, doom got away with it right? ;) - Jason Zisk - nFusion Interactive LLC ----- Original Message ----- From: "Robert Dibley" <RD...@ac...> To: <gda...@li...> Sent: Thursday, August 03, 2000 5:28 PM Subject: RE: [Algorithms] Return of the front clip plane > a completely mad idea, but if this is first person, then make it really > first person ... attach the camera to the front of the viewing persons head, > and when they turn around the camera stays on the front of the head, and > hence moves away from the wall. For a real life comparison, walk up to a > wall and turn around when you are touching it. You will now have your head > a long way from the wall. Just because people are not used to their > characters in games behaving like real world ones doesn't mean they > shouldn't, and maybe this is one case where if they did it would be better. > > Rob > > -----Original Message----- > From: Jason Zisk [mailto:zi...@n-...] > Sent: 03 August 2000 21:08 > To: gda...@li... > Subject: Re: [Algorithms] Return of the front clip plane > > > Its wierd, for a wall this method works fine. But for something smaller > like a tree it "feels" wrong, like you are colliding too early. I guess its > because you can see the stuff around the tree so you have a frame of > reference? > > - Jason Zisk > - nFusion Interactive LLC > > > ----- Original Message ----- > From: "Steve Wood" <Ste...@im...> > To: <gda...@li...> > Sent: Thursday, August 03, 2000 3:09 PM > Subject: RE: [Algorithms] Return of the front clip plane > > > > > -----Original Message----- > > > From: Jason Zisk [mailto:zi...@n-...] > > > > > > Another solution is to just make your player's bounding > > > volume larger so you can't get close enough to stuff to > > > clip into it, this works okay but I find that you have > > > to keep the player from getting closer than 3 units with > > > a 1 unit clip because of viewport rotation (just keeping the > > > player 1 unit away is fine if you are staring straight at a > > > wall but as soon as you rotate the edges of your viewport > > > will clip it). > > > > > > > For my FPS I used a wall that I walked up to then looked up and down, then > > adjusted my collision detection to prevent the player's view from clipping > > the wall simply because of the view angle. It seems to work fine...I > > wouldn't want to get into changing the viewport dimensions cause wouldn't > it > > distort the scene? I'd reserve changing viewport dimensions for special > > effects like underwater wooziness. > > > > R&R > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |
From: Tom F. <to...@mu...> - 2000-08-04 09:37:18
|
Hmmmm... I like the idea in principle - only the very near stuff (which is hopefully quite rare) gets the extra clipping stuff, and even when it does happen, the normal and far distance stuff isn't affected. Unfortunately, any clipping imprecision is going to be very obvious since the objects are so close to the camera. It might be better to move the near clip plane a bit further away in these cases, so that any imprecision is moved further away from the camera. So under normal circumstances, your NCP is, say, 10m away. If anything comes closer than 10m, you do the clipping to a plane 50m away and do Hamilton's two-frustum trick. Maybe that'll result in fewer possible tears along the clip lines. Tom Forsyth - Muckyfoot bloke. Whizzing and pasting and pooting through the day. > -----Original Message----- > From: Feltman, Hamilton [mailto:Fe...@se...] > Sent: 03 August 2000 21:26 > To: 'gda...@li...' > Subject: RE: [Algorithms] Return of the front clip plane > > > > So how does this sound: > > - Create a frustum which matches your graphics API's frustum > with the exception of the near plane; for this, use the minimum > near plane you can handle. > > - Clip world geometry (or a bounding version) to this frustum > manually just like the good old days. > > - Use the closest clipped point of "whatever is left after clipping" > to the eye plane as the distance for the near plane for a new > frustum, send this frustum to the graphics API, and draw the > world geometry for this frame. > > I'm sure it would work; is this the way you did it? > > Hamilton Feltman > SEGA AMUS/ARCADE > www.sega.com/alienfront > > > -----Original Message----- > > From: Tom Forsyth [SMTP:to...@mu...] > > Sent: Thursday, August 03, 2000 12:46 PM > > To: gda...@li... > > Subject: RE: [Algorithms] Return of the front clip plane > > > > Moving the near (and possibly far - depends on your app) clip planes > > dynamically works very well indeed. Yes, there is the > slight artifact that > > walking past a tree affects the Z precision of the far-off > building that > > you're actually looking at, but then it's pretty hard to > think of any > > system > > that will do it any better, apart from the Z-partition > trick (which is > > expensive in some cases - though dead easy for flight sims). > > > > Tom Forsyth - Muckyfoot bloke. > > Whizzing and pasting and pooting through the day. > > > > > -----Original Message----- > > > From: Steve Wood [mailto:Ste...@im...] > > > Sent: 03 August 2000 20:09 > > > To: 'gda...@li...' > > > Subject: RE: [Algorithms] Return of the front clip plane > > > > > > > > > > -----Original Message----- > > > > From: Jason Zisk [mailto:zi...@n-...] > > > > > > > > Another solution is to just make your player's bounding > > > > volume larger so you can't get close enough to stuff to > > > > clip into it, this works okay but I find that you have > > > > to keep the player from getting closer than 3 units with > > > > a 1 unit clip because of viewport rotation (just keeping the > > > > player 1 unit away is fine if you are staring straight at a > > > > wall but as soon as you rotate the edges of your viewport > > > > will clip it). > > > > > > > > > > For my FPS I used a wall that I walked up to then looked up > > > and down, then > > > adjusted my collision detection to prevent the player's view > > > from clipping > > > the wall simply because of the view angle. It seems to > work fine...I > > > wouldn't want to get into changing the viewport dimensions > > > cause wouldn't it > > > distort the scene? I'd reserve changing viewport dimensions > > > for special > > > effects like underwater wooziness. > > > > > > R&R > > > > > > _______________________________________________ > > > GDAlgorithms-list mailing list > > > GDA...@li... > > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |
From: Jason Z. <zi...@n-...> - 2000-08-03 20:07:44
|
Its wierd, for a wall this method works fine. But for something smaller like a tree it "feels" wrong, like you are colliding too early. I guess its because you can see the stuff around the tree so you have a frame of reference? - Jason Zisk - nFusion Interactive LLC ----- Original Message ----- From: "Steve Wood" <Ste...@im...> To: <gda...@li...> Sent: Thursday, August 03, 2000 3:09 PM Subject: RE: [Algorithms] Return of the front clip plane > > -----Original Message----- > > From: Jason Zisk [mailto:zi...@n-...] > > > > Another solution is to just make your player's bounding > > volume larger so you can't get close enough to stuff to > > clip into it, this works okay but I find that you have > > to keep the player from getting closer than 3 units with > > a 1 unit clip because of viewport rotation (just keeping the > > player 1 unit away is fine if you are staring straight at a > > wall but as soon as you rotate the edges of your viewport > > will clip it). > > > > For my FPS I used a wall that I walked up to then looked up and down, then > adjusted my collision detection to prevent the player's view from clipping > the wall simply because of the view angle. It seems to work fine...I > wouldn't want to get into changing the viewport dimensions cause wouldn't it > distort the scene? I'd reserve changing viewport dimensions for special > effects like underwater wooziness. > > R&R > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |