Jump to: navigation, search

Tech:Softskin

Revision as of 17:12, 10 February 2018 by Frankiezafe (Talk | contribs) (somatotypes)

soft skin #003

presentation

The idea of soft skin is to find another/better way to animate the mesh of an avatar. This is related to the bloodbag researches made some time ago. It is also related to the relation between skin and fasciae in anatomy, see this chapter for more details.

First of all, it is useful to understand the relation between the mesh rendered on screen and the soft skin objects.


Softskin-bascis.png

object displayable mesh soft skin
3d position vertex dot
line edge fiber
surface polygon (quad or triangle)
constraint anchor

Even if they are bounded together, the relation between displayed mesh and soft skin is not a 1-1 relation. In displayed mesh, the edges exists in relation to triangles, and can be neglected. In the soft skin structure, fibers are mandatory to the structure. They are the active part, processing and transmitting forces to dots they are connecting.

The anchors are pullers to arbitrary defined point in space. They constraint the displacement of the dots without being influenced by them or the fibers. In the video soft skin #003 here above, they are represented as red lines.

muscled fiber

Fibers have a rest length, the distance between the two dots it connects by default. This length can be modified at any time. At each update, fiber process the delta between the actual distance of the dots and this reference length. If the delta is bigger than 0, the fiber pull or push the two dots to match the rest length. Each dot connected to more then one fiber therefore receive more than one push.

Fibers can vary the rest length by themselves, becoming muscles. This variation is cyclic (sinusoidal), and is defined by these params:

  • minimum length,
  • maximum length,
  • frequency, the number of rotation by seconds,
  • phase shift, a constant offset on the angle used to render the curve.


See video soft skin #002 for a demonstration of these parameters' influence.

computation

Dots are simple objects. They holds a XYZ coordinate, a 3d vector to accumulate the forces transferred from the fibers and counts the number of times they've been pushed by frame. To avoid flickering in the dots' position, the force is divided by [push count - 1] before applying the force on the position. They also hold a 3d vector representing the normal vector of the dot. After the update, the force not consumed (due to division) remains in the dots, allowing an inertia.

Anchor are even simplier. They holds a reference to the dots and a 4d vector representing the XYZ position of the anchor. The fourth parameter is used as a multiplier when the force vector is computed and passed to the dot.

Fiber are a bit more complicated. At each update, they:

  • if they are muscled, compute the current rest length;
  • compute the delta of distance between the current rest length and the current distance between points;
  • pass the force to the dots;
  • and adapt their direction.


The complete process is done in one pass:

  • update of all dots and reset of the counters;
  • update of all anchors;
  • update of all fibers.


This order prevents inconsistencies between fiber's direction and dots' position. It's simplicity ensure good performances, even on complex meshes rendered on small computers.

dev log

soft skin #001 - first version of the code.

soft skin #002 - muscles and 3d cylinder.

anatomy

fasciae

Fascia is a connective tissue wrapping muscles and organs, Their structure is an network of elastic fibers[1]. Not being directly visible but determining the position of the skin, the analogy between the displayable mesh and the soft skin objects is pertinent.

Photos and representations of fibrae.

somatotypes

Related to superficial fasciae, present in two layers at the surface of the body (see first schema below, superfical and deep fasciae ), just below the skin, the shape of bodies are classified by the predominant element that model it. This classification is called somatotypes[2]

135450-004-84541E22.gif

  • Endomorph ( endo-, from greek, meaning inside, within, internal [3] ) - shaped by guts
  • Mesomorph ( meso-, from greek, meaning middle, intermediate, halfway [4] ) - shaped by muscles
  • Ectomorph ( ecto-, from greek, meaning outside, external [5] ) - shaped by skeleton

references

  1. Facia definition on wikipedia
  2. Somatotypes, definition on Encyclopedia Britannica
  3. endo- definition on etymonline.com
  4. meso- definition on etymonline.com
  5. ecto- definition on etymonline.com

resources