Sign in to follow this  
Digi123

Camera level design help

Recommended Posts

Hi,

I was wondering if someone can give me some guidance or tips about a camera feature I want to implement. Take for example Mario Galaxy 2, the camera tracks Mario. Occasionally, when you run around the world, the camera would automatically rotate to another angle to give better visibility. How would you implement that? Would you have multiple cameras in your level with trigger volumes to determine the camera view? Any thoughts are appreciated.

Share this post


Link to post
Share on other sites
My first impulse would be to create virtual "antennas" or "whiskers" around the camera that detect something about the environment or the view occlusion and apply rotational force on certain conditions (which can be summed to move the camera)- such as when the ends find themselves inside a mesh. I wouldn't test that collision every frame, though.

I don't know if that made any sense the way I described it.

I'm not sure how Mario Galaxy did it. Really, there's no very good way; all camera systems tend to be broken in some way unless it's scripted into the level data itself.


I hope that helps in some way, or at least give you some ideas.
Cheers!

Share this post


Link to post
Share on other sites
Since I find automatic cameras annoying in "Prince of persia the sands of time" you should have an option to control the camera manually in case that the player need another angle. It is also important to never instantly turn 180 degrees since that would confuse the player and cause the actor to get stuck in the invisible wall.

Share this post


Link to post
Share on other sites
Hey, thanks for your responses. I was thinking more along the following in the "Making of God of War 3 Bonus Feature - Camera Design" [url="http://www.youtube.com/watch?v=d13iQUmpXG0"]http://www.youtube.com/watch?v=d13iQUmpXG0[/url] @ 2.57 time. As you watch, notice how they set up camera volumes and different cameras within the same level. What do you guys think?
I'm so fascinated about camera design but there just aren't a lot of resources on this topic especially the technical implementation of them.

Share this post


Link to post
Share on other sites
Those cameras are fully scripted using custom engines. That's a kind of thing that takes years of work, and the systems they use might *possibly* be patented too. I don't think you're going to be able to find a lot of discussion about it.

The gist is that they're setting up what amount to key-frames for the cameras which transition based on the movement of the player and events in the game, moving from one position and orientation to another along some kind of spline, probably.

I would be disinclined to do cameras this way; it's too labor intensive.

Share this post


Link to post
Share on other sites
Actually, a system like explained in this video could be created using a simplier approach: You could place a camera with a certain bounding volume somewhere in the game. Now, as the player enters the bounding volume, the players camera smoothly moves
to the other cameras position. Now you could apply different effects, a basic example would be just the new amera following the player till he leaves the bounding volume. After that, switch back to old camera with new orientation. You get the idea? I hope so, as your post inspired me to code a similar system for my game. Will take some time, nut I think its definatley worth it.

Share this post


Link to post
Share on other sites
[quote name='The King2' timestamp='1317753136' post='4869064']
Actually, a system like explained in this video could be created using a simplier approach: You could place a camera with a certain bounding volume somewhere in the game. Now, as the player enters the bounding volume, the players camera smoothly moves
to the other cameras position. Now you could apply different effects, a basic example would be just the new amera following the player till he leaves the bounding volume. After that, switch back to old camera with new orientation. You get the idea? I hope so, as your post inspired me to code a similar system for my game. Will take some time, nut I think its definatley worth it.
[/quote]

That is something I was considering too. The one thing I can't figure out is how to transition from a camera that is following you to the next camera and back. Some ow you need the next camera position close to your current position, going back and forth between volumes.

Share this post


Link to post
Share on other sites
As I said Id suggest using bounding volumes. For example you place an AABB somewhere and as the player enters that AABB a specific camera will follow him. You could even use OBBs, spheres etc.. If AABBs are too simple for you. No need to calculate which camera should follow you, as you enter a certain area, this happens on trigger.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this