Skip to content

Conversation

hmaarrfk
Copy link
Contributor

This enables the blender to retain its state while it hasn't been completely cleared.

This is useful if users are trying to render a scene manually, object by object, streaming in the objects from disk or other source slowly.

One can recreate the same effect from the image_stitching.py example

Part of this comes from our desire to display truely huge images.

@hmaarrfk hmaarrfk requested a review from Korijn as a code owner July 24, 2025 23:34
@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch 4 times, most recently from 9919f2a to 2b28676 Compare July 25, 2025 12:42
@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch from 5cbdb41 to 9de8e76 Compare July 25, 2025 12:55
@hmaarrfk
Copy link
Contributor Author

I can see an argument that some might need to clear the weights between calls to renderer especially when they are using differerent cameras for an unrelated "scene".

But i figured this would simulate a workflow that we often have where we "stream" in the data from a larger source and can't keep all the image data in GPU memory at the same time.

@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch from 9de8e76 to 4e1de2b Compare July 26, 2025 00:45
@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch from 4e1de2b to a7d4c3b Compare August 21, 2025 00:37
@hmaarrfk
Copy link
Contributor Author

I think with my latest commit, the user has enough control in a fashion similar to other buffers to create complex effects with overlays.

On the left is without the additions to clear, the right is with
image
image

The parameter names can probably use some work, but it seems pretty cool now.

@hmaarrfk
Copy link
Contributor Author

The triangle draw using the new weighted pipeline to highlight the fact hat you can fully utilize the weighted blending properties for any "scene", not just the "first" one.

hmaarrfk added a commit to hmaarrfk/pygfx that referenced this pull request Aug 23, 2025
Small fixup found in the development of pygfx#1148
@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch 2 times, most recently from b90530b to 0262f62 Compare August 23, 2025 19:13
almarklein pushed a commit that referenced this pull request Aug 23, 2025
This enables the blender to retain its state while it hasn't been
completely cleared.

This is useful if users are trying to render a scene manually, object by
object, streaming in the objects from disk or other source slowly.

One can recreate the same effect from the image_stitching.py example
@hmaarrfk hmaarrfk force-pushed the streamed_image_stitching branch from 0262f62 to a60d200 Compare August 23, 2025 22:17
almarklein
almarklein previously approved these changes Aug 26, 2025
Copy link
Member

@almarklein almarklein left a comment

Choose a reason for hiding this comment

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

Thanks, nice work! With the clear() it fits in perfectly! Also great to have a validation example 🚀.

Korijn
Korijn previously approved these changes Aug 26, 2025
@almarklein almarklein enabled auto-merge (squash) August 26, 2025 10:20
auto-merge was automatically disabled August 26, 2025 11:29

Head branch was pushed to by a user without write access

@hmaarrfk
Copy link
Contributor Author

screenshot has been uploaded from CI.

Copy link
Collaborator

@Korijn Korijn left a comment

Choose a reason for hiding this comment

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

awesome example.

@Korijn Korijn merged commit eb35ba7 into pygfx:main Aug 26, 2025
14 of 25 checks passed
@hmaarrfk
Copy link
Contributor Author

awesome example.

thx thx.

@almarklein
Copy link
Member

screenshot has been uploaded from CI.

Probably not that important, but I'm a bit confused. The new validation example was not failing, but you uploaded a new image and it still works. Or is the new image only different in its metadata?

@hmaarrfk
Copy link
Contributor Author

Hmm. The last two commits were mine preceded by yours.

Yours shows red. Likely because of aa changes.

Then I just downloaded the screenshots and uploaded them.

@almarklein
Copy link
Member

Ah, now I see. My small tweaks were fine, but merging with main likely affected aa.

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