[email protected]
Level Design Portfolio
  • HIGHLIGHTS:
    • Camera
    • Collaborations
  • The Long Dark
  • World Design

Telling stories through captivating gameplay.

Warning, this is a construction zone!

Flip through the tabs above to view Open Worlds and other Level Design works I've been crafting since 2014.

Or click the red button
to review my professional work as a Game Design generalist.

Fast Travel to Game Design

Real-Time Cameras in Unreal Editor 4 - Part 10

22/2/2016

5 Comments

 
Picture
This is the same pawn before and during a straight vertical jump, with a Tomb Raider style camera drop to show that she landed roughly
Reference: Mark Haigh-Hutchinson. 2009. "Real-Time Cameras: A Guide for Game Designers and Developers." Elsevier.

I was recently introduced to a powerful tool in UE4 called the Timeline. All of my previous articles were created without any knowledge of this tool, but now I cannot ignore the fact it provides simpler and more robust solutions than my previous attempts. This weekend was devoted to creating a platformer style camera that is modelled after Tomb Raider 2013 as a warm up for using timelines. There will be no ledge grabbing, vaulting, climbing, or ice-picks in my prototype - so only jumping and landing from a drop will be covered here. My starting point is the default Third Person Blueprint in UE4.10.3 with no modifications except to create a basic test level that has a lot more jumping and height differences. (Aside: In full scale game production, this level would have all the different sizes and shapes - often called metrics - that the avatar could traverse. so locomotion systems, animations, camera, and controls could be tested before the game world is created).

  • "Minimize unintentional camera motion whenever possible. This is especially true of cinematic sequences, but it is true to say that camera motion should be avoided unless it would either result in the camera being left behind by the player character, or the camera interpenetrating the player character. Slight or unintentional camera motion caused by reactions of the player character to environmental factors (or noise from player controller inputs) should be avoided. Similarly, if camera motion is directly linked to that of the player, it often results in an "unnatural" or "stiff" feeling camera.
  • Ensure camera motion is smooth. Smooth, frame-coherent motion of the camera is necessary to avoid disorienting or distracting the player. Of course, smooth motion is normally achieved by velocity dampening, which has the adverse effect of allowing the target object to either accelerate away from the camera or worse, overtake and interpenetrate the camera. Nonetheless, smooth camera motion is of great importance and there are techniques available to assist the camera in cases where the player character is subject to rapid acceleration. Low-pass filter can help smooth out irregularities in movement especially when the camera motion is tied directly to that of the player character, where noise from unwanted player input may cause slight motion."
Notice the cameraman uses a smooth path up, and highlights the gracefulness of the landing by not overtaking his target, the figure skater.
The opposite effect is achieved in Tomb Raider when Lara Croft lands a jump, but the camera still has smooth motion throughout the landing.
My initial approach is to add a Scene Component to the ThirdPersonCharacter Blueprint and have a new blueprint that tracks the location of this Scene Component. The new blueprint will be the ThirdPersonCameraTarget, and it will use a timeline to track the movement of the ThirdPersonCharacter with velocity dampening.

The first rule of timelines is they can be used on Actor Blueprint Graphs, but NOT Actor Component Blueprint Graphs or Scene Component Blueprint Graphs.
This can provide a conceptual barrier for someone who has not used them before, especially when it seems like adding a timeline to a Scene Component Blueprint Graph is the ideal solution. After realizing this limitation, I arrived at two possible options, and chose the latter after running into issues with the former:

  1. Run the timeline on the ThirdPersonCharacter to provide an intended location to the ThirdPersonCameraTarget, which parents a CameraBoom with a FollowCamera child.
  2. Run the timeline on the ThirdPersonCameraTarget by making it a pawn, completely separating the controller for the camera from the controller for the avatars movement.
PictureCameraBoom has an easy alternative implementation for lag
Implementing Option 2 took a lot of trial and error that I do not have time to discuss here, so I will focus on describing fixing the problem I wanted to solve without explaining how I got the project to this point. The result was a Camera Controller pawn that gets possessed by the same player as the character, then assigns the Character Controller's view target to a Camera Controller instead.

For those interested in a simple solution, UE4 provides an easy way to achieve smooth movement to improve on the "stiff" feeling default camera. Lag properties on CameraBoom
can be tuned in ThirdPersonCharacter to quickly provide a smoother camera.

After unhooking the camera movement from the character movement

There is a Scene Component on my ThirdPersonCharacter called CameraHitch that the ThirdPersonCameraTarget should follow. Using AttachTo with Snap To Target defeats the purpose of this exercise, but serves as a good intermediate to test that the previous steps of implementation are working. To move beyond this implementation, I have to start communicating the location vector of CameraHitch to the ThirdPersonCameraTarget blueprint.

I also want to communicate when the ThirdPersonCharacter loses connection with the ground
to the Camera Controller, and apply a special form of lag to accentuate the impact. Using the jump input as a trigger event is not the correct implementation because it will not show the special lag if the player runs off a high ledge without hitting the jump key. Thankfully, UE4 GetMovementComponent on ThirdPersonCharacter pawn followed by IsFalling returns true exactly when we want it to. Do not let it's name confuse you because IsFalling is true even as the player jumps upward off the ground.

Picture
This part of the ThirdPersonCharacter Blueprint provides information that is used to determine where and how to move the camera
In the ThirdPersonCameraTarget Blueprint, I use Event Tick to trigger a Sequence: first update XY location, then update Z location. This allows me to control camera movement in the Z axis independently from the other axes. For XY, I break vectors and compare floats to trigger a Timeline with a Vector Track, but this article only discusses Z tracking.
Picture
Sequence Then 1 checks if the avatar is falling, and uses different timelines to determine Z tracking depending on that bool's current value
PictureHasLanded is checked if the Player is not falling
The CompareFloat connects to this Branch that checks a property to see if the avatar has landed yet. I refer to jumping or falling through the air as landing, and HasLanded is only activated after the ZLanded camera movement is complete.

The True output from this "Player
HasLanded" Branch goes to the timeline ZGrounded in the image directly below this one.

Picture
ZGrounded is a basic timeline that uses SetActorLocation to smoothly move ThirdPersonCameraTarget with an ease-in-ease-out curve
Picture
While falling, HasLanded is set false and the camera tracks with an easy-in-ease-out curve similar to ZGrounded (graph on left hand side)
Picture
The value of this curve is multiplied by CameraHitch Z position
Picture
The value of this curve is added to the CameraHitch Z position
Picture
In the first frame after IsFalling is set false, this timeline begins and sets HasLanded to true on completion of the camera boom drop and lift
This is a simple system for implementing a camera that adds intensity on landing jumps. However, its would require a lot more tuning and testing to put it in a ready-to-be-shipped state. All of the games metrics would need to be tried in a test level as well as tuning it for game content throughout development. In addition, software engineering support is required for more efficiently running code, so that these camera movements (which are always running) can have optimal performance.
5 Comments
write my essay for me $10 per page link
1/6/2016 11:28:00 pm

I loved this part of Real-time cameras. It is full of entertainment and fun for me in all aspects. All the article of this about camera motion and its working is just marvelous and mind blowing. It is big opportunity for everyone to gain benefit from it and also aware other people.

Reply
essay writing service reviews link
21/11/2016 11:02:33 pm

I've been learning a lot from you! Because of this tutorial, I was able to share my knowledge with my friends. They where amazed in my skills that they asked me to teach them about this. Being able to share knowledge is one of the best assets of us, humans. We can communicate with each other. Please continue to share your knowledge!

Reply
do your chemistry homework link
7/8/2016 10:24:32 pm

Wow, just wow! This kind of improvement on real-time imaging is something still kind of an experiment and that it is something so futuristic sounding for me. The tech and time you would need in making this small movements and make it appear all at the same time in multiple angles is something really exiting to know if possible or even doable last few years back right. Now this is the progress and this progress is outstanding.

Reply
payday loans san-diego link
31/12/2016 09:53:27 pm

Contract organizations require some type of confirmation that the borrower is erring on the side of caution after the liquidation. Many home loan organizations while loaning focus on three things

Reply
Voyance par tchat sans inscription link
11/1/2018 02:51:25 am

Wow, cool post. I’d like to write like this too – taking time and real hard work to make a great article…

Reply



Leave a Reply.


    James Dodge

    Level Designer

    View my profile on LinkedIn

    Categories

    All
    CameraAnalysis
    CameraDevelopment
    GlobalGameJam
    Photoshop
    TombRaider


    Archives

    October 2021
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    October 2016
    September 2016
    June 2016
    May 2016
    March 2016
    February 2016
    August 2015
    July 2015
    March 2015
    February 2015
    December 2014
    September 2014
    August 2014
    July 2014
    April 2014
    January 2014
    December 2013
    November 2013
    October 2013
    August 2013


    RSS Feed

Site powered by Weebly. Managed by Bluehost