How can I create some effect that will make a character looking a window outside view ?

The effect should be like the character is rotating on the y axis smooth maybe randomly so it will looks like the character is looking outside.

This is a screenshot of the character looking out the window. And I want to make as much as realistic.
Like he is watching the view out the window. I don’t want him to move only to make it looks like it’s looking outside investigating the view outside.

Screenshot of the character this big round thing with the blue and green lights is the character :

Now he is facing the window. The camera is positioned out of the window.
Now I want that Navi(This is the character name) to be rotate on the y axis I think only the y axis from left to right directions randomly smooth and to make effect like he is looking the view outside the window.

Not sure if I should make some animation for that or just to use a script.

I tried first this script. The script is attached to the Navi character :

IEnumerator Rotates()
    {
        while (stopRotation == true)
        {
            float rotateY = Random.Range(-90, 270);
            transform.eulerAngles = new Vector3(0, rotateY, 0);
            yield return new WaitForSeconds(speed);
        }
    }

In the Start :

void Start()
    {
        StartCoroutine(Rotates());
    }

But this make the object the Navi to rotate randomly but only to the left direction. And not so smooth.

Then I tried this :

IEnumerator DoLookAround()
{
   float lookPeriod = 5f; // change look every 5 seconds
   float maxRotationSpeed = 90f; // turn no faster than 90 degrees per second
   Vector3 neutralForward = transform.forward;

   while(true)
   {
       float timeToNextLook = lookPeriod;

       while (timeToNextLook > 0) {
           // Get random offset from forward
           float targetYRotation = Random.Range(-90f, 90f);

           // calculate target rotation
           Quaternion targetRotation = Quaternion.LookRotation(neutralForward, transform.up)
                                      * Quaternion.AngleAxis(targetYRotation, Vector3.up);

           // rotate towards target limited by speed
           Quaternion newRotation = Quaternion.RotateTowards(transform.rotation, targetRotation, maxRotationSpeed * Time.deltaTime);


           timeToNextLook -= Time.deltaTime;
           yield return null;
       }
   }
}

And in the Start :

StartCoroutine("DoLookAround");

But this code didn’t do anything. The Navi is not rotating at all.

I want to make as much as possible realistic looking effect.

You could try a sin / cos wave.

If you’re going for “realistic” I would argue a programmatic approach is going to look… well… programmatic.

If you want a more realistic, or the word I like for it… organic… look and feel. You need that human touch. The faults/errors that come with the way a human interacts with the world.

And the best way to get that… animation.

Let a human animate it by hand and you’ll get that realistic look/feel. Because you’re not actually looking for the true algorithm of how one looks out a window… you’re looking for what people expect someone looking out a window is supposed to look like.

It’s not just realism… it’s artistic realism.

I’m now going to go all art nerd on ya…

I’d also expand on this in saying even then you need more art put into this because of the implications of the scene. Watching someone/something look out a window isn’t a normal thing to do. One does not stare often at another staring out a window (unless you’re a peeping tom or something).

Rather instead a scene where you observe someone observing is more a film like moment… it’s a cinematic moment that has meaning to audiences. You’re staring into the face of a person who doesn’t know someone is staring into their face. The face is the portal to the soul, and so an audience is going to naturally assume this scene is supposed to be telling us something. We’ll be looking for information in the face of the person/thing we’re looking at.

How do they feel? What is their personality? Do they look intently with purpose, or aloofly like nothing is of concern to them? Do they stare past the viewer into the void behind them, or into the eyes of the viewer (center camera)?

All of these elements with evoke sensations in the audience and lend to the “realism” of it. It’s not true realism… it’s the emotion they’ll take away from the moment. Will the audience feel uncomfortable, will it fall into the uncanny valley, what is the audience going to think?

And a programmatic approach erases all of that.

An animation is what gives the moment its charm. The creator can inject intent into the scene. Especially if the thing is not human… you need to add that layers of human charm onto the non-human thing. Think like when we find faces in everyday items… it’s usually because of the emotion we interpret that thing having as we anthropromorphize ourselves onto it.

4673393--439883--img1.jpg 4673393--439886--img2.jpg 4673393--439889--img3.jpg

These images aren’t just faces because we see 2 eyes and a mouth… it’s because we can describe how the object “feels”.

1 Like