Despite the rapid advancement of neural implant technologies for sensory restoration, the question ‘how to design protocol for transformation of arbitrary senesory stimulus into brain stimulation signals that would induce perception of said stimulus by the subject' remains open. To address this quesiton, we have developed a detailed large-scale spiking neural-network based modeling framework, capable of simulating both natural and prosthetic vision. The framework enables the study of interactions of external stimulation with the ongoing cortical dynamics in funcntional model of visual system. We have tested the framework by using it to design and validate a stimulation protocol for encoding of elementary visual stimuli in the context of high-resolution optogenetic-based visual cortical implant under development. For future applications, the modelling framework can be adapted for other visual implant technologies by changes to only small subset of relevant compartmentalized modules.