Aiming at the problems of low rendering efficiency and the long time-consuming of traditional dynamic scene rendering methods, this study proposes an optimization method of animation design CAD and virtual reality dynamic scene rendering based on a transformer model. Through the construction of the animation design CAD model, the transformer model is used for animation design. Combined with spatial data conversion and graphics, the geometric transformation of animation design CAD model is carried out to realize the geometric transformation of graphics. By using primitive transformation, normal transformation, and lighting models combined with the data characteristics of dynamic scene rendering, the virtual reality dynamic scene rendering optimization model is constructed. Experimental results show that, compared with traditional methods, the proposed method can shorten the rendering time of animation design CAD and virtual reality dynamic scenes and effectively improve the rendering efficiency of animation design CAD and virtual reality dynamic scenes.