- Category: Materials
- Update: 1.2 (10-10-2019)
- Unreal Engine: 4.18 - 4.23
- Platforms: PC, Console, HTML
Weapon FOV is an advanced and very useful material node that solves a lot of issues related to the first-person character. This package will take your FPP game to industry standards like Shadow Warrior, HL2, Battlefield, Dying Light and much more without any noticeable additional cost.
It is just one node in material calculated per vertex so implementation is very fast and you don’t need to use any additional render target or separate pass to fix problems with a weapon.
Unreal Marketplace :
- Separate weapon FOV – You can set a custom field of view per weapon. Fixes the weapon stretching when changing the game FOV. Useful for calibrating weapon size on the screen independently to the camera.
- Weapon depth priority – Weapon scale in camera Z axis (depth). This feature fixes the intersection of weapons with walls. Player capsule radius can be smaller and the weapons can be rendered over the environment.
- Near plane clipping – Modify the near clip plane to see more/less of mesh in the camera.
- Weapon transform – Applies a custom position of the weapon in camera space.
- Effect blending – Implements transition between FOV space and world space. Useful for projectiles and character body that is standing on the ground.
- Material node – Can be customized per weapon or controlled in global material parameter collection.
- Clean implementation – Calculated per-vertex, very fast no need to use separate pass to fix problems with a weapon.
- Zooming effect – Change the camera fov when weapon stays the same. That makes scope zoom effect really easy to implement.
- NEW! Realistic sniper scope – Multiple parameters: lens refraction, aberration, overlays ect.
- Open material that should be rendered in special weapon FOV mode.
- Go to detail panel on left hand side ( Default Viewport on 4.23 )
Check ” Materials > Use Material attributes [ Bool Value ] “ to true.
- Create a new node ” MakeMaterialAttributes “ and plug everthing same as how your materials work.
- Create a new materials function node ” ML_WeaponFOV “ plug into ” Material Attributes “.
- or in case you have “ Use Material attributes = False ” in the material then put ” MF_WeaponFOV “ material node before the final node in the chain.
- And here is an example of materials.
All global parameter can be edit by ( MP_WeaponFOV [ Material Parameter Collection ] ) inside of Weapon_FOV folder.
|Weapon FOV||Custom field of view per weapon. This fixes the weapon stretching when changing the game FOV. Useful for implementing zoom effect and calibrating weapon size in the screen independently to the camera.|
|Depth Scale||Weapon scale in camera Z axis (depth). This feature fixes the intersection of weapons with walls. Player capsule radius can be smaller and the weapons can be rendered over the environment.|
|ClipDistance||Modify near clip plane to see more/less of mesh in the camera.|
|Blend Effect||Bending between enabled(1.0) and disabled(0.0) effect.|
|Weapon Offset||Transformation of the weapon the camera space.|
Custom field of view for the mesh that applied with materials, This fixes the waepon stretching when field of view of game camera has been changed to other value, Useful for implementing zoom effect and calibrating weapon size in the screen independently to the camera.
Modify near clip plane to see more/less of mesh in the camera, This function is working same as (Near clip plane) features in Unreal Engine 4.
Weapon scale in camera Z axis (depth). This feature prevents the intersection of weapons with walls. Player capsule radius can be really small and the weapons will be still rendered over the geometry of scene.
Implements transition between FOV space and world space based on the distance from the camera. Useful for projectiles and character body that is standing on the ground.
The WeaponFOV package in version 1.2 introduces new feature that helps to implement sniper scope in your games. New advanced material M_ScopeLens can be found in Utils folder.
Example instanced material of M_ScopeLens can be found Demo folder WeaponFov/Demo/Weapon/MI_ScopeLens. Multiple parterres can be modified to achieve very realistic effect of scope all visual effects are divided on three categories Lens Layer, Overlay Layer, Circle Mask:
Black circle that represents the mask of effect.
|Circle Radius||The radios of circle mask.|
|Circle Width||Width of circle mask edge.|
|Circle Color||Color outside of circle mask.|
|Use Circle Mask||Whether the circle mask should be used.|
Distortion used on texture rendered from the additional camera.
|Lens||Aberration of R/G/B channel and exponential power of effect in encoded in Alpha channel. (UseLensAberration=true)|
|Lens Color||Color multiplier of the lens texture.|
|Lens Map||Render target of scene.|
|Lens Refration||Lens refraction effect scale (fisheye). (UseLensRefraction = true)|
|Specular Offset||Base secular of lens (lens reflection)|
|Specular Scale||Secular scale of lens out of the screen center. (lens reflection)|
Texture layer that render the telescopic sight.
|Overlay Alpha Source||The source channel of overlay alpha.|
|Overlay Color||Color multiplier of the overlay mask.|
|Overlay Depth Offset||Depth offset of the overlay texture.|
|Overlay position Scale UV||RG-Position, BA-Scale of overlay texture.|
|Overlay Texture||Texture used as overlay map.|
|Use Overlay Texture||Whether use the overlay map.|
Advanced Mesh UV
Mesh UV is a group of advanced parameters that can be used for adjusting the UV mapping of the scope projection on screen.
|Depth Offset||Offset scale when circle is not centered on screen. Use 0 for no offset.|
|Depth Scale||Scale the circle when circle is not centered on screen. Use 0 for no scale.|
|Pivot Direction||Pivot direction of the scope relative to weapon. Helps to calculate the projection of the camera texture on screen.|
|Pivot Pivot Offset||Pivot location of the scope relative to weapon. Helps to calculate the projection of the camera texture on screen.|
|Use Component Space Pivot||Whether the circle mask should be calculated in the pivot space.|