Videotexture does not use sky color for off-screen rendering #43822

Closed
opened 2015-02-26 20:46:06 +01:00 by Mike Pan · 16 comments

System Information
Tested on OS X 10.9 as well as Windows 7

Blender Version
Broken: 2.73 Current Master
Worked: Never?

videoTextureSkyBug.png

Short description of error
The videotexture render-to-texture function defaults to (0,0,1) for the sky color, regardless of what it is set in the world settings. It should use the World Sky color.

Exact steps for others to reproduce the error
See sample file attached. vidTextureBug.blend

**System Information** Tested on OS X 10.9 as well as Windows 7 **Blender Version** Broken: 2.73 Current Master Worked: Never? ![videoTextureSkyBug.png](https://archive.blender.org/developer/F146019/videoTextureSkyBug.png) **Short description of error** The videotexture render-to-texture function defaults to (0,0,1) for the sky color, regardless of what it is set in the world settings. It should use the World Sky color. **Exact steps for others to reproduce the error** See sample file attached. [vidTextureBug.blend](https://archive.blender.org/developer/F146021/vidTextureBug.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @MikePan

Added subscriber: @MikePan
Author

Ah sorry, meant to put this under 'Game Engine', but somehow missed it.

Ah sorry, meant to put this under 'Game Engine', but somehow missed it.
Member

Added subscriber: @hg1

Added subscriber: @hg1
Member

Actually that is no bug. This is more a wanted feature.

You can set the background color with Python (mirror.source.background = [64, 50, 37, 255])
To calcualte the same color, switch the colorwheel to Hex and 40 32 25 and calculate to decimal values.

Actually that is no bug. This is more a wanted feature. You can set the background color with Python (mirror.source.background = [64, 50, 37, 255]) To calcualte the same color, switch the colorwheel to Hex and 40 32 25 and calculate to decimal values.
Author

I see. Although I would expect the default behaviour to take the color from the sky. Python can used to override when needed. The current behaviour seems unintuitive.

I see. Although I would expect the default behaviour to take the color from the sky. Python can used to override when needed. The current behaviour seems unintuitive.
Member

Added subscriber: @JorgeBernalMartinez

Added subscriber: @JorgeBernalMartinez
Member

The patch seems easy (#43822.patch) but it has another issue related:
As we use getBackColorRed/Green/Blue as we use getAmbientColorRed/Green/Blue, we always get the ambient color. HG1, is this issue fixed with yours differential patches ( I refer to D148 an on)?

The patch seems easy ([#43822.patch](https://archive.blender.org/developer/F146219/T43822.patch)) but it has another issue related: As we use getBackColorRed/Green/Blue as we use getAmbientColorRed/Green/Blue, we always get the ambient color. HG1, is this issue fixed with yours differential patches ( I refer to [D148](https://archive.blender.org/developer/D148) an on)?
Member

I suggest to add this feature after my mist patches are in the trunk (after Blender 2.74 release), because one of my patches D158 will remove the getBackColorRed() methods.
After the mist patches we can add a getBackColo() which returns m_backgroundcolor and initialize the background color for the video texture module.

I suggest to add this feature after my mist patches are in the trunk (after Blender 2.74 release), because one of my patches [D158](https://archive.blender.org/developer/D158) will remove the getBackColorRed() methods. After the mist patches we can add a getBackColo() which returns m_backgroundcolor and initialize the background color for the video texture module.
Member

Ok.

Ok.
Jorge Bernal self-assigned this 2015-03-09 10:51:24 +01:00
Member

Analysing the code I saw that if we force the mirror background color to the world background color we could have issues when the mirror is located into a structure (i.e. a room) as we will apply an outside color to one object that is inside of a structure which can't see or receive colors from outside.

Then, I propose you the following solution:

  • Leave the default mirror background color as it is.
  • Use the new World API, commited yesterday by HG1, and to add these lines to the script:
mirror.source.background[0] = scene.world.background_color[0]
mirror.source.background[1] = scene.world.background_color[1]
mirror.source.background[2] = scene.world.background_color[2]

is it a valid/acceptable proposal?

Analysing the code I saw that if we force the mirror background color to the world background color we could have issues when the mirror is located into a structure (i.e. a room) as we will apply an outside color to one object that is inside of a structure which can't see or receive colors from outside. Then, I propose you the following solution: - Leave the default mirror background color as it is. - Use the new World API, commited yesterday by HG1, and to add these lines to the script: ``` mirror.source.background[0] = scene.world.background_color[0] mirror.source.background[1] = scene.world.background_color[1] mirror.source.background[2] = scene.world.background_color[2] ``` is it a valid/acceptable proposal?
Member

Mike, is it ok for you the solution?

Mike, is it ok for you the solution?
Author

I appreciate the work you've put into this.

But I am afraid I don't understand the issue you described. If the mirror is in an enclosed room, wouldn't it render and reflect the room instead of the sky color? While it's relatively trivial to setup a script to use the world color, wouldn't a sensible default be the skycolor in the first place? The Api can be used to override the color if desired.

I appreciate the work you've put into this. But I am afraid I don't understand the issue you described. If the mirror is in an enclosed room, wouldn't it render and reflect the room instead of the sky color? While it's relatively trivial to setup a script to use the world color, wouldn't a sensible default be the skycolor in the first place? The Api can be used to override the color if desired.

This issue was referenced by dc95ca92ca

This issue was referenced by dc95ca92ca224d26423c5d63b33e7714a6a8c9ce
Member

Changed status from 'Open' to: 'Resolved'

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

Closed by commit dc95ca92ca.

Closed by commit dc95ca92ca.
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
4 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#43822
No description provided.