Ruoyan Kong

Home Education Research Interests

Bouncing Ball
Water Fountain
Magical Spells
Spring Threads
Cloth
Shallow Water 1d
Shallow Water 2d
Planning_PRM
Planning_TTC_PRM
Planning_Boids_Astar
Character_Animation_Blender

1. Bouncing Ball

    Group:
      Ruoyan Kong kong0135@umn.edu, Haoran Yun yan00115@umn.edu

    Code:
     https://github.com/ruoyankong/animation/tree/master/assignment1/BouncingBall2D

    Video:

    

    A list of features and when they are demonstrated:

      0:00 2D ball bouncing the floor

    Tools and Libraries :
      Processing 3.5.4

2. Water Fountain 

    Group:
      Ruoyan Kong kong0135@umn.edu, Haoran Yun yan00115@umn.edu

    Code:
     https://github.com/ruoyankong/animation/tree/master/assignment1/WaterFountain

    Video (For the best performance, choose 1080 HD):

    

    A list of features and when they are demonstrated:

      00:03 -- 00:13, water must move in a parabolic arc.
      00:04, water stream on a fountain-like structure.
      00:14 -- 00:15, water hits the ground, bounce in a realistic ‘splash’.
      00:18, textured sprites for particles.
      00:17 -- 00:22, tails on particles.
      00:18 -- 00:34, Benchmark-3: 20,000 particles simulated and rendered at over 30 FPS.
      00:20, translucent particles (from born to death, the particle's color is changed from 0% opacity to 100% opacity).
      00:20, color change of particles (from born to death, the particle's color is changed from blue to white).
      00:23 -- 00:35, a peasycam camera that takes care of rotation and translation.
      00:23 -- 00:28, particle-obstacle (the sphere) interactions besides the floor

    Tools and Libraries :
      Processing 3.5.4
      fountain.obj
      peasycam
      test on the personal laptop, core i7, 8G

     Thoughts:
     To balance the frame rate and performance, I gave up the original idea which use shape to render each water drop by external objects because it's very slow. Instead,
     I use a line which changes from light color to deeper color, small strokeweight to large strokeweight to simulate the shape of a drop, it can simulate 21000 particles with
     a frame rate larger than 32.


3.  Magic Spells

 Group:
      Ruoyan Kong kong0135@umn.edu, Haoran Yun yan00115@umn.edu


 Code:

   https://github.com/ruoyankong/animation/tree/master/assignment1/magic_spells

  Art Contest GIF:

  


  Video:

   




 Description:


    The particle system includes four kinds of magic spells, wind-attack particle, fire-attack particle, wood-defense particle, water-defense particle. These kinds of particles have different emitting regions, moving paths, and sound effects. They can be controlled by direction keys, UP, DOWN, RIGHT, LEFT. Particles can interact with other kind of particles. For example, the wind attack from the left side could fight with a fire attack from the right side in the middle and the velocity and lifespan will change after the collision. The defending particles can protect the magic wand from being hit by attacking particles. If the defending particles hit the wand three times, the wand will disappear.


 Keyboard Control:

   Left magic wand:

   Fire attack — RIGHT

   Wood defense — DOWN


   Right magic wand:

   Wind attack — LEFT

   Water defense — UP




Features:


  Simulation context

  00:00 -- 01:14 Magic World: the magic rug and two magic wand



  Other Required Features

  00:00 -- 01:14  3D user-controlled camera powered by peasycam library.

  00:00 -- 01:14 Particle-obstacle interaction:

                  00:02 -- 00:07 The right magic wand is hit by fire attack.

                  00:07 -- 00:13 The left magic wand is hit by wind attack.

                  00:28 -- 00:37The wood barrier protect the left magic wand from being hit by wind attack.

                  00:37 -- 00:47The water barrier protect the right magic wand from being hit by fire attack.

                  00:47 -- 00:56The wind attack and fire attack is meet in the middle.



  Rendering

  00:00 -- 01:14 Textured sprites for particles.

  00:00 -- 01:14 translucent particles: All particles will gradually change to totally transparent.



  Performance Benchmarking

  00:00 -- 01:14 Benchmark-3: 20,000 particles simulated and rendered at over 30 FPS :

                   The frame rate and the number of particles are displayed on the screen.



  Additional Features

   00:00 -- 01:14 Continuous user interaction with the system:

    00:02 -- 00:07 Press RIGHT to release a fire attack.

    00:07 -- 00:13 Press LEFT to release a wind attack.

    00:13 -- 00:20 Press  DOWN to release a wood defense.

    00:20 -- 00:28 Press  UP to release a water defense.



  00:00 -- 01:14 Continuous Collision Detection:

                  The floor and other kind of particles. (Same as particle-obstacle interaction)

  00:02 -- 01:14 Simulation-driven audio :

    Corresponding sound effect will be played when an attack or defense releasing and a collision happing.

       

  00:28 -- 01:14 Multiple interacting particle systems:

    Technically, this code including four particle systems and these system interact with each other.


4. Spring Threads

    Group:
      Ruoyan Kong kong0135@umn.edu, Zichen Yang yang6703@umn.edu

    Code:
     https://github.com/Ethan-zc/CSci-5611-Assignments/tree/master/Assignment_2/checkin

    Video:

    

    A list of features and when they are demonstrated:

      0:00 The thread is anchored at the top and allowed to dangle free on the bottom.
      0:08 Use keyboard ->, <- to increase or decrease the velocity.

    Tools and Libraries :
      Processing 3.5.4


     Thoughts:
     Each time we update the velocity of the lower ball, and use this velocity to update a little of the

     upper ball's velocity. The coefficients need to be tested carefully.

 

5. Cloth

    Group:
      Zichen Yang yang6703@umn.edu, Ruoyan Kong kong0135@umn.edu

    Code:
   
https://github.com/Ethan-zc/CSci-5611-Assignments/tree/master/Assignment_2/Assignment2_cloth/Cloth_copy
   

    Video:

    

    A list of features and when they are demonstrated:

  • Realtime Rendering 0:11: cloth is real-time rendered and the frame rate is shown in the program.
  • 3D rendering, with user-controlled camera 0:11: Whole system is drawn in P3D. Camera could be moved by WSADQE and rotated by FGHT.
  • Real-time user interaction with system 0:18: By using arrow button and NM, red ball could be moved along XYZ axis in real-time. Dragging and tearing of cloth are also real-time.
  • 3D Mass-spring cloth simulation 0:10: Cloth system is achieved by mass-spring system with 30x30 3D nodes.
  • Drag-terms 0:32: When the mode is drag mode, by clicking the mouse and move it, the cloth would be dragged based on the movement of pressed mouse.
  • 1-way cloth-object interaction 0:12: When cloth touches the ball, it would perform like normal cloth. Collision detection is used to achieve this.
  • 30x30 Cloth with fast, smooth motion and obstacle interaction at 30 FPS 0:12: The frame rate is always 59 and above.  
  • Textured simulated objects 0:10: Cloth is textured as The Star Night.
  • Two-way coupling object-simulation coupling 0:13: Cloth would move red ball when they touch each other.
  • Tear-able cloth 1:32: By clicking on the cloth and drag mouse, the cloth below would be cut and drop. Camera could not be moved during cutting.

    Tools and Libraries :
      Processing 3.5.4
    

Reference:

https://processing.org/tutorials/p3d/

https://processing.org/reference/PVector_sub_.html

https://processing.org/reference/textureMode_.html

https://processing.org/reference/beginShape_.html

https://processing.org/reference/createShape_.html

Difficulties:

  1. The first difficulty is the horizontal and vertical string force that apply on each node. The final row of nodes has different situation than others, since it only gets its own nodes ‘gravities. I solve this problem by calculating the final row independently. 

  2. Since drag and tear are using mouse pressing at the same time, I use a switch button X to switch between different mode. 

  3. For tear mode, to judge if where mouse clicked have cloth on it is hard. I tried to use ray tracing but it failed. The way I solve it is by monitoring the position of dragging mouse, and find the nearest node to cut. To cut the nodes, I firstly add a 2d array to store all the status of nodes. If it is clicked, then the force applied from above string would not be calculated, and it would not be drawn as a vertex.


 6. Shallow Water 1d

    Group:
      Ruoyan Kong kong0135@umn.edu, Zichen Yang yang6703@umn.edu

    Code:
     https://github.com/ruoyankong/animation/tree/master/assignment2/shallow_water_1d

    Video:

    

    A list of features and when they are demonstrated:

     0:06 Use keyboard w, a, s, d to control direction
     0:14 Water dampened
     0:14 FPS > 60

    Tools and Libraries :
      Processing 3.5.4, https://people.sc.fsu.edu/~jburkardt/cpp_src/shallow_water_1d/shallow_water_1d.cpp


     


 
7. Shallow Water 2d (100 x 100)

    Group:
      Ruoyan Kong kong0135@umn.edu, Zichen Yang yang6703@umn.edu

    Code:
     https://github.com/ruoyankong/animation/tree/master/assignment2/shallow_water_2d

    Video:

    

    A list of features and when they are demonstrated:

    
     0:38 FPS > 30

    Tools and Libraries :
      Processing 3.5.4, https://people.sc.fsu.edu/~jburkardt/cpp


    Thoughts :
     You need to change the color according to height to make the effect significant.

    
  8. Planning PRM

    Group:
      Ruoyan Kong kong0135@umn.edu, Luyao Zhang zhan5380@umn.edu

    Code:
    https://github.com/ruoyankong/animation/tree/master/assignment3/prm_planning

    Video:

    

    A list of features and when they are demonstrated:

      0:02 Planning route.

    Tools and Libraries :
      Processing 3.5.4 ,
      https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-in-java-using-priorityqueue/


9. Planning TTC PRM

    Group:
      Ruoyan Kong kong0135@umn.edu, Luyao Zhang zhan5380@umn.edu

    Code:
    https://github.com/ruoyankong/animation/tree/master/assignment3/ttc_planning

    Video:

    

    A list of features and when they are demonstrated:

      0:00 Implemented TTC and PRM.
      0:05 4 obstacles and 20 agents.

      0:19 - 0:23 Blue agent and purple agent change relative directions such that the blue agent gets out (bottom-left).

      0:28 - 0:29 Pink agent and green agent change relative directions (top-right).
      0:42 - 0:50  A group of 4 agents move to get out the local minima (top-right).
      1:04 - 1:10 Orange agent avoid the obstacle and get out the local minima.
      1:28 A blue agent is caught in a local minima.

      0:07-0:08 left click to add an agent in that position.
      0:13-0:14  press RIGHT to increase obstacles' radius, LEFT to decrease obstacles radius.
      0:18-0:22 press w,s,a,d to move obstacles.
      0:28-0:30 press UP to add an agent, DOWN to remove an agent.
    

    Tools and Libraries :
      Processing 3.5.4 ,


   
Thoughts:

     Agent's speed gets slower in a minima, setting a goal velocity will help speed up agents in this situation.


10.
Planning_Boids_Astar

    Group:
      Ruoyan Kong kong0135@umn.edu, Luyao Zhang zhan5380@umn.edu

    Code:
   https://github.com/ruoyankong/animation/tree/master/assignment3/boids

    Video:

    

    A list of features and when they are demonstrated:

      0:00 blue points are random points used in PRM to build graph, lined connected red points are selected optimal path for each agent to go to the goal. On the top left corner will show current operation name. Yellow cylinders are obstacles.
      0:02 real time move obstacles
      0:16 real time change goal position
      0:26 real time add obstacles
      0:39 real time set off new agent and generate at mouse click point.
      0:45 new generated agent will select one of the optimal path to go to the goal
      0:50 remove the goal force, which means agents don’t need to go to the goal.
      0:52 show effects of alignment
      01:02 show effects of separation
      01:06 show effects of cohesion
      01:12 agents from current location go to the goal


    

    Tools and Libraries :
      Processing 3.5.4 ,
     
https://en.wikipedia.org/wiki/A*_search_algorithm
      https://www.vhv.rs/detail/98530/
      https://github.com/jackaperkins/boids

   
Thoughts:

     Agents in boids keep close to a central of some cluster while agents in ttc simulation don't.
     PRM is faster in finding path than A Star.
     TTC is easier to implement while Boids is more flexible.


10. Character_Animation_Blender

    Group:
      Ruoyan Kong kong0135@umn.edu, Luyao Zhang zhan5380@umn.edu

    Video:

    

 Option 3-Learn a Simulation Tool Report

Videos and images of your project:

The original dancing:

The dancing with cloth:


Our project is character and cloth animation made by Blender. We simulated Judy from the Zootopia dancing in the east bank campus of the U. We designed different actions in the action editor and combined them in the nonlinear editor. We set different cameras and switch between them in the video. 

The rabbit frame is made by a set of geometric shapes and linked with corresponding controllers. Since the arms, legs and body have different controllers individually, we design the movements for them by using an action editor. For each movement, we mark a time point for it. Then, we connected all movements. Thus, the movements are timeline based. For the simulation effects, we drop a cloth on Judy’s head and simulated the physics between the moving body of Judy and the cloth. To add the cloth simulation, we insert a plane in the blender and change the physics of it as cloth material. In addition, we change Judy’s physics as a collision. Therefore, when the cloth is dropped from the air, it will seem like the cloth is thrown to Judy’s ear and drops off. The background changing is made by changing camera background. 

The technical problems we faced during the process is that the render time is too long. At the beginning, we want to render the cloth with Nick's photo, which is a fox. However, the render process will take hours, so we decided to use the initial cloth material appearance. 

There are some comparable state-of-the-arts like Blender, which has played a big role in cartoon making and feature filming. What’s really stunning about Blender is that its digital sculpting tools can be easily implemented and have high performance in the different stages of the procedure in digital production. The movie "Circle" which tells a story about a young woman who sees another world through the fluid bubble. Rendering and realization on such fragile and translucent surfaces can be technological problems for prior generations of technology. Therefore, this is an example that the use of Blender will bring many impressive results. The realistic and smooth visual effects made by Blender, has been making waves and collecting awards at film festivals across the globe. 

Our simulation benefits from using Blender and tries to show its uniqueness and bright spots. After our exploration, we found that Blender uses Lattice Boltzmann Method (LBM), Navier-Stokes (NS) and Smoothed Particle Hydrodynamics (SPH) as its key algorithms. While no situation is perfect, technology challenges for it. For instance, the simulator can’t figure out thin surfaces.  Conveniently, there are many simulation artifacts in the simulation tool. For example, there are cloth, smoke, fluid, square and compression simulation artifacts that come with the software.

Our simulation results are quite good by using Blender. The cloth has the traits of a cloth should have. We believe the cloth simulation also uses those springs, just as we did in the previous assignments.  For now, it seems the plane cannot have thickness, which limits the realistic feature of the cloth. This feature will be realized in our future design.

Our simulation is more complex than the tutorial. We designed the collision as a character and with a non-globular shape. Also, in the image, we combined the movements of character and the cloth simulation. We give a context of the cloth simulation and the cloth simulation works well. We can see when the cloth encounters an obstacle, it changes shape and shows gravity effects and softness features.  What doesn’t work is failing to render the cloth with a desired image. Long time rendering really makes the project hard to deliver, so we give up to implement that trait. Our future work will try to make the character have a more smooth movements in series, which may generate a small cartoon film. Judy will play with the cloth and design some scenarios, like Judy use the cloth to dry her sweat and fold the cloth. 

Using Blender makes the simulation much more easier without knowing the details and implementation of the algorithm. However, we think it is interesting and fun to know the algorithm and build things up from the very beginning if time permits.