Rope Physics and Displacement map shader

Rope physics

I was recently talking about simulating rope in games, and had a go at it myself. Although it is quite simple tying a number of 3D primitives (e.g., capsules) together using Unity’s hinge or spring physics joints, you can get a better result by producing a mesh with a rigged skeleton and attaching the joints to its bones. I therefore rigged a rope skeletal mesh in Maya and simulated ‘ragdoll’ effects with it. It’s a simple process but seems quite effective. Below is a video.


Displacement map shader

I have also been reading about alternatives to normal mapping in terms of finding other effective techniques to provide depth to geometry without increasing the number of vertices on a mesh. Displacement mapping seemed like such a simple technique to implement I had a go, and it is, simple yet potentially quite useful. Once you are able to look up texture coordinates within a vertex program you are able to adjust the coordinates of vertices according to the brightness of your displacement map. You can either offset the textures according to global transform space, or if you want a local displacement (e.g., on a sphere or a character) then you can scale the normals of the vertices, in a similar way to locally translating geometry according to its local axes. Below is a video.

Leave a Reply

Your email address will not be published.