Understanding 3d camera

Hi folks.

So, I’ve started (at last) a 3d game with models instead of thousands of sprites. Oh my word it’s so much easier! I wish I’d started this a couple of years ago.

But, all the matrices take a bit of getting used to. Camera position, where it’s looking, clipping etc can be a bit mind bending, for my little brain anyway.

I’m just wondering how best to approach camera position in a character based game where the character is moving. The best analogy I can think of is a star field like the old Windows screen saver. When animating that with 3d models, would you move the camera through the field creating new stars at an ever increasing distance, or would you keep the camera still and move everything past it?

One approach obviously needs a lot more updating. Would you use one approach for a star field, but another for a scenery based game like a fps?

My testing so far has only been with top down style staging so z is only used for effects while all collision detection takes place on z=0. I’m just trying to understand the best practices before going hell for leather off in the wrong direction!!

Any advice?

Thanks.

1 Like

Either sounds fine to me. But I would suggest that it would probably be a little easier to code up if the camera is stationary and the stars fly past, resetting to some far distance once they pass behind the camera. I had to do a star field effect once as an interstitial and that’s how I did it too.

It feels like the wrong way around, but as far as I can work out it’s actually easier than updating the camera, especially when turning and tracking. Thanks Owl. :o)

You should be able to find a making of video on how the star wars intro was created, in cinema, you would do this thing where the camera moves in one direction and the focus is either zoomed in or zoomed out for an increased depth effect. I remember this is achievable by code as well, hope this helps.

And sorry for bumping this post…