Skip to content

Unity base NURBS spline and surface module

Notifications You must be signed in to change notification settings

budukratok/unity-nurbs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

untiy-nurbs

Unity base NURBS spline and surface module. Both Spline and Surface are available.

Spline

Spline module offers Standard, Loop, Clamped options.

GetCurve function converts [0, 1) -> position on curve in whichever mode. First & second devivatives are available from GetFirstDerivative and GetSecondDerivative as they are shown below, are currently active only in Standard or Loop mode.

Surface

Open/Closed surface mesh is available. Same as Spline, this module offers Standard, Loop, Clamped options for each direction (because NURBS surface is a Tensor of NURBS spline), which means this supports FlatSurface, Torus(S x S), Cylinder.

By moving control points using unity built-in handle UI, you can modify a mesh in runtime. Once you finish modifying you can bake the mesh out and save as an asset with CreateOrUpdate method.

img

Common

As seen in the Demo all the data is stored in ScriptableObject. Other settings are very obvious but if you have some trouble or question feel free to make a issue.

TODO

  • Weight support in derivatives of spline.
  • Derivatives in clamped spline.
  • Sphere (S^2) option in surface.
  • Enable FFD.

Reference

Shape Interrogation for Computer Aided Design and Manufacturing, Nicholas M. PatrikalakisTakashi Maekawa, Splinger, 2002

Introduction to Computing with Geometry Notes, Department of Computer Science, Michigan Technological University, 1997-2014 C.-K. Shene

About

Unity base NURBS spline and surface module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 96.5%
  • ShaderLab 3.5%