The following might be terrible, misguided advice, but in my brief
dabbling with shaders, you could associate a shader with the patch of
wall you are calling a mirror, and let the shader raytrace the scene in
both directions (eye <- mirror -> room) and have it done on the GPU.
I'd be interested to know if that's a good or bad idea, too.
-charles
[EMAIL PROTECTED] wrote:
Hi All,
I'm cogitating on the subject of mirrors at the moment and wanted to run some thoughts by you all to see what you thought.
I've had a little look at the osgReflect example and wondered whether this was appropriate for what I wanted to do. On the face of it - looking at the code that is - it seemed a little too complicated for what I was wanting to achive.
Essentially I'm trying to construct a room which has one or more mirrors in it. These may be mirror tiles, or standard wall hung mirrors. I'm trying to set up a system where by these mirrors actually display the correct "mirrored" view of the room content.
One thought I had was to look at where the observer is within the scene, and for each mirror calculate where to position a camera so as to generate the image that would be viewed in the mirror from the observer position.
One potential issue that springs to mind on reflection - pardon the pun - is that I may need to account for the perspective alteration of the mirror shape when mapping the texture to the mirror.
Has anyone tried to do this type of thing before, and if so is there any advice
you might be able to give ?
Thanks in advance.
Neil.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/