Discussion: Particles
Posted: 11 Mar 2014, 02:10
So, this isn't so much of a "tech support" question, as it is just trying to discuss different methods of accomplishing common results. In this instance, the issue is particles in the UI.
I'm mostly interested in the Unity case
Basically I've come up with the following solutions:
1) Bake the effect into a multi-frame texture and animate them
Pros: Can use existing tools (like After Effects) and can use as much detail in a single effect as you like
Cons: Requires more texture memory. Limited diversity (a lot of the benefits of particles thrown out the window). Large, alpha blended texture not great for performance.
2) Storyboard the effect (Particles are UIElements).
Pros: Resolution independent (potentially). Can view results in Blend.
Cons: Setting up storyboards is a very tedious process, even for simple effects. Low diversity (can apply multiple out-of-phase storyboards, though it would be even harder to set up). Not scalable (requires many UIElement).
Q: WPF would not, but could we potentially tweak blend modes? Additive blending being quite important
3) Custom control for particle emission
Pros: Single implementation per emitter shape and force mode. Less tedious than manual storyboard creation
Cons: Does not exist, so major engineering drain. Don't really have custom control options in Noesis/Unity. Still has resource issue from so many UIElements
4) Create effects layer bitmap objects, render particle effects to texture, set image brush to use render texture
Pros: basically the same capabilities as UI particles in the Unity GUI libraries
Cons: More difficult to setup. Either limited distance/range, or requires a large, sparsely populated, alpha-blended image brush (performance issue). Can not be viewed in Blend (can use proxy image though).
5) Draw effects over UI
Pros: pretty straight forward. Good performance
Cons: only can draw on top of UI. Not easy to attach an effect to a UIElement (requires programmer time to create layer to translate from UIElement render transform to Unity world transform).
My goal is to try and come up with a golden path such that other can know what the best way to go would be. If you have suggestions, or even suggestions for paths to attempt, please post it below.
I'm mostly interested in the Unity case
Basically I've come up with the following solutions:
1) Bake the effect into a multi-frame texture and animate them
Pros: Can use existing tools (like After Effects) and can use as much detail in a single effect as you like
Cons: Requires more texture memory. Limited diversity (a lot of the benefits of particles thrown out the window). Large, alpha blended texture not great for performance.
2) Storyboard the effect (Particles are UIElements).
Pros: Resolution independent (potentially). Can view results in Blend.
Cons: Setting up storyboards is a very tedious process, even for simple effects. Low diversity (can apply multiple out-of-phase storyboards, though it would be even harder to set up). Not scalable (requires many UIElement).
Q: WPF would not, but could we potentially tweak blend modes? Additive blending being quite important
3) Custom control for particle emission
Pros: Single implementation per emitter shape and force mode. Less tedious than manual storyboard creation
Cons: Does not exist, so major engineering drain. Don't really have custom control options in Noesis/Unity. Still has resource issue from so many UIElements
4) Create effects layer bitmap objects, render particle effects to texture, set image brush to use render texture
Pros: basically the same capabilities as UI particles in the Unity GUI libraries
Cons: More difficult to setup. Either limited distance/range, or requires a large, sparsely populated, alpha-blended image brush (performance issue). Can not be viewed in Blend (can use proxy image though).
5) Draw effects over UI
Pros: pretty straight forward. Good performance
Cons: only can draw on top of UI. Not easy to attach an effect to a UIElement (requires programmer time to create layer to translate from UIElement render transform to Unity world transform).
My goal is to try and come up with a golden path such that other can know what the best way to go would be. If you have suggestions, or even suggestions for paths to attempt, please post it below.