Interactive Swept Surface Modeling in Virtual Reality

Virtual Reality is by far seen as a creative and artistic medium. Drawing and sculpting is hence of prime importance in the future of VR. Most of the papers and applications available take the concept of freehand sketching for mostly design purposes in VR. However freehand sketching is not usefull for making smooth surfaces for the purpose of modelling.

An implementation of the algorithm stated in ‘Interactive swept surface modeling in virtual reality with motion-tracked controllers’ by Tim McGraw, Esteban Garcia and Drew Summer (Purdue University) which was published in SBIM’17.

It is difficult to achieve smooth curves and surfaces while freehand sketching in air. Hence, the paper introduces Hermite spline curves as a modeling and control primitive. There are three options mentioned in the paper for the type of surface that can be modelled using these hermite curves- Swept Surfaces, Repeated cloned meshes, and Tubular structures. After the position is defined by the hermite splines, the orientation is ascertained by a rotation minimization frame. The frame and reparameterization is done to allow the user to orient and scale the surfaces and cloned meshes.

Development Environment - Unity Engine, C# Scripting, HTC Vive System (with controllers and Lighthouse setup)

Features -

User can switch between different options
Trigger usage

Implementation -

  • Hermite splines - The cubic Hermite curve has two endpoints p0 and p1. At the endpoints the curve is tangent to the given vectors m0 and m1. The parameteric equation of the curve is given by -
  • Line Renderer - We use unity’s own line renderer component to draw the splines and surfaces. The issue with using this feature is that it does not render one-pixel-wide lines. It renders billboard lines (polygons that always face the camera) that have a width in world units. Since, we move around the shapes we created, the shapes always face towards us, which makes them look unrealistic. This can be fixed though, if we create meshes instead of lines.
  • Closed-surfaces - Hermite splines are looped using a property of line renderer. Sweeping these closed splines can generate tubular surfaces which are hallow from inside.
  • Freehand sketching - Hermite splines are a great way of utilising both the controllers, but freehand sketching can make great shapes too.
  • Swept Surfaces - When the trigger on the right controller is pulled a swept surface is generated from the sequence of Hermite splines.
Click to play the demo
System constantly shows how the hermite will look with certain orientation
Sweept surfaces
Closed Hermite spline
Different material
Let the imagination flow!

Ⓒ Himanshu Pahadia 2018