It all stems from the fact that Hindi has free phrase order. Let's take this sentence to present tense and replace Peter with something inanimate like say a banana:
आमिर केला देखता है। - Aamir looks at the banana.
It's clear who is doing the looking. But now if we play with the word order a bit and say
केला आमिर देखता है।
It might sound a bit weird in the beginning, but people will figure out that the banana can't see so the looking has been done by Aamir.
But now if the object were animate like Peter, I would have no way of telling who did the looking except by assuming that the sentence is in SOV word-order, which we don't want to rely on. So we mark the object to make it explicit.
आमिर पीटर को देखता है।
Even if we change the word order.
पीटर को आमिर देखता है।
It is clear who is the looking.
Now let's come to the example bhasnova gave, now a dog can definitely see but it is still not a person. So if I read a sentence like:
कुत्ता आमिर देखता है।
It would really split my head. But even though SOV word-order suggests otherwise I would still think that Aamir did the looking because in the other case it would have been आमिर को.
Personally I just put the direct object in oblique case if the direct object can do of the verb.
And then there are ditransitive verbs which just force us to rely on word-order.
So it's a little bit messy but basically: -ने marks the subject when (1) there is also an object and (2) the verb is in the perfective form. So compare:
आमिर पीटर को देखता है -- Aamir sees Peter; present/imperfect, so no ने
आमिर चला -- Aamir went; past, but no object, so no ने
आमिर ने पीटर को देखा -- Aamir saw Peter; past/perfect and there is an object, so there has to be ने.
You are almost correct. Condition (1) is not that the verb has a direct object but that it can have a direct object. In other words, it should be a transitive verb.
Eg: जूलिया ने देखा। is a valid sentence (though admittedly. it doesn't make much sense without context).
देखा does not have a direct object in this sentence but a ने is still added because it is transitive (When there is no direct object, transitive verbs in perfective tenses conjugate as masculine singular).
Note: Unlike in English where the same verb can behave as both transitive and intransitive in different sentences, transitivity is an innate attribute of a verb in Hindi. If it can admit direct objects, then it is transitive
It's similar to how you look at someone but meet with someone.
With dekhna, the action of 'seeing' can be understood to be directed from the person doing the seeing to the person being seen. So, को is used.
With milna, the action of 'meeting' may be understood to be done by Aamir and Peter is a means for the action. So, से is used.
Here's an example with a different pair of verbs.
आमिर पीटर से बात करेगा - Aamir will speak with Peter
आमिर पीटर को सब कुछ बताएगा - Aamir will tell Peter everything.
In the first sentence, it can be assumed that Aamir and Peter will have a mutual dialogue which is why से is used. In the second sentence, just Peter is doing the talking and Peter is the listener. So, को is appropriate.