Page MenuHome

ImageMirror doesn't work in BlenderPlayer with quadbuffered
Closed, ResolvedPublic

Description

ImageMirror functionality uses active camera to render to texture instead of rendering the view of a camera at the mirror plane along the normal.
Use the blend file here, and test with the embedded player. Only change is to enable quad buffered

http://www.tutorialsforblender3d.com/BGE_Python/Video_Texture/ImageMirror/ImageMirror.html

Event Timeline

Angus Hollands (agoose77) raised the priority of this task from to 90.
Angus Hollands (agoose77) updated the task description. (Show Details)
Angus Hollands (agoose77) edited a custom field.

I also expect that quadbuffer will fall back to no-stereo in the case that no quadbuffer capable card is present, which is why I do not see this on my machine.

I don't understand the problem. ImageMirror does a render to texture using a internal camera that is oriented along the normal of the mirror and placed at the symmetric position than the target camera; it does not use the active camera as the description above tends to say.

I ran the demo in Blender and in the player, the reflection image is geometrically exact as can be seen by the alignment of the floor lines across the mirror.

Unfortunately in blender player, it is using the active camera, not the mirror plane camera added at runtime. Only fails with quad buffer on a machine which supports it afaict

Now I understand. If the problem is with quad buffer, than most probably there is a mixup between the buffers: the render happens on the right buffer while the texture is loaded from the left buffer or something like that. I think there's just a missing call to glDrawBuffer.
I can easily add that but testing will be more difficult: although I have a quadro FX 370 card, it seems that the Linux driver does not support it for quad buffer stereo. I'll prepare a patch anyway.

Here is a patch that I think should work. Can someone with a quadro card test it?

I have tested it. It is working with my FX3700M.

Sorry, in the middle of a crunch period I forgot to reply. It's working for our test machine, thanks Benoit!

Angus Hollands (agoose77) changed the task status from Unknown Status to Resolved.Apr 7 2015, 2:26 PM
Angus Hollands (agoose77) claimed this task.
This comment was removed by Angus Hollands (agoose77).
Angus Hollands (agoose77) changed the task status from Resolved to Unknown Status.Apr 7 2015, 6:38 PM

The patch seems good from my end, and HG1, can this be comitted?

Seeing as this patch came from Benoit, who is the module owner of VideoTexture, and two people have confirmed that it fixes the issue, I think this patch can be committed.