Freelook

Discuss anything ZDoom-related that doesn't fall into one of the other categories.
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Freelook

Post by cccp_leha »

Why does ZDoom have limited freelook? What I mean is that the view only goes so much up/down.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Because the walls cannot be sloped. If you'll notice the view is "skewed" as you look up and down -- the floor is properly being adjusted, but not the walls. Because they always stay vertical, if you were to look straight up, both the walls and floor would be completely vertical. This would look...... odd.
User avatar
cccp_leha
Posts: 1816
Joined: Wed Jul 16, 2003 7:21 am
Location: NJ, USA
Contact:

Post by cccp_leha »

Aha. So is this one of those many things that would get the "this is precisely one of the reasons we don't have real 3D bla, bla, bla..." answer? :)
Thrasher
Posts: 73
Joined: Wed Jul 16, 2003 3:08 am
Location: Imperial Moon Base: Thal Vaishet
Contact:

Post by Thrasher »

"Because the walls cannot be sloped. If you'll notice the view is "skewed" as you look up and down -- the floor is properly being adjusted, but not the walls"
Whoa! you mean that Zdoom moves the floor intead of only adjustng the player's sight? :o
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

This is precisely one of the reasons we don't have real 3D bla, bla, bla...

:twisted:
Kuroshi
Posts: 68
Joined: Fri Oct 31, 2003 4:40 pm

Post by Kuroshi »

Whoa! you mean that Zdoom moves the floor intead of only adjustng the player's sight?
Actually, all it does is shifts the view up and down. Imagine having a vertical FOV larger than the actual viewing window. All Zdoom, or any non-polygonal game, does is move this window up and down when looking up and down. In fact, I actually discovered this when I was looking at a screenshot that was much larger than my screen (a 2048x1024 screenshot on an 800x600 res I think) When I scrolled the image up and down, I noticed that the effect was like looking up and down in ZDoom. So I checked it in ZDoom and I noticed there was NO adjusting of the perspective when looking up and down, just like scrolling the view of a large image up and down. So it's a hack, yes, but it's probably the best we can do without completely rewriting rendering engine.

In order to allow full looking up and down, you would need to adjust the perspective of the walls and other objects accordingly and the only way this could practically be done would be to convert the engine to render true polygons instead of column rendering. This alone requires a lot more processing power and is best left to 3D accelerated ports. So if you want full/true mlook get an OpenGL port. (cough...ZDoomGL...cough)
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Sorry, Kuroshi, but you're wrong. When you scroll a static image up and down, NOTHING changes. When you look up and down in ZDoom, the ceilings and floors slope more or less as you do so. The walls however stay the same, other than sliding up and down, and the sprites also can't adjust perspective, so on those points you're right. The ceilings and floors really do adjust perspective though.

[EDIT]Hrm, or at least that's how I thought it worked. After some testing, it looks more like what Kuroshi described -- the floor is more skewed as you look down, but it doesn' t look the the floor is actually changing perspective, just that as it gets closer to the bottom of the "tall image" it has to stretch out more, which gives a different explanation of why you can't look 100% up or down. :)[/EDIT]
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Did it not occur to you that ZDoom (...or Hexen, or Heretic even) had looking long before it had slopes?
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

/me stares at Risen as if he's an idiot.

This has nothing to do with slopes. When you fly up and down, notice how the floor and ceiling perspectives change? That's what I'm talking about. If Doom wasn't able to do that, it couldn't have variable height floors and ceilings.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

/me stares at HotWax because it seems like the proper thing to do at the time.

I know it has nothing to do with it, but your descriptions made it sound like you were linking the two. Anyway, doom has always drawn perspective using only the horizon (players' eye level) as its base. This creates odd results the further you diverge from it. A 3D rederer draws true perspective based on the direction you are actually looking. This means you'll end up with the effect described. There's no real reason freelook can't go further than it does, but the further you go the more distorted it gets. The developers chose a point where they were no longer willing to live with the distortion.
Last edited by Risen on Fri Mar 26, 2004 2:52 pm, edited 1 time in total.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

Doom level (and sprite for that matter) rendering is meant to be done so that everything is viewed from a precise 90 degree angle. You can 'change' the view angle but you need to preform what's known as 'y-shearing'. What happens here is essentially you increase the vertical resolution and then make a smaller 'window' (the size of the game screen) and move this viewpoint up and down which gives off the illusion of looking up and down. The further up or down you look the more distorted the view will become because, as HotWax noted, walls in Doom can only be drawn vertically without any tilting. This is all changed in an opengl renderer of course which use polygons to render everything based on the map data.
User avatar
TOGoS
Posts: 131
Joined: Sat Nov 22, 2003 12:33 am
Location: Wisconsin
Contact:

Post by TOGoS »

Kuroshi wrote:So I checked it in ZDoom and I noticed there was NO adjusting of the perspective when looking up and down, just like scrolling the view of a large image up and down. So it's a hack, yes, but it's probably the best we can do without completely rewriting rendering engine.
Actually, looking up and down shouldn't change the perspective. Although modern 3D games will have to change the perspective when you look around, the way ZDoom does it is actually closer to reality, in a way.

Check it out:
If you move your eyeballs around, notice that the wall in front of you does not appear larger beside you than it did in front of you. However, play a 3D videogame and look around, and you'll notice that when a wall is beside you, it appears much larger than it does when it is right in front of you!

This is because the scene is rendered as seen through a pin-hole camera, not a lens like your eye. You may notice that if you look straight at a wall in a long hallway, the walls will appear to curve away from you on both sides. Looking right or left simply shifts your view along that image (neglecting the change in position due to the radius of your eyes). Same thing if you lie down in a field and stare at the sky - you'll be able to see the horizon all the way around your head withough moving your eyes.

If you try to set such a wide field of view in a video game using pin-hole-camera perspective, you'll get a lot of distortion at the edges, as can be seen when you look up and down in ZDoom, or set FOV to be very large. In fact, it is *impossible* to render a FOV 180 degrees or wider using this method. If you used a lens, though, you can set the FOV as large as you like without distortion (although it would at first look weird to a human as we're not used to looking at such a large FOV at once)
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Yeah, and the only way to create this effect in a cvideo game is to create a monitor that bowls in... great idea!

No, your wrong mister Togos! The onlyt reason why we see the way we see is bewcause we aren't ristricted to seeing whats infronot of us, and unlerss you suffer from tunnel vision then you can see in vertually a 365. angle... but this is not possible in computer games because the monmitor itself is flat... the only way to get around this is to use those 3D goggles, but apart from that... Zdoom's method (well, actuallt it's Doom's) is basically an Hack.

I'm not critisizing or asking for anything, but i'm cureouse to know why Zdoom hasn't got a better renderer? I know it would involve a lot of work and i'm not asking for it, but I'm just cureouse to know why it hasn't got one...

:twisted:
User avatar
adx
Posts: 390
Joined: Fri Aug 01, 2003 9:14 pm

Re: Freelook

Post by adx »

cccp_leha wrote:Why does ZDoom have limited freelook? What I mean is that the view only goes so much up/down.
maybe one of the reason is that they wouldn't allow you to see your foot, as far as i know, there isn't any FPS that would allow you to see your foot when you look down.
User avatar
Lexus Alyus
Posts: 4220
Joined: Tue Jul 15, 2003 5:07 pm
Location: Nottingham, UK
Contact:

Post by Lexus Alyus »

Post Reply

Return to “General”