sanj0 / n0mu

proof-of-concept cloth simulation with Java + Salty Engine / naive shading

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

n0mu

example gif

n0mu is a proof-of-concept cloth simulator built using Java and Salty Engine.

It is not optimized at all and uses a very naive shading algorithm.

The algorithms

Each cloth ("ropes" and "sheets") consist of ClothPoints, ClothConstraints and ClothFaces.

Each ClothConstraint has two endpoints (each being ClothPoints); it "tries" to keep them the same distance apart.

There is also gravity going on and Newton is being respected.

##     Shading Each face is colored with a blend of its color and black. The ratio of the blend is determined by the ratio of the current area of the face to the initial area. This works fine in most cases and makes for a pretty convincing 3D effect.

About

proof-of-concept cloth simulation with Java + Salty Engine / naive shading


Languages

Language:Java 100.0%