Camera tweaks issue with Lentil

127 views
Skip to first unread message

Brian Hanke

unread,
Aug 4, 2023, 8:55:18 AM8/4/23
to gaffer-dev
Looks like we're pretty much good to go with Lentil in general, I just need to make a better parameter UI. 

One thing I can't figure out though is what's going on with the focal_length_lentil parameter.

1. Camera Tweaks off, showing 50mm and 36x24mm correctly.
2. Camera tweaks on, 900 required to display correctly in Arnold, but looks like this in OpenGL.
3. 50 in Arnold, which is logically what the parameter should be set to.
4. 900 in Arnold.

Any idea what might be going on here? Thanks!

stuff.jpg

John Haddon

unread,
Aug 4, 2023, 9:19:22 AM8/4/23
to gaffe...@googlegroups.com
Hmm, that is weird. I'm afraid I don't have any bright ideas, but if I were you I'd be tempted to write a working `.ass` file from Maya/Houdini and compare it with one from Gaffer, to see if any differences leap out.
Cheers...
John

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/d9cbcf71-6c2c-46c5-8c41-08bd39cb6084n%40googlegroups.com.

Brian Hanke

unread,
Aug 10, 2023, 9:31:19 AM8/10/23
to gaffer-dev
This issue was causing major headaches as I get closer to finalizing all this. I followed your advice and created a simple scene in Maya, exported to .ass, ported the same scene to Gaffer and exported an .ass there. I started deleting lines in the Gaffer one until I found the problem, under "lentil_camera": 

screen_window_min -18 -18
screen_window_max 18 18

Removing those gives a perfect match with Maya. Where are those parameters coming from? They're not in my CameraTweaks and I don't see anything with those names in the original Gaffer camera node.

John Haddon

unread,
Aug 10, 2023, 9:40:00 AM8/10/23
to gaffe...@googlegroups.com
That's calculated by our Arnold translation code here :


I wonder if the problem is that we're not doing the normalisation step because the Lentil setup specifies a different projection? Would you be able to do an export with a perspective projection and copy the screen window from that into your lentil-enabled `.ass` file? If that works, then we can figure out how to get Gaffer to do what you need...

Cheers...
John


Brian Hanke

unread,
Aug 10, 2023, 9:48:22 AM8/10/23
to gaffer-dev
Yes, those values from the perspective cam work perfectly:

screen_window_min -1 -0.99999994
screen_window_max 1 0.99999994

John Haddon

unread,
Aug 10, 2023, 9:57:12 AM8/10/23
to gaffe...@googlegroups.com
OK, cool. I'll chat to Daniel about it in our developer meeting today, since he knows the camera side of things better than me. We should be able to sort something out I think...
Cheers...
John

Brian Hanke

unread,
Aug 10, 2023, 9:59:59 AM8/10/23
to gaffer-dev
Great, you guys rock! Really appreciate all the assistance.

John Haddon

unread,
Aug 10, 2023, 1:10:49 PM8/10/23
to gaffe...@googlegroups.com
Hey Brian, I think we're going to just make a cheap and cheerful fix where we hardcode our translator to treat the Lentil camera the same as the perspective one. Can I just check that the way we should identify this is that the `projection` parameter will be set to `lentil_camera`?
Cheers...
John

Brian Hanke

unread,
Aug 10, 2023, 2:08:48 PM8/10/23
to gaffer-dev
Sounds good to me! Yes, projection = lentil_camera. I finished up the node UI earlier today, so I think everything is ready now. Is there a temporary override I should put in for the screen_window thing? It pretty much won't work without it. But I'm not going to be releasing this until Sept 1st anyway.

John Haddon

unread,
Aug 11, 2023, 5:11:28 AM8/11/23
to gaffe...@googlegroups.com
OK, I've tried applying that fix in https://github.com/GafferHQ/gaffer/pull/5422. Once CI has finished, you should be able to download a build to test with from the Artifacts section on https://github.com/GafferHQ/gaffer/actions/runs/5830876066. If you can confirm that it works for you, then we can get it into a release pronto.
Cheers...
John

Brian Hanke

unread,
Aug 11, 2023, 8:53:50 AM8/11/23
to gaffer-dev
Works perfectly! It always choked on the first few buckets before and I would have to kill it in task manager. Excellent performance too, Lentil isn't exactly speedy and this finished in record time!

perfect.png

John Haddon

unread,
Aug 11, 2023, 9:28:06 AM8/11/23
to gaffe...@googlegroups.com
Good news! Thank for letting us know - I'll get back to you when the fix makes it into an official release...
Cheers...
John

John Haddon

unread,
Aug 30, 2023, 7:13:30 AM8/30/23
to gaffer-dev
Just a quick note to say that we released the fix for Lentil today in versions 1.2.10.2 and 1.3.2.0...
Cheers...
John

Brian Hanke

unread,
Aug 30, 2023, 8:31:28 AM8/30/23
to gaffer-dev
That's great, thanks so much John!
Reply all
Reply to author
Forward
0 new messages