Page MenuHome

Fisheye lens results in Window projected textures being mirrored across X-axis
Open, Confirmed, MediumPublic


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

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

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



Event Timeline

Jacques Lucke (JacquesLucke) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.Jan 16 2019, 12:16 PM

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.

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

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.

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 Van Lommel (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.

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