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

Light paths overlay #2748

Open
wants to merge 34 commits into
base: master
Choose a base branch
from

Conversation

oktomus
Copy link
Member

@oktomus oktomus commented Dec 20, 2019

I rebased the code from @termhn and I will fix some issues before merging it. This PR brings the following:

  • Fixes some ways to get into invalid states by going into and out of light path display toggle/base layer modes and restarting rendering
  • No longer does a light path picking event when moving the camera in OpenGL view
  • No longer does a light path picking event at all when in OpenGL view until I implement better filtering modes/scene space picking
  • Dims the final render when you have at least one light path selected

To be implemented in this PR:

  • Selected individual light paths are not drawn solo but rather the rest of the picked light paths have lower transparency.

=======

https://www.grayolson.me/blog/posts/gsoc-2019/

@oktomus oktomus mentioned this pull request Dec 20, 2019
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch 4 times, most recently from 0d6eeb2 to dcafcd6 Compare December 20, 2019 17:04
@oktomus oktomus changed the title Unified Viewport & Light path filtering Unified Viewport Dec 21, 2019
@dictoon
Copy link
Member

dictoon commented Dec 22, 2019

Clean-ups:

  • Only the beauty tab needs to be darken when rendering starts

Bugs:

  • Crash when enabling light paths with a small render region
  • Set render region button does not work
  • File new crashes in LightPathRecorder::get_light_path_count
  • New trigger assert in LightPathLayer
  • Light path toolbar appear as a window when recreate_handlers is triggered
  • Opengl error messages are showing up at runtime
  • Make light paths thinner and keep thickness constant.
  • Assert when clicking on "Next light path".
  • Cannot select light paths in OpenGL visualization mode -> We don't need to support this use case for now.
  • Move OpenGL visualization mode to separate tab (like the current "RGB" tab) and get rid of "Scene Display Mode" combo.
  • What does Alt+LMB do? Can we disable it? -> Nothing
  • Shift+LMB shouldn't select light paths.
  • RMB shouldn't select light paths. -> The light paths picker is directly linked to the scene picker. It must not as these are 2 different things that should act differently. The light path picker must be independent and handle mouse inputs by itself.
  • We need a way to clear light paths selection (Escape?).
  • Clicking to select an area selects and shows light paths on the first click (instead of when the area has been defined).
  • Save Light Paths button's tooltip should show the total number of available light paths, not the number of selected light paths.
  • Backface culling in OpenGL view no longer works.
  • Paths disappear when enabling backface culling
  • Backface culling button should only be present in the OpenGL tab.
  • If a render is aborted, are the old light paths properly discarded? It seems that we are still able to visualize the old light paths, in particular in tiles that weren't even rendered.
  • Are we always 100% precise when clicking on a pixel?
  • "Display Light Paths Overlay" gets disabled whenever a new render is triggered.
  • Light paths-related messages are displayed in the log even when light paths recording is disabled.
  • Clear Frame should also discard light paths.
  • In OpenGL view, some light paths are shown through surfaces (see screenshot [1] below).
  • In OpenGL view, when moving in front of the camera, light paths are no longer displayed correctly, they seem to go in the wrong direction (see screenshot [2] below).
  • When visualizing a particular light path, other light paths should be either dimmed a lot more, or desaturated, or both: this requires experimentation (see screenshot [3] below).
  • Regression: the Left and Right arrow keys should allow to visualize the previous/next light path, this no longer works.
  • The "Display Transform" combo no longer updates the render widget.
  • Toggling "Display Light Paths Overlay" off then on again should show again the light paths, right now they're lost whenever this is toggled.
  • The Z-buffer from the OpenGL view is used, but if the OpenGL view is modified, then depth tests in the render no longer make sense (see screenshots [4] and [5] below).

Ignored tasks :

Improvements for separate PRs:

  • Allow the user to choose the number of light paths to show.
  • Save light paths asynchronously to avoid blocking the UI.
  • Use transparency to convey light paths intensity.
  • Change "Display Light Paths Overlay" to icon.
  • Can the light paths antialiasing be nicer?
  • Zooming too much in the render (with the mouse wheel) leads to black screen

[1]

image

[2]

path_bug

[3]

image

[4]

image

[5]

image

@oktomus oktomus added PR | Squash This PR must be squashed when merged. PR | Rebase This PR must be rebased when merged. and removed PR | Rebase This PR must be rebased when merged. labels Dec 22, 2019
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch 2 times, most recently from ca23cae to f6f277b Compare January 18, 2020 12:41
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch from 8b6efa1 to e50630c Compare January 27, 2020 19:34
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch 3 times, most recently from 6a0e6ae to 1a71bd3 Compare February 14, 2020 20:36
@dictoon dictoon added this to In Progress in Live Roadmap Feb 22, 2020
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch from 7d2fbab to 687d115 Compare February 23, 2020 16:01
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch from 687d115 to d831386 Compare March 6, 2020 20:40
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch 5 times, most recently from cbdae0d to 5e10f12 Compare March 19, 2020 21:35
@oktomus oktomus changed the title Unified Viewport Light paths overlay Mar 20, 2020
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch 2 times, most recently from e06d854 to 4903bef Compare March 22, 2020 10:12
Co-authored-by: Kevin Masson <hi@oktomus.com>
@oktomus oktomus force-pushed the feature/new-viewport-with-LP-filtering branch from 2bbfa9c to dde46f2 Compare March 27, 2020 20:12
@oktomus oktomus removed the WIP ⚠ label Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR | Squash This PR must be squashed when merged.
Projects
Live Roadmap
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants