Implementation of Mirror Reflection Effect Based on OSG
Cao Li · Jisuanji fangzhen · 2009
In view of the problem of how to improve the render performance in the virtual reality fields,this paper presents API of OSG(Open Scene Graph) to realize the special effect of mirror reflection.Because the image of the effect is the copy of the reflected geometry mirrored,and the scene graph of OSG can support reusing the object instanced,it may load geometry model only once,then add some parent nodes to the model,finally draw models with different states.Meanwhile,the StateSet class of OSG can manage the render state,every StateSet object may optimize the state set automatically,minimize the times of switching state,and improve the render performance.The experiment proved that the real phenomenon of mirror reflection can be simulated via the development library of OSG,and redundant state sets are avoided.