NURBS import/export

Before I go trying to build out support for NURBS in the FBX importer/exporter, is anyone aware of an existing functional workflow for the import/export of NURBS curves? FBX supports this, but it’s been left out of the plugin for some reason. OBJ also supports it, but it’s not functioning properly at the moment. IGS support seems to be missing, and USD scenes can’t be imported. Perhaps there’s a format/configuration I am overlooking.

3 Likes

I work with curves a lot going back and forth between Rhino and Blender. I tend to use OBJ, but it’s hacky. On importing, the scene has to have a mesh object in order for the curves to import. They do match the Rhino output. When exporting objs, i export polylines and need to rebuild nurbs curves based on the vertices. The workflow is not completely accurate though.

When i did need completely accurate result, I had to write a small script because the weight wasn’t getting picked up properly by the OBJ importer. This was a few years back at v 2.78, so not sure if there’s been any change with the current OBJ importer.

1 Like

I am able to re-import objs (exported from blender) containing nurbs without any extant mesh object, but the paramaterisation is destroyed; the curve is approximated by a dense degree 1 curve. This is 2.83.

This is unrelated to NURBS but just a heads up for FBX in general.
I saw a Developer Update for Godot where Gordon McPherson said he did a lot of work on the FBX import and export compatibilities in Godot which indirectly Blender’s exporter was also going to benefit a lot from (he mentioned that it could eliminate problems with Maya exchanges).

Don’t know how much of this is already done or went into Blender already but he mentioned that he is glad for anyone helping or asking him about this because it was just so much work and he wants anyone to benefit from it. :slight_smile:

Just posting this here, for the chance that it maybe is something that could impact your work.
If not - just ignore this post. :smiley:

1 Like

Very interesting. I might ping him, thank you.

1 Like

As far as I knew this was working, could you report a bug?

sure, it’s trivial to reproduce

Any updates on the subject? I am looking for the best method to export (nurbs) curves to Rhino. Is OBJ still the best practice?

I’m a +1 on that.

I’mma start looking on my side,

So it would be about expanding on rB31d480174a8c

I use both obj and dxf to import curves from Rhino.
It depends how the curves are build in cad, but often the curves have missing parts (i guess higher degree which is not supported)?

1 Like

Hi!

I don’t know if someone could share an OBJ file exported with Rhino with proper curves in it, so we can get started on this issue.

I see where the code is I think I might only need sample data,

Thank you!

2 Likes

I send you something next week.

Until next week I have no licenses available.
I was able to do something simple in Ayam (https://ayam.sourceforge.net/):

Here is the OBJ:

1 Like

Does this already help?

Hi, I have exported for you to test this OBJ from Rhino7: blender.obj

Happy to provide you with different exports, if needed.

A screenshot of the file content:

And the export settings:

3 Likes

I have imported my obj file to Blender:

As you can see all the vertices are imported but, if the spline is open, the end vertices of each spline are ignored in defining the spline.
The round part of the “d”, which is closed, it is drawn properly

Not sure if its the case here but in my testing I have to change degree of all curves to 3 max, Blender has issues with more than that.
…or was it 4?

I have what I believe is a patch for your case @woelund , but it is a surface that I need, not a curve.

I will

  • publish what I have. (There probably is a reason why we segment 3D curves. But maybe not :stuck_out_tongue: )
  • educate myself on Ayam

So I have uploaded a cut of Blender that loads-up surfaces out of .OBJs.

However it’s still not right, with section of the model invisible:

I am pretty sure it is the logic around doing the end-points, cyclic/not

Perhaps that would be the tie-in w/ @Luca 's issue