Posts Tagged ‘plugin’

The plugin

Giving the fact that this project has two main parts, the physics simulation and the rendering, it would probably be a good designing idea if the plugin implementing it will also have two CS interfaces. This is what these interface should do:


  • Attach fur to the base mesh

For this, a mesh (any type) would have to be specify along with some control points for the guide hairs.

  • Generate geometry

Using the guide hairs and a density map (maybe a heightmap too) the rest of the hair strands will be generated using interpolation.

  • Update position

This is done by synchronizing the position with iFurPhysicsControl. This interface can implement any type of physics not just ropes, and it can even be null, specifying that a particular instance of the iFurMaterial interface doesn’t have any physics simulation (might be used for static objects, or such).

  • Implementing a shader

Or specify a shader/material to be used with this interface. This is especially important because although Marschner is a good model for hair rendering, it might be too complex for fur in general. Here Kajiya and Kay shading model could be used instead, because it has pretty good results too and it’s faster.


  • Initialize strand

Given a guide hair this function will create a physics object, a rope in my case, and make a connection with this strand by a unique id, or so.

  • Animate strand

This function will update a strand’s position using the physics object especially created (via the initialize method) for this strand.

  • Remove strand

Removing physics objects might be a good idea for a LOD scheme, because animating physics objects is quite computational expensive.

Categories: Crystal Space Tags: , , ,