Coder Social home page Coder Social logo

nlferdinl / deform Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keenanwoodall/deform-prototype

0.0 2.0 0.0 15 MB

My second attempt at a framework for deforming meshes in the editor and at runtime in Unity. Not in development anymore.

License: The Unlicense

C# 87.49% ShaderLab 12.51%

deform's Introduction

Heads Up!

I'm working on a new version written completely from scratch using the job system right now. Here's a little teaser. Follow me on twitter @keenanwoodall for updates.

Teaser

Deform

Deform is a framework for deforming meshes in the editor and at runtime that comes with a component based deformation system build on top. If you don't want to make your own deformers, it comes with many standard ones you'd find in 3D modeling packages.

IMPORTANT

  1. If you are using this in a pre-existing project, you need to go to Edit/Project Settings/Player/ and set the Scripting Runtime Version (under the Other Settings dropdown) to 4.6.
  2. Right now this project is not suitable for professional development. Don't use it on large projects unless you are happy with the feature-set at the time of downloading/cloning it. If you aren't using version control DO NOT update to new versions of this system without backing up your project. Stuff you've made will break 99% of the time because I'm doing large/sweeping changes almost every time I push.

How it works

  1. Find a game object (with a mesh filter or skinned mesh renderer) in your scene.
  2. Add any deformer component.
  3. That's it. Your mesh is deformed. Tutorial 1

Tutorials

Features

  • Runs in edit and play mode
  • Multithreaded (optional)
  • Meshes can be saved
  • Deformers can be stacked and reordered
  • Works with skinned meshes (kinda)
  • Easily Extendable

Built-in Deformers

  • Bend
  • Color Mask
  • Curve
  • Cylindrify
  • Noise (Value, Perlin, Simplex, Cellular, Cubic)
  • Pivot To Bounds
  • Pivot To Center
  • Ripple
  • Scale Along Axis
  • Scale Along Normal
  • Sine
  • Skew
  • Spherify
  • Squash and Stretch
  • Taper
  • Texture Mask
  • Transform
  • Twist
  • Wave

Releases

FAQ

I don't want all the fluff. What can I safely remove?

  • You can delete everything except for the Code and Plugins folder.

How do I make my own deformer?

  1. Make a script that uses the Deform namespace
  2. Inherit from the 'DeformerComponent' class.
  3. Override the 'Modify' method.
  4. Make changes to the mesh data and return it.
  5. Drag your script onto any object with a MeshFilter or SkinnedMeshRenderer.
  6. Mission complete.

What is the MeshData struct?

  • It holds the positions and normals (as well as some other stuff) of a mesh.

Why am I getting the error, xxx can only be called from the main thread?

  • Unity locks access to most things from other threads. You are probably accessing something like a Transform component from inside the Modify method, which runs on another thread when UpdateMode is set to UpdateAsync. I recommend overriding the virtual method, PreModify, and caching anything you need that is inaccessable from another thread. PreModify is called on the main thread right before any deformations calculations are run.

Why am I getting the error, xxx asynchronous functions cannot be used because it is not part of the C# 4.0 language specification?

  • You need to go to Edit/Project Settings/Player/ and set the Scripting Runtime Version (under the Other Settings dropdown) to 4.6.

Help

  • Please send any suggestions/feedback to [email protected]
  • Pull requests are welcome!
  • If this project is of any help and you're looking for a way to help continue development, feel free to donate! Donate via Paypal


1 2 3

deform's People

Contributors

keenanwoodall avatar andybak avatar

Watchers

James Cloos avatar Ferdi Alleman 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.