[Feature] Integrate CompositionProToolkit Rendering Surfaces #4652
Replies: 10 comments
-
Hello, 'ratishphilip! Thanks for submitting a new feature request. I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
Beta Was this translation helpful? Give feedback.
-
Thanks @ratishphilip could you provide a bit more detail on where this would live in the toolkit and what developers will be able to do with this platform? I'm assuming it's about creating more complex effects, but it'd be good to know what that looks like in terms of other technologies this applies to. @Sergio0694 I think you understand this space more than I do. These could also be integrated with the Pipeline brushes, right? |
Beta Was this translation helpful? Give feedback.
-
@michael-hawker I have updated the details. Kindly let me know if that would suffice. |
Beta Was this translation helpful? Give feedback.
-
@Sergio0694 It would be awesome if it is integrated with Pipeline Brushes. |
Beta Was this translation helpful? Give feedback.
-
@Sergio0694 thoughts on this feature? |
Beta Was this translation helpful? Give feedback.
-
Oh, wow, how did I miss these notifications? 🤦 @ratishphilip These surface APIs look super cool, and I think it would definitely make sense to have them in the Toolkit as well, especially considering you've already ported the Win2D mini path language and other geometry APIs already in #3430. Have you thought about what kind of integration with the pipeline APIs you'd like to add? Would that be a second step once this feature is merged, or were you planning to alter the API surface from the start for better integration? And if so, how? Just curious to know more details in case you've already done a preliminary investigation of the possible changes related to this 🙂 |
Beta Was this translation helpful? Give feedback.
-
Yeah, since we have revamped the animations as well to work with the Effects library, it'd be cool if we could extend or build on top of all these bits so they all play nice together. Am I correct that these interfaces get used and tied into the composition APIs in your existing library here via extensions? Seems a little similar to the methods Sergio's exposed on the PipelineBuilder API set, so maybe we just bring those over as new capabilities, and then add new effects to expose to XAML and animations? |
Beta Was this translation helpful? Give feedback.
-
Thanks @Sergio0694. I have completed the porting the rendering surfaces from CompositionProToolkit to Windows Community Toolkit. However, I felt it might still be a little complicated for the users to define every thing in code. |
Beta Was this translation helpful? Give feedback.
-
That sounds great to me, and I'm really curious to see the changes in the PR and the documentation! 🙂
There's absolutely nothing to be sorry for! You're doing these contributions on your own initiative and to help the community, and we appreciate your time working on this! You don't have to justify yourself if life keeps you busy outside of this project! 😄 |
Beta Was this translation helpful? Give feedback.
-
Hi @Sergio0694 @michael-hawker , Still working on the documentation. Will update PR once done. |
Beta Was this translation helpful? Give feedback.
-
Describe the problem this feature would solve
CompositionProToolkit library provides five types of rendering surface interfaces.
IRenderSurface
- This interface acts as the base interface for interfaces which render to theICompositionSurface
. It mainly contains references to anICompositionGenerator
object and anICompositionSurface
object which are the core objects required for rendering any geometry or image onto aICompositionSurface
.IMaskSurface
- This interface is used for rendering custom shaped geometries ontoICompositionSurface
so that they can be useds as masks on Composition Visuals.IGaussianMaskSurface
- This interface derives fromIMaskSurface
and is used for rendering custom shaped geometries ontoICompositionSurface
so that they can be useds as masks on Composition Visuals. You can apply a Gaussian Blur to the mask.IGeometrySurface
- This interface is used for rendering custom shaped geometries ontoICompositionSurface
.IImageSurface
- This interface is used for rendering images ontoICompositionSurface
.IImageMaskSurface
- This interface is used for creating a mask using the alpha values of the image pixels.Here is the interface hierarchy
These surfaces can then be used to create brushes which can be used for rendering custom shapes and images.
These surfaces can also be used for creating masks from geometric shapes or images.
Using Win2d, these surfaces can be updated at 60fps to create an animation.
This can also be used to create custom shaped backdrop brush too.
Describe the solution
I would like to port the above to WindowsCommunityToolkit. This would exist in the
Microsoft.Toolkit.Uwp.UI.Media
project under theMicrosoft.Toolkit.Uwp.UI.Media.Surface
namespace.In addition to the render surfaces, there would be Brushes (deriving from
XamlCompositionBrushBase
) corresponding to each of the rendering surfaces, so that it would be easy to use them directly in XAML.Beta Was this translation helpful? Give feedback.
All reactions