Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE REQUEST: "undistort" #6

Open
marklio opened this issue Mar 4, 2024 · 3 comments
Open

FEATURE REQUEST: "undistort" #6

marklio opened this issue Mar 4, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@marklio
Copy link

marklio commented Mar 4, 2024

This tool rocks! I'm wondering how feasible it is for this to handle "undistorting" footage when reprojecting it.

As you are no doubt aware, when using "traditional" camera tracking/compositing, the blender compositor has a node to "undistort" the movie clip so that compositing the output from blender's non-distorted camera can work. It would be amazing if camera_projector could do the same thing. Otherwise, objects that span a large part of the screen, or are near the edge of distorted footage aren't stable through panning.

I've found this is particularly true of drone footage I work with, and it renders the "viewport as compositor" approach useless without undistorting the footage first.

@cessen
Copy link
Contributor

cessen commented Mar 5, 2024

That sounds feasible to me, yeah. I admit that I'm not thrilled at the idea of digging through Blender's source code to reverse-engineer a matching undistort formula. But at least in principle it shouldn't be too hard, as long as the formulas are analytic.

I assume this isn't strictly a blocker for you, since you can presumably pre-undistort the footage as mentioned?

@cessen cessen added the enhancement New feature or request label Mar 5, 2024
@cessen
Copy link
Contributor

cessen commented Mar 5, 2024

(This also reminds me that, ultimately, I'd like to make this a built-in node in Blender. It really ought to be one. And then it might(?) be easier to just reuse the existing undistort code. Of course, there's a lot more up-front work to take that route, and it would take time to get into a Blender release in any case.)

@marklio
Copy link
Author

marklio commented Mar 5, 2024

This is definitely not "blocking". Undistort also prevents the use of the built-in UV projection mechanism. A "viewport as compositor" workflow with distorted footage would be to motion track footage, then use blender's compositor with an undistort node to generate an "undistorted" image sequence. Then, that undistorted sequence would be the texture source you'd project onto geometry.

Just some other thoughts/observations... Undistort appears to be driven from the K* factors that are generated when motion tracking (or otherwise specified). This seems to be a separate "kind" of movie clip than the one you use in the shader editor (it doesn't show up in the dropdown in the shader editor, and you have to load it again), so those may not be connected in a useful way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants