Fisheye lens results in Window projected textures being mirrored across X-axis #60542

Closed
opened 2019-01-15 21:04:57 +01:00 by M · 12 comments

System Information
Operating system: Linux x64
Graphics card: GTX 860m

Blender Version
Broken:
Any of the 2.80 daily builds I tried since several months ago.

Short description of error
Using Cycles with a fisheye lens camera, both Equisolid and Equidistant, and some texture with Window projection from the Texture Coordinate node flips the X-axis of the texture.
None of the other lens and projection types behaved like this as far as I saw.

Here's a render with perspective (top) and fisheye (bottom) illustrating the problem.
perspective vs fisheye equisolid.png

And here's a small .blend file. Set the view to Rendered and the camera lens to Panoramic.
fisheye bug.blend

**System Information** Operating system: Linux x64 Graphics card: GTX 860m **Blender Version** Broken: Any of the 2.80 daily builds I tried since several months ago. **Short description of error** Using Cycles with a fisheye lens camera, both Equisolid and Equidistant, and some texture with Window projection from the Texture Coordinate node flips the X-axis of the texture. None of the other lens and projection types behaved like this as far as I saw. Here's a render with perspective (top) and fisheye (bottom) illustrating the problem. ![perspective vs fisheye equisolid.png](https://archive.blender.org/developer/F6297999/perspective_vs_fisheye_equisolid.png) And here's a small .blend file. Set the view to Rendered and the camera lens to Panoramic. [fisheye bug.blend](https://archive.blender.org/developer/F6298295/fisheye_bug.blend)
Author

Added subscriber: @Snudl

Added subscriber: @Snudl
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

In a debug an assert fails.

With asserts I can reproduce the bug. I never used these different camera types, so I'm not sure what to expect.

In a debug an assert fails. With asserts I can reproduce the bug. I never used these different camera types, so I'm not sure what to expect.

Added subscriber: @tstullich

Added subscriber: @tstullich

Hello, could you post the output of the assertion that fails? This would be helpful in trying to find the source of the problem

Hello, could you post the output of the assertion that fails? This would be helpful in trying to find the source of the problem

Added subscriber: @brecht

Added subscriber: @brecht

The assert is most likely unrelated to the bug, just some NaN.

The bug here would be in camera_world_to_ndc, or the data that goes into it.

The assert is most likely unrelated to the bug, just some NaN. The bug here would be in `camera_world_to_ndc`, or the data that goes into it.
Tim Stullich self-assigned this 2019-05-29 12:41:38 +02:00

Ok, I will take a look around and try to find the source of the bug

Ok, I will take a look around and try to find the source of the bug

I was able to trace down some things to direction_to_fisheye_equisolid but I am unsure of how that function was implemented. @brecht is there some documentation on how the equisolid fisheye lense was implemented?

I was able to trace down some things to `direction_to_fisheye_equisolid` but I am unsure of how that function was implemented. @brecht is there some documentation on how the equisolid fisheye lense was implemented?

There's no documentation for it that I know of. There's two functions here, which should do the inverse of the other. So unless the input to the functions is somehow wrong, it's a purely mathematical thing where the formulas are just not matching.

There's no documentation for it that I know of. There's two functions here, which should do the inverse of the other. So unless the input to the functions is somehow wrong, it's a purely mathematical thing where the formulas are just not matching.

I tried verifying if the inputs are correct for the camera_world_to_ndc function and I am not sure they are quite correct. One thing I tried doing was changing the variables P and the kernel_data.cam.worldtocamera matrix such that the output moves into the correct position, but I did not get very far with that.

There's two functions here, which should do the inverse of the other

Could you please elaborate on that statement? Which two functions perform the inverse of each other? I will try verifying if they perform how they are supposed to once I know more about them.

I tried verifying if the inputs are correct for the `camera_world_to_ndc` function and I am not sure they are quite correct. One thing I tried doing was changing the variables `P` and the `kernel_data.cam.worldtocamera` matrix such that the output moves into the correct position, but I did not get very far with that. > There's two functions here, which should do the inverse of the other Could you please elaborate on that statement? Which two functions perform the inverse of each other? I will try verifying if they perform how they are supposed to once I know more about them.
Tim Stullich was unassigned by Dalai Felinto 2019-12-23 16:35:22 +01:00
Philipp Oeser removed the
Interest
Render & Cycles
label 2023-02-09 13:57:50 +01:00
Author

I was unaware this old bug report carried over to the new tracker. The issue appears fixed with all available panorama lens types in a 4.3 daily build, presumably has been resolved for years as part of the massive Cycles overhaul, so I think I can close this. Maybe someone with permissions can confirm and give it a proper resolved or other label.

I was unaware this old bug report carried over to the new tracker. The issue appears fixed with all available panorama lens types in a 4.3 daily build, presumably has been resolved for years as part of the massive Cycles overhaul, so I think I can close this. Maybe someone with permissions can confirm and give it a proper resolved or other label.
M closed this issue 2024-09-05 04:53:26 +02:00
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-09-05 04:53:28 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#60542
No description provided.