ImageMirror doesn't work in BlenderPlayer with quadbuffered #43537

Closed
opened 2015-02-02 22:47:06 +01:00 by Angus Hollands · 21 comments

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

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
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AngusHollands-4

Added subscriber: @AngusHollands-4
Author

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 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.

Added subscribers: @BenoitBolsee, @dfelinto

Added subscribers: @BenoitBolsee, @dfelinto

@BenoitBolsee any clues on that?

@BenoitBolsee any clues on that?
Member

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.

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.
Author

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

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
Member

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.

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.
Member

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

Here is a patch that I think should work. Can someone with a quadro card test it? [quadbuffer.patch](https://archive.blender.org/developer/F142174/quadbuffer.patch)
Member

Added subscriber: @hg1

Added subscriber: @hg1
Member

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

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

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

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

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Angus Hollands self-assigned this 2015-04-07 14:26:27 +02:00
Author

This comment was removed by @AngusHollands-4

*This comment was removed by @AngusHollands-4*
Author

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author

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

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

Added subscriber: @Moguri

Added subscriber: @Moguri

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.

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.

This issue was referenced by b329016b29

This issue was referenced by b329016b29c3189e23bafebbe984008dae0d60a2
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

Closed by commit b329016b29.

Closed by commit b329016b29.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43537
No description provided.