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

Refactor RenderConfig interface #1561

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

Conversation

ShirleyNekoDev
Copy link
Member

  • renames methods to be more precise
  • move render options from ChunkyOptions into separate interface/class
    (long term goal is to reduce the amount of context which is pushed around for rendering with the RenderManager/RenderContext)
  • add customization factories for Rays and WorkerState in TileBasedRenderer (for plugins)

Maximilian Stiede added 2 commits March 6, 2023 05:16
…g term goal is to reduce the amount of context which is pushed around for rendering with the RenderManager/RenderContext)

TODO later: split SceneIOProvider from RenderContext
Copy link
Member

@NotStirred NotStirred left a comment

Choose a reason for hiding this comment

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

I like the idea in general, just a few comments: (github removed my comments for some reason)

Comment on lines +328 to +330
protected void startRender(Renderer renderer) throws InterruptedException {
renderer.render(this);
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this for plugins?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe I added this to be overridable by custom RenderManagers to add pre-start logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

e.g. setting data in the new worker state / ray factories

@@ -0,0 +1,40 @@
package se.llbit.chunky.renderer;

public class ModifiableRenderOptions implements RenderOptions {
Copy link
Member

Choose a reason for hiding this comment

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

See above. Can we improve this so that modifying the render options is safe and gets applied after the user confirms (or reset otherwise)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Pretty sure that this would be the job of the UI logic or something in the render code which copies its state from this object. At the moment, the user can only set the tile size and spp per pass via CMD argument, right? And render thread count had some special handling somewhere which already required restarting the rendering or Chunky (?). Definitively a useful suggestion for a follow-up issue + PR :)

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.

3 participants