UE4 – Replace the Camera component icon

Software:
Unreal Engine 4.26

Note:
This seems like an awkward workaround..
So if I missed something here, and there’s a better method to do this,
I’ll be very grateful is you share it in the comments.
Also,
The following tip is only relevant for the CineCameraActor and won’t work with a regular CameraActor as it has a different built in offset (hopefully, I’ll have time to add this to the post later..)

Replacing the camera icon:
Its fairly simple to replace the Camera component’s mesh icon,
Just select the component and replace it’s Camera Mesh Static Mesh component with a different static mesh object:

So what’s the problem?
The problem is that the default mesh used for the camera icon doesn’t have its natural pivot at the focal point of the camera, but at its bottom somewhere,
And there is a hardcoded transform offset that compensates for that and places the icon mesh in a way that has the Icon lens roughly at the actual Camera actor pivot / focal point:

* I haven’t found any exposed transform parameter that allows moving the icon itself without moving the camera.
So in-order to replace the camera mesh with an alternative icon mesh, and have it be aligned properly to the camera’s pivot / focal point (without changing engine code and building it) the built-in offset must be negatively pre-added to the new mesh model:

In this example in Blender, a new icon is modeled facing positive Y, with pre-built offset to compensate for the hardcoded offset in UE.

The Camera actor with the alternative Icon:

Note:
In this example, I’ve replaced the camera icon with a much smaller model, intentionally, to suite a tiny scale project,
You can also scale the icon without replacing the model.

Blender – assign different cameras to different view-ports

Software:
Blender 2.79

By default, the view-ports Camera view in Blender displays the view from the camera that is set as the scene’s Active Camera.
If you split the view and in the new view select a different camera and set it as the Active Camera, the view in other view-ports set to camera view will update to display the new Active camera.
In short, by default, it seems you can’t assign different camera views to different view-ports..

But you can…

You just have to unlock the wanted view-port from the scene’s Active Camera by de-activating this button:

Untitled-2

When the Use the scene’s Active Camera and layers in this view button is de-activated, your allowed to set an Active Camera for the specific view-port without changing the scene’s Active Camera setting, therefore not affecting other view-ports displaying the camera view.

Untitled-1

Creating a camera animation in UE4

Software:
Unreal Engine 4.18

  1. Create a Camera Actor:
    Cinematics > Cine Camera Actor
  2. Create a new Level Sequence:
    Right Click the Content Browser background and choose Animation > Level Sequence.
  3. In the Content Browser, Double Click the new Level Sequence to open it in the Sequencer.
  4. press ‘+ Track’ and choose Camera Cut Track.
  5. In the camera track press ‘+ Camera’ and choose the Camera Actor you created.
  6. press ‘+ Track’ and choose Transform.
  7. Move the Time-Slider to the motion start time, move the camera to its starting position and orientation, and press the little ‘+’ button at the right of the Transform track <- + -> to set the first Key-Frame for the camera movement.
  8. Move the Time-Slider to the motion end time, move the camera to its ending position and orientation, and press the little ‘+’ button at the right of the Transform track <- + -> to set the last keyframe for the camera movement.
  9. Repeat this to create more Key-Frames and develop the camera motion.
  10. Press the Clapperboard button to open the Render Movie Settings,
    Choose the file format, frame rate, resolution, and save location and press Capture Movie.

Untitled-0.jpgUntitled-1Untitled-2Untitled-3Untitled-4Untitled-5Untitled-6Untitled-7

 

Related:

  1. UE4 – Playing an Animated Level Sequence
  2. UE4 – Packaging a project for Windows
  3. UE4 – 3ds max & V-Ray Datasmith workflow

 

 

 

 

 

 

 

 

Align camera to view in Blender

Software:
Blender 2.79

  1. Create a camera.
  2. Press Ctrl + Alt + 0.

Note:
This command will align the Scene’s Active Camera to the view,
And not the camera that is selected as the Active Object.
To make the selected camera the active camera:
In the 3D View select:
View > Cameras > Set Active Object as Camera

