GithubHelp home page GithubHelp logo

keenanwoodall / deform-prototype Goto Github PK

View Code? Open in Web Editor NEW
290.0 19.0 40.0 15 MB

A prototyped framework for deforming meshes in the editor and at runtime in Unity. Not in development anymore, but it's still pretty awesome!

License: The Unlicense

C# 87.49% ShaderLab 12.51%
unity deforming-meshes deformation deformer deformable-model mesh-deformation unity3d unity3d-plugin unity3d-framework csharp

deform-prototype's Introduction

Heads Up!

I've written a new version from scratch! It's objectively better and you should totally check it out! Here's a little teaser.

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



1 2 3

deform-prototype's People

Contributors

andybak avatar keenanwoodall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deform-prototype's Issues

Any way to change the vertex count?

I'm still thinking about Deformers as if they were 3DS Max modifiers. I had an idea to create an array deformer but looking at the code it seems like you can't modify the vertex count - or the topology in general.

Before I spend any time on this, I wondered if this is even in scope for the project or if you've given it any thought?

MeshUtil breaks build

The editor specific code in MeshUtil is breaking the build process in 2017.4.0f1. Not sure what the best fix is for this yet. Depends on how that AssetDatabase asset is being used throughout the rest of the code.

how to drag one corner of the cube?

hi,is there an example to drag the corner of the cube?
or how to change a cube to a pyramid by dragging four corners of the top of the cube?
please help

Add bounds to deformers

I'd love to be able to restrict deformers like squash/stretch, bend, twist and taper to user defined bounds, but can't quite figure it out.

Something like this:
image

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.