Hi guys, Iβm Ashif Ali, and welcome to another tutorial! Today, Iβm creating an eyeball material in Unreal Engine 5.2, and youβll learn how to customize the eye color and create a blinking effect. You can find the project file on my Patreon.
First, make sure to subscribe to my YouTube channel and click the bell icon to get notifications for future videos.
Tutorial:
Creating the Eyeball Material:
Start by creating a new material named βEyeball.β
Use a sphere as the base mesh for the eyeball.
Import a blur noise texture and adjust its settings to create a basic eyeball texture with a black circle in the middle.
Sharpen the texture using SmoothStep and tweak its maximum and minimum values.
Masking and Coloring:
Apply a mask to create the sharp edge for the black part of the eye and adjust the size using the SmoothStep function.
Add a gradient and mask it with the spherical coordinates to control the black and white areas.
Use a parameter to change the eye color (for example, blue).
Creating the Blink Effect:
Add a gradient for the blinking effect using texture coordinates and the Sine function.
Mask the gradient to only apply to one side of the eye (top or bottom).
Animate the blinking effect by multiplying the time with the blink mask, adjusting its speed using a scalar value.
Fine-Tuning the Material:
Adjust the blink speed and size using parameters, and connect it to the eye texture.
Use Power to adjust the sharpness of the blink, making the transition smoother.
Apply additional noise for a more dynamic look, and use the Vertex Normal to add some detail.
Specular and Redness Effects:
Add a specular highlight to the eye to make it shine more realistically.
Use SmoothStep and Noise to add some redness around the eyeβs edges to simulate irritation or veins.
Pulsing Effect for the Eye:
Add a subtle pulsing effect to the eyeball while it blinks, using a Time and Sine function.
Adjust the pulse speed and intensity to make it feel natural.
Final Adjustments and Rendering:
Once satisfied with the look, save the material and apply it to the sphere mesh.
Create an instance of the material and adjust parameters like color, blink speed, and specular intensity in real time.
Outro:
The eyeball material is now ready with a customizable color, blinking effect, and additional pulsing. Save the material and instance, and you can make further tweaks in the editor.
I am Ashif Ali, Real-Time VFX Artist, I make Unreal Engine Niagara Tutorial on this channel. I've made it my mission to share my knowledge and expertise with the world through my YouTube channel. So why not join me on this exciting adventure? Follow me on my social links, subscribe to my channel, and support my growth as a creator. Together, we can create amazing things and take our skills to new heights. And who knows, you might even get access to some of my exclusive files for free!