You already know how to create 2d icons from 3d meshes. Now it’s time for more realistic icons that have alpha as well.
They will be used in next tutorial covering weapon selection screen.
<strong>This Tutorial has been created using Unreal Engine 4.9.2</strong>
Make sure you are working on the same version of the engine.
Render Target preparation
Create new render target texture named Icon_RenderTarget.
I’m using 1024×1024 resolution.
Icon Blueprint preparation
Create new blueprint extending from Actor named BP_IconCreation. Open it.
Add new Scene Capture Component.
- Location: 0,0, 592,
- Rotation: -90, -90, 0 (it should point bottom)
- Field of View: 2,
- Texture Target: earlier created Icon_RenderTarget
Add Static Mesh component and Skeletal Mesh Component. Theirs location should be set to 0,0 -140. Rest can be default.
Add Spot Light Component which will be aiming Static/Skel meshes. For me its:
- Rotation: 0, -90, 0
- Inner Cone Angle: 80,
- Outer Cone Angle: 80,
- Attenuation Radius: 4000,
- Use Inverse Squared Falloff: false,
- Intensity: 2,
- Color: 162, 173, 255
You could add two point lights covering top and bottom space of static/skel meshes.
The goal here is to light up the mesh. You could assign mesh to check the results.
Create new blank map.
Add BP_IconCreation to the level and select it. Using Components view you can assign mesh to static mesh (or skel mesh) set location and change settings of SceneCaptureComponent to match your texture.
Here’s the video on how to use components view.
Converting RenderTarget to Texture
When you are happy with your layout on the texture just right click on it in Content Browser and select Create Static Texture.
And this will create texture for you! The Alpha is inverted thou so in material you should use one minus block:
Thanks to this you will have icons for next tutorial!
Implementing game is taking time but writing about it is taking much more effort!