#Complex Animation Via Sequential Path Animator APEL

51 messages · Page 1 of 1 (latest)

glad flower
#

Here is some complex animation made with apel. Unlike most showcases this one uses a whole bunch of features

ParticleSphere sphere = new ParticleSphere(ParticleTypes.FLAME, 2f, 300);
sphere.setBeforeDraw(((data, obj) -> {
    obj.setRadius(1.001f + ((float) Math.sin(0.1f * data.getCurrentStep())));
}));
ParticleSphere sphere2 = new ParticleSphere(sphere);
sphere2.setParticleEffect(ParticleTypes.SOUL_FIRE_FLAME);
Vector3f pos = world.getPlayers().getFirst().getPos().toVector3f();
float pi = (float) Math.PI;
CircularAnimator animator1 = new CircularAnimator(
    1, 5f, pos, new Vector3f(pi, 0, 0), sphere, 500
);
CircularAnimator animator2 = new CircularAnimator(animator1);
animator2.setClockwise();
animator2.rotate(pi, pi, 0);
animator2.setParticleObject(sphere2);
ParallelAnimator parallelAnimator = new ParallelAnimator(1, animator1, animator2);
List<ParticleCylinder> cylinders = new ArrayList<>();
int maxAmount = 6;
for (int i = 0; i < maxAmount; i++) {
    ParticleCylinder cylinder = new ParticleCylinder(
      ParticleTypes.END_ROD, 0.01f, 2f, new Vector3f(0, pi * i / maxAmount, 0), 500
    );
    int finalI = i;
    cylinder.setBeforeDraw((data, obj) -> {
        float speed = (float) Math.sqrt(data.getCurrentStep() * finalI);
        if (speed >= 20) return;
        obj.setRadius(speed / 2);
        int signedOne = obj.getRotation().y < 0 ? -1 : 1;
        obj.setRotation(new Vector3f(0, signedOne * speed / 10, 0));
      });
     ParticleCylinder cylinder2 = new ParticleCylinder(cylinder);
     cylinder2.setRotation(cylinder2.getRotation().mul(1f, -1f, 1f));
     cylinders.add(cylinder);
     cylinders.add(cylinder2);
}
ParticleCombiner<ParticleCylinder> cylinderCombiner = new ParticleCombiner<>(cylinders);
PointAnimator pointAnimator = new PointAnimator(1, cylinderCombiner, pos, 200);
SequentialAnimator sequentialAnimator = new SequentialAnimator(1, parallelAnimator, pointAnimator);
sequentialAnimator.beginAnimation(ApelRenderer.client(world));
#

the line on the center is a bug

#

mathematical one more specifically. Also if ur curious there is nothing new but felt like to showcase something more complex to kinda emphasize on the interface

drifting bobcat
#

that's awesome

low trench
#

You have been cooking lately ngl

glad flower
#

xD

#

lol

#

its mostly me like about 80%

#

but the other ~20% i gotta say is darthsharkie's performance improvements, bug fixes, criticizing and consistency

#

so yeh thank him as well

#

since some stuff like client side rendering and optimisations wouldn't be possible without him

glad flower
#

about in a week

#

the project will release in beta

glad flower
#

also list of all things that need to be done

#

Particle Objects

  • Ellipsoid (3D) / Maybe

Particle Animators

  • Spline Animator
  • Noise Animator / Maybe
glad flower
#

as it turns out

#

you can have a spline as a bezier path animator that has a lot of curves

#

but the problem is spline is basically a family of curves

#

i might make the catmul spline

#

or B-Spline

#

imma need to experement with python and matplotlib

#

for the math of a cone

glad flower
#

nvm

#

its actually simple

glad flower
#

cone is done

#

5k particles btw

glad flower
#

the torus is just too difficult

glad flower
#

trig functions are now using a trig table

#

and instead of using java.math im using org.joml for calculating trig functions

glad flower
#

180 commits

glad flower
#

once there are performance improvements on apel

#

along with bug fixes and both me & darthsharkie agree that its time to release to the public

#

the project will officially got to public beta

glad flower
#

did elliptical path animator

glad flower
#

also i might change the system a bit and maybe make path animators as particle objects

#

so no more worrying about 2 seperate trees

glad flower
#

im thinking of root particle objects

#

they are used for the rendering or smth

#

like instead of just particles, you could also render block displays

#

however this is a concept

glad flower
#

wrote documentation for getting started

glad flower
#

apparently didn't knew this but trigonometry can be used to create regular polygons

#

making a regular polygon is actually way more simple than first thought of

#

for some odd reason

#

it lags a lot

#

yknow the code is shit

#

when a ellipse runs faster than a regular polygon(pentagon to be more specific) and is accurate

#

quaternions....

#

and i forgot to increment the index

glad flower
#

i take it back