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

Potential fix for clipping with parallel projection and transparent sky. #1508

Merged
merged 1 commit into from
Dec 3, 2022

Conversation

ThatRedox
Copy link
Member

Apply the parallel projection clipping fix to computeAlpha.
Fixes #1507 . Needs testing.

…mputeAlpha`. Add ray fix logic to `computeAlpha`.
@leMaik leMaik added this to the 2.4.5 milestone Dec 1, 2022
@leMaik leMaik added the backport-me A PR that is to be backported to the latest stable Chunky version. label Dec 1, 2022
@leMaik
Copy link
Member

leMaik commented Dec 1, 2022

I don't have the original scene that causes this bug. However, here is a scene that does clip in Chunky 2.3.0. It doesn't clip in 2.4.4 and it doesn't have this issue in 2.4.4.
clip.zip

@ThatRedox
Copy link
Member Author

ThatRedox commented Dec 2, 2022

Thanks a lot! I was able to reproduce the clipping on 2.3.0 and was able to reproduce transparent sky clipping:
2.4.3 & master preview:
preview

2.3.0
clip-100
2.4.3
clip-100_2 4 3
master
clip-100_master

And the PR seems to fix this successfully:
clip-100_pr

Using camera 2:

{"camera":{"name":"camera 2","position":{"x":-300.778737752961,"y":-600.0,"z":-133.54153669576866},"orientation":{"roll":0.0,"pitch":-0.8237799582905735,"yaw":-0.7689488227289661},"projectionMode":"PARALLEL","fov":50.0,"dof":"Infinity","focalOffset":2.0,"shift":{"x":0.0,"y":0.0}},"cameraPresets":{"camera 1":{"name":"camera 1","position":{"x":-280.84383609719515,"y":-569.5120243228357,"z":-114.71654334937985},"orientation":{"roll":0.0,"pitch":-0.7853981633974483,"yaw":-0.7853981633974483},"projectionMode":"PARALLEL","fov":50.0,"dof":"Infinity","focalOffset":2.0,"shift":{"x":0.0,"y":0.0}}}}

@ThatRedox ThatRedox marked this pull request as ready for review December 2, 2022 06:39
Copy link
Member

@leMaik leMaik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad you were finally able to reproduce this bug. I like the refactorings. :)

@leMaik leMaik merged commit 94622f8 into chunky-dev:master Dec 3, 2022
@leMaik leMaik removed the backport-me A PR that is to be backported to the latest stable Chunky version. label Dec 3, 2022
NotStirred pushed a commit to NotStirred/chunky that referenced this pull request Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential camera clipping with parallel projection and transparent sky.
2 participants