Tilt Shift makes the scene seem much smaller than it actually is, simulating the shallow depth of field normally encountered in close-up photography. The effect is especially noticeable in relatively flat scenes.
Once installed, select the camera of the scene and add the component ‘Tilt Shift‘.
When you add it you will see something like:
- Strength of the effect [0, 1].
- Angle of the effect [-90, 90].
- Effect aperture [0.1, 5].
- Vertical offset [-1, 1].
- Smoothness of the blur effect [1, 10]
- Blur multiplier [0, 10].
- Activate this to modify the following color parameters.
- The color of the edges.
- Color saturation at the edges [0, 1].
- The brightness of the edges [-1, 1].
- The contrast at the edges [-1, 1].
- Gamma correction at the edges [0.1, 5].
- Show focus line.
- Show blur mask. This option is useful to adjust the blur zone.
- Go to the online documentation.
- Reset to default values.
All code is inside the namespace ‘Ibuprogames.TiltShiftAsset‘ and main component is ‘TiltShift‘. So if you want to use it you must first import its namespace:
If ‘myCamera‘ is a valid camera and you want to add the effect, you should do something like:
TiltShift tiltShift = mycamera.gameObject.AddComponent<TiltShift>();
All the code are well commented, I recommend reading the code if you want more information.
Any questions or suggestions you have, we will be happy to answer you in our mail: