2D animation eyes (live 2D eyes on 3D model)

2D animation of the eye through the material. I made a model but it does not have standard eyes, I can not move them, it remains either to alter the model or use animation through the material. I have been looking for information on this topic for a long time, but I will not find clear answers. I know that UE4 can react to object (camera) Please help. The model I remake can not, because I’ll ruin the canonicity.

must be something like this.

255006-awrnbu3.gif

I do not fully understand your question, what exactly do you want to make?

Colder347, I want the character to be able to follow something without using his eyes, but using the material on those eyes.

Use Draw line3d. Run the line mask from the center of the eye to whatever it’s looking at. You have to set the look at location parameter in a blueprint, but can probably just use the actor postion node for the other point to be the center of the eye(may have to offset it a bit though). Its a super useful node but kind of undocumented. If you have trouble figuring it out just leave a comment.

I partly understood. Can see an example from blueprint. It is desirable to see everything that I would understand how the engine works. Yes I can make an object observe a pawn or other object.

I put together a prototype at made a video. It didn’t work as well as I expected, but you may be able to figure out how to work out the bugs.

link text

I have two problems. The eyes do not appear in the game, but the editor has, in blueprint the eyes disappear. I also need to use textures and grid. Sample. The material has been applied, but the eye is not, and can do something similar, but with these eyes, not with the plane.

!
alt text

Found a way better method. I tested on a the default shape_sphere mesh that was flatted to resemble the eyes in your pic. You may need to adjust the uv’s of your eyes to be similar to the sphere.
[link video][1]

1 Like

Also you probably have to set the texture from wrap to clamp it the texture’s setting so it doesn’t tile as you scale it.

try it now. But where does MID come from?

255459-screenshot-2.png

Oh forgot to take a pic of the construction script. MID stands for material instance dynamic. The first vid had a similar custruction script.

Video 1 link text
Video 2 link text

I repeated the code, but it doesn’t work. I’m probably just stupid.

Well, I had the idea with eyes like that. When the character is not one else is looking, his eyes are looking in different directions for animations. And when the area gets any character for example the main character or NPS then he looks at him. The thing is, I have no idea how to do this. I learned a lot in UE4 and every day it surprises me more and more. The eyes of my character are not standard and therefore asked for help.

you’re casting to the eyes. you need to cast to the thing you’re looking at.

a few thoughts,
you could probably set the same material instance on both eyes. unless your character needs to go crosseyed or the eyes are set too far from the actor’s origin, in that case you would need to reference the component’s locations rather the actor.

you may need to offset the z location. as is the eyes will look at the origin point of whatever actor they are looking at. if you looking at characters, maybe you can reference the capsule height to dynamically estimate the offset.

you could use interfaces rather than casting to verify if the thing you’re looking at is observable. the cast was just for testing purposes.

could you show me how to make those eyes again? I can’t do anything.

sorry for the delay in responding. have you gotten it figured out or if not what’s not working?

good day friend. and I’m sorry for my long absence. I could move my eyes… but if I turn the Actor horizontally by 90 degrees, then the eyes are already working incorrectly, if I turn again in the same direction, everything works correctly… That’s the first problem. Now the second. How to force the character to pay attention to the object. He just doesn’t want to work right a little bit.

Thanks! This little snippet helped me to track some stable values trying to get 3D look ats to make since and be applicable to some 2D offsets finally!