.obj Export: NURBS curves exported with reverse orientation #72326

Closed
opened 2019-12-10 11:23:20 +01:00 by Christian Hafner · 8 comments

System Information
Operating system: Windows 10 Pro 64-bit
Graphics card: NVIDIA Geforce GTX 1080 Ti

Blender Version
Broken: v2.80
Worked: (unknown)

Description
When exporting a NURBS curve to an .obj file, the vertices of the curve are listed in the "forward" order; but the curve references them in the reverse order. This yields the curve with its orientation reversed.

To reproduce the error:

  1. In an empty file, create a Nurbs Curve.
  • (Optional) Move a vertex of the curve to break the symmetry; this makes it easier to see the error in the exported file.
  1. File > Export > Wavefront (.obj)
  2. Check "Write NURBS"
  3. Export OBJ

Blender file:
curve_a.PNG

OBJ file:
curve_b.PNG

Details
The vertices in the file are listed in the order in which they appear in the curve.
The obj definition "curv 0.0 1.0 -1 -2 -3 -4" uses negative indexing, which counts the vertices starting from the bottom up, yielding the reverse orientation.
This is explained in the .obj specification start from line 652.

**System Information** Operating system: Windows 10 Pro 64-bit Graphics card: NVIDIA Geforce GTX 1080 Ti **Blender Version** Broken: v2.80 Worked: (unknown) **Description** When exporting a NURBS curve to an .obj file, the vertices of the curve are listed in the "forward" order; but the curve references them in the reverse order. This yields the curve with its orientation reversed. **To reproduce the error:** 1. In an empty file, create a Nurbs Curve. - (Optional) Move a vertex of the curve to break the symmetry; this makes it easier to see the error in the exported file. 2. File > Export > Wavefront (.obj) 3. Check "Write NURBS" 4. Export OBJ Blender file: ![curve_a.PNG](https://archive.blender.org/developer/F8204862/curve_a.PNG) OBJ file: ![curve_b.PNG](https://archive.blender.org/developer/F8204864/curve_b.PNG) **Details** The vertices in the file are listed in the order in which they appear in the curve. The obj definition "curv 0.0 1.0 -1 -2 -3 -4" uses negative indexing, which counts the vertices starting from the bottom up, yielding the reverse orientation. This is explained in the [.obj specification ](http://www.martinreddy.net/gfx/3d/OBJ.spec) start from line 652.

Added subscriber: @chafner

Added subscriber: @chafner
Member

Added subscriber: @EitanSomething

Added subscriber: @EitanSomething
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Is this still an issue with 2.83?

Is this still an issue with 2.83?
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Both relative and absolute indices are supported in OBJ for all types. Blender just happens to use it for Curves. The orientation is dependent on the importer and the axis transform the importer does.
Did you try importing the curve back into Blender to see if it was flipped?
Is it problematic for other apps ? If so, in the newer OBJ writer, we can write it in positive indices just like other objects as it's easy to change.

Both relative and absolute indices are supported in OBJ for all types. Blender just happens to use it for Curves. The orientation is dependent on the importer and the axis transform the importer does. Did you try importing the curve back into Blender to see if it was flipped? Is it problematic for other apps ? If so, in the newer OBJ writer, we can write it in positive indices just like other objects as it's easy to change.
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Ankit Meel self-assigned this 2020-10-18 22:04:18 +02:00
Member

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.

Thanks again for the report. If the problem persists please open a new report with the required information.

No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed. Thanks again for the report. If the problem persists please open a new report with the required information.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#72326
No description provided.