Exporting 3D camera data from After Effects to 3ds max

Software:
After Effects 2020

  1. Download the AE3D_Export script here:
    http://www.urbanspaceman.net/shared/AEscripts/AE3Dexport/AE3D_Export.jsx
  2. Perform 3D tracking on the footage if necessary.
  3. Select the 3D Camera layer and also Null layers if available.
  4. Choose File > Scripts > Run Script File and locate the AE3D_Export script.
  5. In the Script parameters highlight 3ds max.
  6. Click Options and set the scale.
    * you might need to try and see the scale in 3ds max to set it right.
  7. Set a name for the exported ms (MaxScript) file.
  8. Click Export.
    The resulting MaxScript file will appear on the desktop named <your after effects project name>.ms
    Note:
    You may be prompted to check the Allow Scripts to Write Files and Access Network option in File > Preferences > Scripts & Expressions.
  9. Drag the generated MaxScript file into the 3ds max viewport.
    The script will run and create an animated Camera and Dummy object, and also set the timeline range to fit the animation.
  10. Create a new Point Helper object.
  11. Align the new Point Helper to the Dummy object in both position and orientation.
  12. Group the Camera and the Dummy objects together, and link the group to a new Point Helper.
    This will allow for easy orientation and scaling.
  13. Set the Point Helper object’s rotation to default (0,0,0) , this will also reset the Dummy + Camera group’s orientation relative to the world.
    Scale the Point Helper object if needed, to scale the whole camera setup.
  14. Display the original video sequence as viewport background to check how the camera motion fits the video.
    The center of your Point Helper should appear “glued” to a specific point in the background video. 
Untitled-2

 

Related:
After Effects 3D Camera tracking

Arnold for Maya Depth of Field (DOF)

Software:
Maya 2018 | Arnold 5

Untitled-2.jpg

  1. In the camera shape node’s Arnold Attributes:
    Check ‘Enable DOF’.
  2. Set ‘Aperture Size’ and ‘Focus Distance’ to control the effect.
    Note:
    The Aperture Size attribute isn’t an f-number aperture like we would expect in photography but a radius in world units.
    Larger Aperture Size values (larger lens Iris opening), and shorter Focus Distances will cause a narrower Depth of Field which will result in the background appearing more blurry.
    DOF is generally more apparent with ‘long lenses’ (shorter focal length).
  3. Set other Aperture attributes like the number of blades and aspect ration to further design the appearance of out of focus areas and especially highlights.
    * The optical effect referred by the term ‘Bokeh’ in photography.

 

Related Posts:

Arnold for Maya Motion-Blur

After Effects Camera Lens Blur

Sample based white balance using the physical camera in 3ds max / Maya

Software:
3ds max 2017 | Maya 2018 | V-Ray 3.6

3ds max

Render a test with White Balance set to Custom with pure white color.
Let the rendering go on at least until the pixel values stabilize (the Denoiser works at least once..).

WB_A
Test done using custom white balance with pure white

set the white balance custom color to a color sampled from the VFB at a point that you know should be appearing completely neutral (neither warm or cold)

WB_B
White balance is set using sample from the test rendering

Render again.

WB_C
A new render done with the sampled white balance color

* Each time you want to test different sample locations you need to sample the pixels from the test rendered with custom pure white.

Maya

The procedure in Maya is identicle,
Add V-Ray Physical Camera attributes to the camera and enable them,
Create a test render with pure white White-Balance Color,
Sample the white/grey surface color in the V-Ray VFB (Render Window) to the White-Balance color, and render again.

Untitled-2.jpg

Untitled-2.jpg

 

V-Ray for Maya Physical Camera

To access V-Ray Physical Camera functionality in Maya,
V-Ray Physical Camera attributes must be added to the camera and enabled.

1) select the camera

2) In the attribute editor open the Attribute menu and choose V-Ray > Physical Camera

3) make sure treat as physical camera is enabled

* you can add more V-Ray Attributes to the camera like this

V-Ray_Physical-camera