The newest nxsbuild (built from source in the master branch) cannot process OBJ models that contain face definitions in formats other than f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3 and terminates with "Fatal error: Relative indexes in OBJ are not supported".
Vertex normal indices without texture coordinate indices format
f v1//vn1 v2//vn2 v3//vn3
e.g. f 8//8 1//1 2//2
nxsbuild is able to process only the Vertex normal indices format.
How to reproduce
Compile nxsbuild from the most recent commit on the master branch. Pick an OBJ model whose faces aren't defined in the f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3 format and try to process it in nxsbuild.
An example with a small bunny model of mine:
# (Windows)
# Create a directory for conversion
cd C:/
mkdir nexus_conversions
# Clone repo with a small bunny model
cd nexus_conversions
git clone https://github.com/asmrcek/test-3d-models.git
# Now we'll launch several Nexus conversions of OBJ files.
# We'll assume that you have compiled nxsbuild.exe available e.g. inside C:/nexus/bin/
# Try to convert OBJ file without normals (faces in "f v1/vt1 v2/vt2 v3/vt3" format)
C:/nexus/bin/nxsbuild.exe C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-no-normals.obj -o C:/nexus_conversions/door_rabbit-no-normals.nxs
# (this would be the output of the nxsbuild)
Reading C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-no-normals.obj
Vertices read: 4270
Colors read: 1
Texture: door_rabbit.jpg
Fatal error: Relative indexes in OBJ are not supported
# Try to convert OBJ file without texture coordinates (faces in "f v1//vn1 v2//vn2 v3//vn3" format)
C:/nexus/bin/nxsbuild.exe C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-no-texture-coords.obj -o C:/nexus_conversions/door_rabbit-no-texture-coords.nxs
# (this would be the output of the nxsbuild)
Reading C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-no-texture-coords.obj
Vertices read: 4270
Colors read: 1
Fatal error: Relative indexes in OBJ are not supported
# Try to convert OBJ file without texture coordinates and normals (faces in "f v1 v2 v3" format)
C:/nexus/bin/nxsbuild.exe C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-only-vertices.obj -o C:/nexus_conversions/door_rabbit-only-vertices.nxs
# (this would be the output of the nxsbuild)
Reading C:/nexus_conversions/test-3d-models/models/door_rabbit/reduced/obj/door_rabbit-only-vertices.obj
Vertices read: 4270
Colors read: 1
Fatal error: Relative indexes in OBJ are not supported
Bug description
The newest nxsbuild (built from source in the master branch) cannot process OBJ models that contain face definitions in formats other than
f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3
and terminates with"Fatal error: Relative indexes in OBJ are not supported"
.Details
There are about 4 face definitions formats which can appear in an OBJ model:
f v1 v2 v3
f 97 160 226
f v1/vt1 v2/vt2 v3/vt3
f 42/42 55/56 53/54
f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn
f 1/1/1 2/2/2 3/3/3
f v1//vn1 v2//vn2 v3//vn3
f 8//8 1//1 2//2
nxsbuild is able to process only the Vertex normal indices format.
How to reproduce
Compile nxsbuild from the most recent commit on the master branch. Pick an OBJ model whose faces aren't defined in the
f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3
format and try to process it in nxsbuild.An example with a small bunny model of mine: