OpenSubdiv icon indicating copy to clipboard operation
OpenSubdiv copied to clipboard

NURBS

Open dodenko opened this issue 11 years ago • 8 comments

Hello!

Is it possible to add conversion from NURBS to OpenSubDiv vice versa?

dodenko avatar Dec 27 '13 14:12 dodenko

If you Google "nurbs catmull-clark conversion" you can see what would be involved if OSD was to gain that facility. To be fully useful (i.e. to convert models created from an Alias CAD product), you'd need to be able to convert trimmed NURBS, which requires some heavy duty (for me, anyway ;) math to accomplish without artifacts. Going from a CC surface to a NURBS surface is easier because you can create one untrimmed NURBS patch per CC face. In both cases however (CC>NURBS, NURBS>CC) the conversion will be an approximation so it might not light identically or have precisely the same profile.

meshula avatar Dec 27 '13 19:12 meshula

Yes. That is NURBS -> SubD. That is very very hard. But the other way isn't. That what TSplines, Modo SubdNurbs both do. But none is using Pixar Subd!

dodenko avatar Dec 27 '13 20:12 dodenko

hi, in order to create NURBS patch per cc face, how to get points from far mesh in a form of u v

nnaGitHub avatar Sep 12 '14 22:09 nnaGitHub

You can get the list of control-point indices (the 1-ring) from the FarPatchTables held by the FarMesh. Not sure that's your question though...

manuelk avatar Sep 12 '14 23:09 manuelk

planning to create one nurbs surface per control mesh face. from the examples code came to know that it provides indices for farmesh polygons. How to get indices of farmesh in the form of grid, like 2 dimensional array rows and columns.

nnaGitHub avatar Sep 13 '14 03:09 nnaGitHub

In uniform subdivision, how to get the subdivided mesh points indices in the form of grid not as polygonal faces.

For adaptive subdivision, not able to find sample code to get control-point indices from FarMesh.

nnaGitHub avatar Sep 18 '14 21:09 nnaGitHub

In uniform subdivision, how to get the subdivided mesh points indices in the form of grid not as polygonal faces.

Unless your original mesh is a regular grid, the subdivided mesh isn't either. Although somehow i don't think i am answering what you are really asking for. Please take a look at the code in tutorials/far to see how components are accessed.

For adaptive subdivision, not able to find sample code to get control-point indices from FarMesh.

In 3.0, the FarMesh has been removed - however the Far::PatchTables remains and is mostly unchanged. You can use this table to get to the list of CVs of the bi-cubic patches. There are code samples on how to create and manipulate the PatchTables in tutorials/far.

manuelk avatar Oct 06 '14 18:10 manuelk

Filed as internal issue #151677.

jtran56 avatar Sep 30 '17 01:09 jtran56