Hi i need some help for creating a leaves emitter.
I have a heightfield and a
float getHeight(float x, float y)
method
wich gets the interpolated height of a terrain
as particles i will use a sprite set : a unique texture file wich have different leaves types (green leaves, yellow leaves, leaves of different shapes ecc).
what i need is to create an emitter and a animator wich can handle multiple leavese falling down around the player.
every leaves uses 32x32 and 16x16 portions of the sprite set (usually a 512x512 with 30-32 differente leaves).
so i have to set the initial position of a leave
initialHeight=getHeight(x,y)+tree height
and make them falling down until they reach the end of the terrain
finalHeight =getHeight(x,y)-epsilon
the most difficult part is animate leaves. i have no idea of what kind of function can reach a realistic falling down. I have tried with a spline but it is not clockwise with many leaves (up to 64 gives a realistic result, but this were done without a particle engine.)
I want to do that with irrlicht rendering plugin.
The project i'm working will be released opensource and much thanks to anyone can help me in a significative manner.
Another difficult point is how to use different UV sets using sparkirr for make possible render different leaves types using only 1 material.