(The following lines are not intended to hurt anybody's religious sentiment, nor are they an attempt to glorify the mythological character of Ravana and undermine any other. They form just an objective analysis).
Epics or history is generally written by the victors or the powers that be, depicting the events from the victors' perspective, almost always. The vanquished might also have their side of the story to tell, but it always gets relegated to the background or dumped. History repeats itself. Historical pattern or perspective of an event or events is repeated too. It was true in olden times, true today and will be true tomorrow. On that count, history may not always be cent-percent objective as some subjectivity may crop in inadvertently. After all, history is written by humans and not by inert machines. Historical events as told and retold, generation after generation, sets in our psyche permanently and lives on, even half-truths. 'A lie told often enough becomes the truth'.
'Ramayana' is the story of victorious Rama over the demon king Ravana as told by sage Valmiki and also repeated by many later. But, nothing like 'Ravanayana' was ever written. The other side of the story may certainly have some real historical value but lost in silence. In recent times, the invaders from the western front, including the Mughals, destroyed many rich age-old Indian scriptures and edifices, the story of the defeated side was ignored and the victors were glorified. The British colonists by their designed purpose to keep the natives perpetually demoralized, condemned Indian heritage, culture, and history, terming it as mere mythology, and imposed their own history, language, and culture. Even during modern times, after independence, the power in the helm of affairs continued with the British ways, sponsored and highlighted only selected portions of Indian freedom struggle in the textbooks, rendering those incomplete and partly unauthentic. Unfortunately, the Indian textbooks still merely depict the history of Delhi and not of entire India.
Was Ravana as demonic as he is made out to be? Or, was he just a vanquished anti-hero? Is the perception about 'Deva' and 'Asura' or Aryans and non-Aryans as is stuffed into our heads, one-sided? Such questions deserve in-depth objective analysis. The so-named Aryans, who were expert warriors and had great knowledge of philosophy and religion crossed the Hindukush pass to establish their domain in 'Bharatavarsha'. Primarily they reared animals and probably had no knowledge of agriculture. On arrival, they found a well developed and flourishing civilization; people lived in well-laid settlements and knew agriculture. The Aryans defeated and pushed them back down south and occupied their kingdoms. The victors termed them as Asuras with demonic attributes.
Battles and wars between the two warring people continued thereafter, some sporadic and some large scale like the Lankan war. As a matter of fact, both groups were mere human beings fighting for survival. The 'Deva' group surely didn't have all the godly qualities and the 'Asuras' the bad devilish ones. It is possible that the former class of people were genetically fair-skinned and well built and the later were dark-skinned for climatic or genetic reasons. They certainly didn't have that dreaded demonic looks as the 'Devas' painted them to be. The flourishing Asura kingdoms lied shattered under the onslaughts of the Devas. At this juncture, Dashagriva (later known as Ravana), a fiery young man appeared in the scene and became the savior of the demoralized Asuras. Highly ambitious Dashagriva forcefully took over the kingdom of Lanka from his half brother Kubera and established huge Assura empire that spread evenly across Bali and Malaysia.
Ravana's father was Vishashrava, son of Prajapati Pulastya and mother a 'Daitya' (demon) princess Kakashi. So, Ravana was half Brahmin and half Asura by birth. Contrary to the belief, Ravana was not a cruel ruler but was a benevolent and wise king. During his reign, Lanka became so prosperous that the capital city was termed as 'golden Lanka'. He was a great Shiva devotee and received a near-immortal boon from him that made him invincible and the Devas dreaded him. The wise demon king was a great musician, an accomplished Veena player who designed 'Ravana Veena' and composed famous 'Shiva Tandava'. The brilliant scholar that he was, had a thorough knowledge of four Vedas and six Upanisads. Being well versed in Ayurveda, wrote four books on medicinal and healthcare. A highly respected astrologer, he authored 'Ravana Samhita', considered to be a standard reference book by astrologers even today.
Even with all these superb qualities, the greatest blot against Ravana is that he, unlike the great warrior he was, abducted Sita, a married woman, by deceit, in absence of Rama and Lakshmana to take revenge of his sister Surpanakha's insult. But after taking Sita to Lanka, he never forced himself on her for long ten months and proposed marriage like a gentleman. On rejection, he never tortured her or threw acid as the modern civilized men do. But deceit is not unique to the Asuras only. Taking shape of a small Brahman, Lord Vishnu dethroned popular Asura king Bali by deceit. Rama killed monkey-king Bali, hiding behind a tree, etc.
In conclusion, it can be said that neither Rama or Ravana were perfectly good or insanely bad. Both were human beings. But Rama had some godly qualities that upgraded him to the level of a god. But Ravana was the epitome of a complete human being without any pretense. His ten heads is also a complete myth as is not humanly possible. Ten heads represented ten supposedly bad qualities in any normal man only. Ravana was as good or as bad, the way nature designed a normal man to be who became a supreme human anti-hero.