truck icon indicating copy to clipboard operation
truck copied to clipboard

T-Splines

Open giannissc opened this issue 2 years ago • 12 comments

Are there plans to support t-splines as well on truck?

Also seeing how t-splines are a superset for NURBS and subdivision surfaces (hope my understanding is correct :p ) would it make sense to make all modelling centre around T-splines?

giannissc avatar Jul 30 '21 11:07 giannissc

T-spline is patented by Autodesk. https://patents.google.com/patent/US7274364B2/en It seems to use it with Rhino. We need to check the conditions of availability. It is not immediately supported.

ytanimura avatar Jul 30 '21 15:07 ytanimura

One thing that may be an alternative is to use OpenSubdiv's BFR API to create a patch mesh from the subivision surface (sds). I.e. the limit surface is approximated by piecewise parametric surfaces (b-spline/bezier patches) which can be represented by Truck.

In a parametric setting you would have a life connection between the polygon cage that defines the sds and the resulting patches (stitched together at their non-naked edges).

I did a Rust wrapper for parts of OpenSubdiv a while back but I didn't wrap the API part that generates piecewise parametric surfaces. OpenSubdiv will get a nice, official Rust wrapper eventualy as part of the ASWF effort to oxidize the VFX library ecosystem anyway.

I think T-junctions as a feature are overrated (the one thing that makes T-splines special). The most common use case is really having a mesh that originates from a polygon/sds modeling system on which you want to do some BREP operations (or vice versa). And that can be covered with what OpenSubdiv's BFR API offers right now (and w/o any patent/licensing issues).

virtualritz avatar Feb 20 '23 12:02 virtualritz

I agree with @virtualritz. Could the term "subdivision surface" or "subdiv" be added to the issue title in order to avoid duplicates?

johschmitz avatar Mar 08 '23 18:03 johschmitz

One motivation for creating a shape processor from scratch is to provide a wasm module that can be handled in the browser for small models. There are cases of transient code that cannot be made wasm, or cases where the code is parallelized and accelerated only in native, but basically everything is ideally designed to work in the browser. Maybe I am just uninformed, but I think it is reasonably hard to run code that includes FFI on a browser. Therefore, even if it were to be implemented, it could only be used in a limited way, and I am not very positive about it.

ytanimura avatar Mar 23 '23 06:03 ytanimura

Yeah, no idea how hard it would be to cross compile C++ to wasm that later sits behind an FFI for Rust.

That said, I don't think it's an issue, at the beginning, if a feature like subdivision surface support sits behind a feature flag that must be disabled to build truck for wasm.

virtualritz avatar Mar 23 '23 14:03 virtualritz

The linked T-spline patent is now expired.

lynaghk avatar Apr 05 '24 09:04 lynaghk