Faking viewvision

Started by
15 comments, last by remigius 18 years, 6 months ago
Hello, I have a controllerable creature that has its eye on the side of the heads (I.E. Rabbit, Horse or Cameleon). You can switch to First-person mode and here I would like to also change the view to the view of a rabbit/horse/cameleon. Is this doable/possible with HLSL, if so where should I start to learn how? Thanks in advance, -Xeile
Advertisement
huhu, that would be quite fun ^^

Well, one solution could be to increase the FOV (field of view if I'm not mistaken) to simulate a wider view (usually, the FOV is 90° or so. Using 180° gives a pretty cool effect that could fit what you need)

Or you could have 2 seperate renders, one for each eye.

But I don't really think you'll need HLSL for that.
EDIT: Just too slow today [lol]

Couldn't you just tweak the 'Field Of View' for the projection matrix? make it somewhere around 160-180 degrees?

Just from basic biology I seem to remember that was the advantage to having eyes on the side of the head (for non-predators)...

Anyway, for implementation, if you can do it via the projection matrix - just alter the mWorldViewProj (or similar) constant you pass in?

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

I guess that depends on the creature you´re going to take control of, but generally it should be just a matter of tweaking the field of view value? On the other hand you could also try some kind of split-screen for "extreme" setups (like a bird for example). A bird´s eyes nearly don´t have a common field of view, you you could render the view of the left eye onto the left half of the screen, the right eye´s view onto the right half of the screen. Of course that would double any operations you´re doing to cull your scene.
You could also try to do a HLSL shader that does the following:
Given two view matrices (one for left eye and one for right eye), you calculate two transformed positions of every point. Then you could (at least with PS2.0 IIRC) discard one position based on the clip space coordinates you get and only show the one you need. That way you would do only one "culling pass". Don´t know if this is feasible though.

The player will definitely be confused with a bird´s view of the world, so this might be too extreme. Tweaking the FOV parameter is definitely more playable ;)
Good luck!
Quote:Original post by jollyjeffers
EDIT: Just too slow today [lol]

Couldn't you just tweak the 'Field Of View' for the projection matrix? make it somewhere around 160-180 degrees?

Just from basic biology I seem to remember that was the advantage to having eyes on the side of the head (for non-predators)...

Anyway, for implementation, if you can do it via the projection matrix - just alter the mWorldViewProj (or similar) constant you pass in?

hth
Jack


A disadvantage that non-predators have, is that they don't see depth, something I also have fake. So I think I have to use 2 orthogonal cameras.

If I succeed in this, I might use 3 cameras (2 Orthogonal, 1 perspective) to fake the sence of depth in the middel of the screen.
Quote:Original post by matches81
I guess that depends on the creature you´re going to take control of, but generally it should be just a matter of tweaking the field of view value? On the other hand you could also try some kind of split-screen for "extreme" setups (like a bird for example). A bird´s eyes nearly don´t have a common field of view, you you could render the view of the left eye onto the left half of the screen, the right eye´s view onto the right half of the screen. Of course that would double any operations you´re doing to cull your scene.
You could also try to do a HLSL shader that does the following:
Given two view matrices (one for left eye and one for right eye), you calculate two transformed positions of every point. Then you could (at least with PS2.0 IIRC) discard one position based on the clip space coordinates you get and only show the one you need. That way you would do only one "culling pass". Don´t know if this is feasible though.

The player will definitely be confused with a bird´s view of the world, so this might be too extreme. Tweaking the FOV parameter is definitely more playable ;)
Good luck!


I simulated this feature within 3ds max (with alot of trouble), and it isn't that confusing, it very cool cause you can see sooo much more. You just got to get used to it for a couple of seconds.
Quote:Original post by Xeile
A disadvantage that non-predators have, is that they don't see depth, something I also have fake. So I think I have to use 2 orthogonal cameras.

I know it's true of the human eye, but not sure of animals... but our peripheral vision is actually quite low detail and limited in colour (due to distribution of rods/cones iirc). Maybe another aspect for your effect could be that areas to the extreme of the view appear more "washed out" ?

Quote:Original post by Xeile
If I succeed in this, I might use 3 cameras (2 Orthogonal, 1 perspective) to fake the sence of depth in the middel of the screen.

From a purely design point of view, be careful about the "user experience". A long time ago I made a game where (entirely by accident) it had a much larger FOV - and whilst it never bothered me, a few people that play-tested it commented on the effect being a bit "motion sickness" like [lol]

I think that was all to do with the way that with fast/panning movement and a wide FOV some objects can almost appear to bend/distort - which just looks wrong to the human eye...

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Quote:Original post by jollyjeffers
From a purely design point of view, be careful about the "user experience". A long time ago I made a game where (entirely by accident) it had a much larger FOV - and whilst it never bothered me, a few people that play-tested it commented on the effect being a bit "motion sickness" like [lol]

I think that was all to do with the way that with fast/panning movement and a wide FOV some objects can almost appear to bend/distort - which just looks wrong to the human eye...

hth
Jack


Yeah, this is indeed something I should be careful about... Maybe I should test it on my sisters first...

Thanks for this input.
hmm... IIRC Alien vs Predator did something similar when you controlled the alien. I was completely unable to accomodate to the increased FOV, while others just loved it.
But I don´t think an increased FOV would be anywhere close to realistic for an animal with eyes at the sides of the head. Your setup with the 2 orthogonal and 1 perspective camera sounds closer to that, though I don´t see a reason for the orthogonal projection and the additional perspective camera? Shouldn´t 2 perspective views suffice?
Perhaps you could also try to blend the 2 views together in the center of the screen, where they also should be quite blurred because the center of the screen (in front of the creature) would be their "peripheral" field of view. IIRC birds are close to blind in front of their heads, at least at close range.
Quote:Original post by matches81
hmm... IIRC Alien vs Predator did something similar when you controlled the alien. I was completely unable to accomodate to the increased FOV, while others just loved it.

Yeah, I remember that effect. Maybe I was just rubbish at the game, but I ended up running round in circles and generally dying a lot when I had that alien view [lol]


Quote:Original post by matches81
I don´t see a reason for the orthogonal projection and the additional perspective camera? Shouldn´t 2 perspective views suffice?

The idea for orthogonal views was based on the fact that from a single eye you don't get depth perception. Two eyes pointing in roughly the same direction (like ours) give you stereo vision such that you can discern depth.


If you get anything up and running for this effect, post some screenshots - I'm curious to see what it looks like [smile]

Cheers,
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

This topic is closed to new replies.

Advertisement