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

Add property animation and randomization capabilities #1

Open
feiss opened this issue Aug 23, 2018 · 3 comments
Open

Add property animation and randomization capabilities #1

feiss opened this issue Aug 23, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@feiss
Copy link
Contributor

feiss commented Aug 23, 2018

like randomScale, randomRotation factors, or "scale up to 3x along the animation", "fade out"..

@feiss feiss added the enhancement New feature or request label Aug 23, 2018
@feiss feiss changed the title add property animation and randomization capabilities dd property animation and randomization capabilities Aug 23, 2018
@feiss feiss changed the title dd property animation and randomization capabilities Add property animation and randomization capabilities Aug 23, 2018
@feiss
Copy link
Contributor Author

feiss commented Aug 31, 2018

Animating individual properties like opacity over time is something that it is very useful and much required. However, I still didn't find which api and way would be the best to do it.

The problem with changing the opacity of particles individually right now is that we would have to create a single material for each particle, and that would destroy the performance. A gpu shader solution is needed for that. A workaround would be to create a single material per Particle System, but then all smoke particles of each particle system would fade out at the same time.

Both options, individual materials per particle or per particle system, need to animate the material.opacity in the tick() method. You have the relTime variable which goes from 0 to 1 in the life of the particle system.

Definitively it only will be possible in a proper way when the component uses gpu shaders. But I don't have an estimated date for that.

@ngokevin
Copy link
Contributor

ngokevin commented Sep 4, 2018

You can use the animation component probably; it can animate arbitrary properties. Once it's in core, you can use it without dependencies and abstract the API more.

@feiss
Copy link
Contributor Author

feiss commented Sep 4, 2018

well, the problem is not about how to animate, that can be easily done in one line. Is more a problem of performance and material optimization.. maybe I could add a simple opacity fadein/out property to the schema to animate the opacity of a particle system, as a quick and simple workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants