armory icon indicating copy to clipboard operation
armory copied to clipboard

Wind system (global/local force)

Open knowledgenude opened this issue 4 years ago • 1 comments

The wind can be undestood by some force applied to a object.

There can have different sources of wind and some variables like: the object velocity, the wind velocity, etc. to be used in shaders for example.

This wind system can also be used to make water physics that can affect shaders too, for example to simulate water plants, clothes, etc.

*The idea still have to be worked

knowledgenude avatar Jul 28 '20 20:07 knowledgenude

Hi, great idea although I think we should keep the implementation of the actual effects of the wind to the user, this gives them more freedom. The use cases could vary a lot as you said, from actual physical forces to water textures to grass shaders (a compute shader is maybe more suited for that, I don't know) and so on.

Maybe we could add a trait that calculates wind values for a given position. The trait then would be either available from the scene trait menu or automatically added when an option in the UI (world? scene?) is set. I'm not sure if the calculations should be done on demand like windTrait.get[Speed/Direction]At(x, y, z) e.g. or if there should be some caching. Using a trait would also ensure that this feature including the necessary memory is only used when required.

There could be multiple modes/settings for wind, I think of uniform wind, noise with some settings and a custom texture mode where the rgb channels describe the direction and the alpha value describes the strength multiplied by a factor.

What are your thoughts on this? Also, to other people reading this: what do you think? Is this a feature that Armory should provide or should every user implement it by their own if wanted?

MoritzBrueckner avatar Jul 29 '20 20:07 MoritzBrueckner