With the continuous development of computer graphics and computer technology, real-time graphics rendering technology is more and more widely used in virtual reality technology. Firstly, we introduce the necessary ray intersection detection, reflection, and refraction calculation parts of ray tracing, and summarize the flow of ray tracing. Then, the rendering equations are summarized by introducing the Monte Carlo method and cosine-weighted sampling. An improved hierarchical enclosing box algorithm has been introduced to meet the demand for real-time rendering of virtual graphics. In addition, this paper proposes a real-time ray tracing method for noise reduction in the time domain, based on accurate motion vector computation, to address the noise problem in rendering computation. Based on the above-optimized path tracing method, a virtual graphics real-time rendering system with interaction management control, scene resource management, and path tracing rendering modules has been constructed. Its rendering consumes 6-9 times more time than the traditional method, and it can render light at more than 35 frames per second under hundreds of light sources. The real-time graphic rendering and interaction system proposed in this paper has a better performance in the experience dimensions such as aesthetics, functionality, and natural interaction, and the score reaches a perfect score on the evaluation index of natural interaction, which indicates that the real-time graphic rendering and interaction system designed in this paper This shows that the interaction management and control module in the real-time graphics rendering and interaction system designed in this paper can well accomplish the task of optimizing real-time graphics rendering and interaction in virtual reality.