![](templates/drizz/images/forum_logo_3.gif) |
|
![Reply to topic](templates/drizz/images/lang_english/reply.gif) |
View previous topic :: View next topic |
Author |
Topic : "perspective" |
Dan member
Member # Joined: 24 Sep 2000 Posts: 224 Location: Kingston, Ontario, Canada
|
Posted: Fri Feb 08, 2002 3:14 pm |
|
![](templates/drizz/images/hrline.gif) |
Ok, this is all just a lot of ramblings of the top of my head really. I've been thinking a lot about perspective drawings and such lately. Drawing up ideas. And I've had a feeling for a long while that the perspective drawing that they teach us in school and such is flawed. I don't know who invented the skystem of 3 point perspective, or two point perspective, but if you try to apply it to large views beyond say a 90 degree field of view, it starts to get screwy. So I thought up a way of creating wraparound 3d perspective, instead of straight rulered lines, it had curved lines. But after that I realized that other people had already done this. As a matter of fact, I found the exact same perspective set up that I made in an Escher book, made me quite proud. What it was. First make a straight horizontal line, that's your horizon line. And put 1 dot every 1/4 length of that line. Imagine that this is a 360 degree field of view. So the beginning of the line, and the end of the line are actually the same point. The dots represent every 90 degrees in your view. Now instead of lines just comming from a point, they also have to end at a point. So a straight line would come from a dot, then curve back towards the dot which is 180 degrees away from it, or on the other side of the horizon. What's neat is if you make a full 360 degree view and then roll the paper into a tube so that the horizon wraps fully around, the curved lines will look straight. But anyways what I figured was that the straight line perspective, it's only showing things getting smaller as they move directly away from you. If something is a kilometer away, but at a right angle to the direction you are facing, it will look full size using straight line perspective. And well that's just not right. To test this out, I played around with the fov setting on my favorite 3d shooter, HL. It's all straight lines, which suggests that the rendering system in some ways uses straight line perspective. If you open the fov up to 180 degrees, you'll notice things gettins stretched out looking. You'll also notice that if you look around while standing in the exact same position, the perspective on some things will change. Some walls will look close, but if you turn 90 degrees, suddenly that wall is getting smaller rather than bigger and that's just not right. So anyways, long story short, can anyone give me some ideas, or stuff on how to make true perspective, or whatever other info you have. |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Fri Feb 08, 2002 3:35 pm |
|
![](templates/drizz/images/hrline.gif) |
Curvilinear perspective, lots of papers on that stuff.
Funny thing that you mention a 3D shooter, because I've been thinking about adapting curvilinear perspective in real-time 3D 2 weeks ago, as research at work. It's possible to transform your vertices using a curvilinear method of projection, but that adapts very poorly with linear edged triangles, especially for games that don't have a high number of vertices and faces to distort in the first place. Converting a game engine to do curvilinear perspective would be a slight deal of pain. Everything in todays 3D accelerators is linear; linear polygon edges, linear texture interpolation, etc. There is a lot of issues to take care of before adapting it -- geometry has to be generated very carefully and specifically to make it work nicely; higher order surfaces definitely come in handy at this point. Not impossible, but unlikely that you'll see any 3D games use it any time soon, if ever.
I'm personally keep this research in the back of my mind for a later time when I can actually implement it using vertex shaders and 'curvilinear enhanceable' mesh data.
Blah blah blah, yeah, sorry. |
|
Back to top |
|
Dan member
Member # Joined: 24 Sep 2000 Posts: 224 Location: Kingston, Ontario, Canada
|
Posted: Fri Feb 08, 2002 3:50 pm |
|
![](templates/drizz/images/hrline.gif) |
yeah, well actually the reason this all came up, was I was trying to make a skybox for a HL map I'm making. but I didn't want it to end up looking like a box with pictures on the inside. So since the player is always exactly in the center of this box, you should be able to trick them so that it looks like this looks more like the inside of a sphere. Cause really, you're vision could be a sphere if you are seeing stuff from one point and don't have any depth perception. But because of the way HL renders stuff, it's impossible to make the lines fit right. |
|
Back to top |
|
Dan member
Member # Joined: 24 Sep 2000 Posts: 224 Location: Kingston, Ontario, Canada
|
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Fri Feb 08, 2002 4:23 pm |
|
![](templates/drizz/images/hrline.gif) |
That's the whole point of skyboxes... they have baked in spherical perspective.
Rendering 6 90-degree views of a 3d scene will give you what you want. Trying to draw them by hand is probably harder than it's worth... unless you have time on your hands. =]
(that ZBIG Vision is a renderer, not real-time)
[ February 08, 2002: Message edited by: Frost ] |
|
Back to top |
|
Dan member
Member # Joined: 24 Sep 2000 Posts: 224 Location: Kingston, Ontario, Canada
|
Posted: Fri Feb 08, 2002 4:38 pm |
|
![](templates/drizz/images/hrline.gif) |
but the problem with the skyboxes is that the linear perspective used by the game engine gives you a sense of depth perception just by turning your head. Normally, if you're seeing something from a fixed single point, you have no real depth perception. But with this rendering as you look in different direction, the actual perspective changes, revealing that you're seeing an actual box. It's not that noticable because the skies are generally vague organic stuff like clouds and hills and you usually only have a 90 degree fov so you can't actually see the change that well. But if you look at some of the default skies that come with HL you can clearly notice the edges of the skybox. |
|
Back to top |
|
Frost member
Member # Joined: 12 Jan 2000 Posts: 2662 Location: Montr�al, Canada
|
Posted: Fri Feb 08, 2002 4:46 pm |
|
![](templates/drizz/images/hrline.gif) |
(my last reply tonight)
I haven't played HL in a long time, I can only assume that if you DO see that it's a skybox, then they have clearly done it improperly (do not confuse 'skyboxes' with 'sky boxes' hehe - get the DirectX SDK (d3d) and see for yourself). The skyboxes that I am used to never look strange at ANY angle, as long as the camera is in smack center of the box (or the rendering POV more precisely). I've experimented with this myself some time ago, ... it is virtually impossible to tell you are looking at a cube if the textures are rendered correctly.
Goodnight. |
|
Back to top |
|
Ben Barker member
Member # Joined: 15 Sep 2000 Posts: 568 Location: Cincinnati, Ohier
|
Posted: Fri Feb 08, 2002 4:57 pm |
|
![](templates/drizz/images/hrline.gif) |
It's most noticable when there is a disk on one side of the skybox, such as a bright full moon. Turning an angle to it makes the moon into an elipse. I guess one solution would be to put your moons on corners.
Interesting thread. |
|
Back to top |
|
CyberArtist member
Member # Joined: 04 Nov 1999 Posts: 284 Location: Fort Lauderdale, FL
|
Posted: Mon Feb 11, 2002 8:59 pm |
|
![](templates/drizz/images/hrline.gif) |
Fisheye Quake
A modified Quake 1 renderer that renders using curvilinear perspective. Also, a lot of non-realtime renderers have tools to render using "real camera lenses" which are also curvilinear. NVidia cards like the GeForce3 and 4 can do curvilinear perspective in hardware (as, with some noodling, could the Voodoo 4+ architecture I assume). Altering the vertices themselves is not a good solution (though some top down games do use that lately to fake the fisheye effect).
I believe the NVidia hardware accomplishes this effect by way of on the fly cube maps that are deformed using the pixel shader, though I could be wrong. Similar methods where used in some of the early GeForce 1 demos. The same method is used by Fisheye Quake, only done in software.
[ February 11, 2002: Message edited by: CyberArtist ] |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
Powered by phpBB © 2005 phpBB Group
|