Question On Camera Zoom

Blitz3D Forums/Blitz3D Programming/Question On Camera Zoom

Red Ocktober(Posted 2006) [#1]
what i'm trying to do is give the impression of immense size by zooming in the camera... but this causes everything to slow down... especially the particles...

what am i missing... is there any way to keep the speed up when zoomed in (about 12)

thx

--Mike


Mustang(Posted 2006) [#2]
Changing the CameraZoom changes the FoV, so you see more and render -> everything slows down. Or if you reduce the FoV you'll end up rendering the particles bigger on screen and the fill rate kills the performance.

So high FoV shows so much (polygons) that it can slow down things, and low FoV can make rendering even slower because you stuff on screen gets bigger - even if you don't see more than few dozen particles, because these alone can increase the fillrate too high.

Not the best explanation but I'm sipping only my first morning cup of coffee so I'm not yet fully awake yet :)


Floyd(Posted 2006) [#3]
I think the highly zoomed particles are essentially the test called Massive Overdraw in some 3D benchmarks. It will bog down just about any graphics card.


GfK(Posted 2006) [#4]
Changing the CameraZoom changes the FoV, so you see more and render -> everything slows down.
When you zoom in you actually see LESS, as the field of view is shorter, but the depth of field remains the same.

Even when you set CameraZoom to 12 you still won't see anything beyond the 'far' limit of the camera.

Try changing the camera 'near' limit to either 1, or 0.1 (whichever you don't currently have it set at) - remember somebody telling me years ago (xMystik?) that he had similar problems, and that was part of the solution.


Red Ocktober(Posted 2006) [#5]
thx guys...
Gfk... yeah, that's what i thought as well... you would see less, but i wasn't sure... lemme give the near limit thing a shot...

--Mike


boomboom(Posted 2006) [#6]
a good trick to show size is to not have the entire object on screen at the same time. You can see this in star wars movies etc, where the big imperial ships are often have bits cut off






Mustang(Posted 2006) [#7]
Umm... I tried to explain problems going BOTH directions with FoV/CameraZoom... CameraZoomXYZ itself doesn't tell me anything because I use the one-and-only way to do this, ie FoV routine from the cod archives. FoV I can understand, CameraZoom makes my head spin. :)

Apparently CameraZoom"verybignumber" gives you narrow FoV, and CameraZoom"almostzero" gives you wide FoV, so decrypt my morning ramblings using these values.


markcw(Posted 2006) [#8]
> is there any way to keep the speed up when zoomed in (about 12)

what about not zooming? instead position the camera along a line to the target, that should look exactly like zooming.


Red Ocktober(Posted 2006) [#9]
ya know... that's a great idea muk...

nice outta the box solution to a problem... i'll look at that tommorrow...

--Mike


markcw(Posted 2006) [#10]
hi Red, i read your recent post in general discussion, and suddenly realized that camera position rather than zoom is all that is needed, so i'll credit you with the "out of the box" solution. :)

I did a little test and actually camerazoom is bad, not just because it costs the framerate but because it's technically not right anyway!

camerazoom makes things travel towards orthographic projection which, i think is wrong, in real life there is no orthographic projection, when you looks though binoculars you see what you would see if you were standing closer to the object, so all you need is the maths to position a camera from 3d point A to B then.

I wrote up a quick test actually, just to check what it is like, there's no algo there, just hard-coded values to emulate it but it gives you the impression anyway.

Maybe i'll have a go at the algo too. sounds like fun.




GfK(Posted 2006) [#11]
what about not zooming? instead position the camera along a line to the target, that should look exactly like zooming.
Actually, it won't. It will look like the camera is moving (because thats what its doing).

If you have a camera at point A, an object at Point C, and an object mid-way, Point B - zooming the camera you will still be able to see both of the objects.

If you move the camera close to Point C, then you WON'T see object B.

Changing the camera zoom is vastly different to just moving the camera - you're changing the camera's field of view. Its important to understand this difference.


Red Ocktober(Posted 2006) [#12]
yeah... i just tried it... while the concept was interesting in theory, it just didn't look right in actual practice... for a lot of the reasons that GfK mentions...

but thx anyway muk... it was a good idea, and may come in usefull for other situations...

--Mike


markcw(Posted 2006) [#13]
done. no algorithm, just a camera on a pivot.