Camera mapping wrong #43346

Closed
opened 2015-01-21 20:56:21 +01:00 by Anna Celarek · 15 comments

System Information
Windows 7, Nvidia gtx 550Ti
Ubuntu

Blender Version
Broken: 83cbcef
6b655ca
2.73a official

Short description of error
World texture with camera mapping is mapped spherically (?) and in the wrong place

Exact steps for others to reproduce the error
Put a texture with camera mapping as world background texture, or see the attached file. Render (F12) or turn on viewport render.

  1. observe how the image bends on the camera edges, as if it was slightly spherical
  2. observe how the image corner is in the camera middle.
    The expected behavior is that the image would map exactly onto the camera view (so the image edges would align with the edges of the camera view, and the left top corner of the image would be in the left top corner of the camera).
    The shift is the minor problem, the user can solve it with a mapping node, but I found no workaround for the bending.
**System Information** Windows 7, Nvidia gtx 550Ti Ubuntu **Blender Version** Broken: 83cbcef 6b655ca 2.73a official **Short description of error** World texture with camera mapping is mapped spherically (?) and in the wrong place **Exact steps for others to reproduce the error** Put a texture with camera mapping as world background texture, or see the attached file. Render (F12) or turn on viewport render. 1. observe how the image bends on the camera edges, as if it was slightly spherical 2. observe how the image corner is in the camera middle. The expected behavior is that the image would map exactly onto the camera view (so the image edges would align with the edges of the camera view, and the left top corner of the image would be in the left top corner of the camera). The shift is the minor problem, the user can solve it with a mapping node, but I found no workaround for the bending.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @AnnaCelarek

Added subscriber: @AnnaCelarek
Author
![background_screenshot.jpg](https://archive.blender.org/developer/F138627/background_screenshot.jpg) [background_test.blend](https://archive.blender.org/developer/F138629/background_test.blend)
Sergey Sharybin was assigned by Bastien Montagne 2015-01-22 14:21:30 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

I'm not sure why you consider this a bug, it's just how mapping happens to camera space (FOV affects on non-linearity of the mapping, center is on viewplane center). Maybe i'm wrong here and @brecht originally wanted some different behavior in here.

To map texture flat and make it's filling the whole viewplane you need to use window mapping. The only issue with that is that viewport render wouldn't be correct, only final render will have proper window. That i think we need to address at some point, even though it's not totally trivial to do in case of non-camera view in viewport.

I'm not sure why you consider this a bug, it's just how mapping happens to camera space (FOV affects on non-linearity of the mapping, center is on viewplane center). Maybe i'm wrong here and @brecht originally wanted some different behavior in here. To map texture flat and make it's filling the whole viewplane you need to use window mapping. The only issue with that is that viewport render wouldn't be correct, only final render will have proper window. That i think we need to address at some point, even though it's not totally trivial to do in case of non-camera view in viewport.

This is indeed what the "Window" output is for:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Texture_Coordinates

The "Camera" output is the position in camera space. The terminology may be confusing here, it's consistent with that you would find in e.g. Renderman or OSL, but I guess "camera space" is not a very useful concept for users.

This is indeed what the "Window" output is for: http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Texture_Coordinates The "Camera" output is the position in camera space. The terminology may be confusing here, it's consistent with that you would find in e.g. Renderman or OSL, but I guess "camera space" is not a very useful concept for users.
Author

That's exactly my problem with using window coordinates, it's not linked to the camera when I zoom.
If you could make the window mapping match the camera frame in camera view (instead of viewport border), I would be totally happy (I'm working on an animation with lots of backgrounds where I need this kind of mapping).
In the case of non-camera view, it's fine and logical as it is now.

To map texture flat and make it's filling the whole viewplane you need to use window mapping. The only issue with that is that viewport render wouldn't be correct, only final render will have proper window. That i think we need to address at some point, even though it's not totally trivial to do in case of non-camera view in viewport.

That's exactly my problem with using window coordinates, it's not linked to the camera when I zoom. If you could make the window mapping match the camera frame in camera view (instead of viewport border), I would be totally happy (I'm working on an animation with lots of backgrounds where I need this kind of mapping). In the case of non-camera view, it's fine and logical as it is now. > To map texture flat and make it's filling the whole viewplane you need to use window mapping. The only issue with that is that viewport render wouldn't be correct, only final render will have proper window. That i think we need to address at some point, even though it's not totally trivial to do in case of non-camera view in viewport.

@AnnaCelarek, i think making it so camera view in viewport uses proper window mapping is what we really need to make working and will look into it.

@AnnaCelarek, i think making it so camera view in viewport uses proper window mapping is what we really need to make working and will look into it.

This issue was referenced by 3b50d3a04f

This issue was referenced by 3b50d3a04f2c3b7202b935652a81a8888b47c84a

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 3b50d3a04f.

Closed by commit 3b50d3a04f.

This issue was referenced by blender/cycles@aee5ac214f

This issue was referenced by blender/cycles@aee5ac214f1852321ff69d0c6136f0cfd71a0c79
Author

Thanks, render view works perfectly now :)

It's still inconsistent though for other views (Solid, Wire, Textured, Material) with N > Display > World Background on (there it maps with the "old" Window method).
But no big issue, since the background can be loaded through the Background Image rollout instead.

Thanks, render view works perfectly now :) It's still inconsistent though for other views (Solid, Wire, Textured, Material) with N > Display > World Background on (there it maps with the "old" Window method). But no big issue, since the background can be loaded through the Background Image rollout instead.

Added subscriber: @Psy-Fi

Added subscriber: @Psy-Fi

Yes, think GLSL needs some tweaks (which might be not so tricial?). @Psy-Fi can know better, will talk to him in irc.

Yes, think GLSL needs some tweaks (which might be not so tricial?). @Psy-Fi can know better, will talk to him in irc.
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#43346
No description provided.