# ideal distance camera -> viewplane

This topic is 2614 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

For ray casting, ray tracing and rasterization you need a so called viewplane. My idea is to put the size of the viewplane according to pic-format (4:3, 16:9, 16:10...) along x- and y-axis, so that z is the distance between camera and viewplane. After calculating the lookat-matrix I Transform the 4 corners of the viewplane to the right position.

My question is: What do you think is the ideal distance between camera and viewplane?

##### Share on other sites

For ray casting, ray tracing and rasterization you need a so called viewplane. My idea is to put the size of the viewplane according to pic-format (4:3, 16:9, 16:10...) along x- and y-axis, so that z is the distance between camera and viewplane. After calculating the lookat-matrix I Transform the 4 corners of the viewplane to the right position.

My question is: What do you think is the ideal distance between camera and viewplane?

Completely depends on the game-type and resolution of the z-buffer (maybe not such an issue these days)...

For example, if you have an FPS, having a low near-clip is desirable, but in a RTS maybe not so much.

In the old days (16 bit z-buffers etc), having a low near-clip would mean you lost visible precision in the distance, where-as a high near-clip gained you more precision in the distance.

Cheers, Paul.

##### Share on other sites
If I am not mistaken, his question has nothing to do with the near plane. He is asking effectively what is a good field of view. This does depend on the game genre. But it should be easy enough to experiment with a few different settings and get a feel for what works.

##### Share on other sites
Interesting, but the z-Buffer is only used for rasterization, isn't it?

##### Share on other sites

Interesting, but the z-Buffer is only used for rasterization, isn't it?

It is, yes. Presumably you will be using one?

##### Share on other sites
For the start I would say ray tracing, even if it starts longer with O(width * height * max reflection and refraction). Rasterization needs the hell a lot of triangles and questions about z-buffers.

I also think to use double instead of float in C++ to avoid rounding errors.

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 44
• ### Forum Statistics

• Total Topics
633742
• Total Posts
3013630
×