Closed alyfreym closed 1 year ago
They seem to have a single distortion parameter called "fov", so it's not classical Brown Conrady distortion (k1 K2 etc) Take a look at what I called the "fov model" in Devernay & Faugeras 2001 "straight lines have to be straight". Maybe an Adobe engineer got it from this paper...
They seem to have a single distortion parameter called "fov", so it's not classical Brown Conrady distortion (k1 K2 etc) Take a look at what I called the "fov model" in Devernay & Faugeras 2001 "straight lines have to be straight". Maybe an Adobe engineer got it from this paper...
Thanks, I will try FOV model distortion.
They seem to have a single distortion parameter called "fov", so it's not classical Brown Conrady distortion (k1 K2 etc) Take a look at what I called the "fov model" in Devernay & Faugeras 2001 "straight lines have to be straight". Maybe an Adobe engineer got it from this paper...
Hi, I changed my algorithm. Looks like this method doesn't apply scale like in After Effects. My example. FOV = 120
`func transform(uv: simd_float2) -> simd_float2 { // Devernay-Faugeras FOV let FOV: Float = Float(fov.radians);
let direction = (uv - u_center)
let ru = simd_length(direction) // undistored radius.
let rd = 1.0 / FOV * atan(2.0 * ru * tan(FOV / 2.0))
let theta = atan2(direction.y, direction.x);
let x = cos(theta) // Convert to Cartesian
let y = sin(theta) // Convert to Cartesian
return u_center + simd_float2(x, y) * rd
}`
My Result
After Effects with the same FOV
Formula
Aka FOV Model.
Looks like when the value (FOV) increases, scaling is applied Maybe I need orthographic projection with FOV and apply in to my distortion method? Changing camera focus plane relative FOV.
Not possible.
Make sure to follow our issue report guidelines
Provide a description of your feature request
Hi guys. A lot of transition effects use this effect Called Optics Compensation from Adobe After effects. After many attempts to recreate this effect, nothing works for me. I did something similar but it is doesn't work similar My Code in OpenGL
attribute vec3 in_Position; // (x,y,z)
attribute vec4 in_Colour; // (r,g,b,a)
attribute vec2 in_TextureCoord; // (u,v)
varying vec2 v_vPosition; varying vec2 v_vTexcoord; varying vec4 v_vColour;
` void main() { gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * vec4(in_Position, 1.0);
}
########### FRAGMENT SHADER ############
varying vec2 v_vPosition; varying vec2 v_vTexcoord; varying vec4 v_vColour;
uniform vec2 u_resolution; uniform vec2 u_center; uniform float u_fov; uniform bool u_reverse; uniform float u_border_smoothness; uniform int u_fov_orientation;
uniform float u_test;
void main() { vec2 uv = v_vPosition / u_resolution;
}`
Below my example with FOV 120
In After effects you can choose FOV from 0 to 180 degrees. FOV Orientation (Horizontal, Vertical, Diagonal) Below animation with FOV from 0 to 180 And Orientation Horizontal.
https://github.com/NatronGitHub/Natron/assets/29518174/7468f554-7635-40f0-afb0-e3098b348703
Is this a realistically implementable feature?
Can you contribute in creating this feature?
Additional details
Any idea how to implement this effect? Thanks for advice
And im trying reverse engineering this effect but because after effects using CPU for all effect it is very strange to understand from assembler what algorithm using