Ok, I managed to get what I wanted and just want to say thank you for your help and pointing me in the right direction @Blake
Here is the link to the final code.
https://www.babylonjs-playground.com/#0H56F2#10
Useful link
https://forum.babylonjs.com/t/custommaterial-samples/57