Giter Club home page Giter Club logo

unityjigglephysics's Introduction

Unity Jiggle Physics

openupm

An acceleration-based jigglebone system with soft-body/squash-and-stretch physics for SkinnedMeshRenderers in Unity.

Features

  • GPU per-vertex deformations via shader, squash/stretch based on vertex color masks.

kobold breakdance

  • Purely acceleration based, elevators don't cause things to float/sag.

kobold elevator

  • Works at all framerates with very little differences in the physics solve. (It's unhooked from a fixed timestep as well!)

  • Can run on LateUpdate, FixedUpdate, and Update.

  • Only runs when mesh is visible.

  • Comes with a JiggleSurfaceApproximator which can keep a transform attached to the "skin" of a mesh. Great for censorbars and attachments that can't be added directly to the mesh.

Usage

This unity repository actually comes with a fully working project, with a working model in an example scene. If anything below doesn't make sense, download the project!

  1. Use the included AmplifyShader node to add the vertex deformations to whatever shader you want. (URP, HDRP, Standard, whatever!).

amplify node setup

  1. Make sure your model has RGBA vertex-color masks for how bouncy parts of the model is, keep individual neighboring bouncing parts as different colors.

kobold vertex color setup

  1. Set up a JiggleSoftbody with sensors overlapped in such a way that each "individual" bouncy part has its own sensor.

kobold softbody setup

  1. Add JiggleBones for the primary movement.

Installation

You can install Jiggle Physics with OpenUPM by checking out the badge above. Otherwise...

Simply add https://github.com/naelstrof/UnityJigglePhysics.git#upm as a package using the package manager.

Or if that doesn't work, add it to the manifest.json like so.

{
  "dependencies": {
    "com.naelstrof.jigglephysics": "https://github.com/naelstrof/UnityJigglePhysics.git#upm",
  }
}

unityjigglephysics's People

Contributors

kovacs-3d avatar naelstrof avatar raliv avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.