News:

 

Topic: Normals in OBJ imported from Houdini get split by NVil  (Read 3769 times)

0 Members and 1 Guest are viewing this topic.

  • No avatar
  • Posts: 976
  • Polygon
September 12, 2017, 02:26:04 pm
I first noticed this problem a long time ago, but I kept forgetting to report this.

NVil incorrectly reads vertex normals of geometry exported from Houdini as .obj files.
I'm attaching a sample geometry, which loads fine in 3D-Coat and Blender, but NVil splits all normals producing hard edges all over the model.

Sample geometry in the attachment.
Video: https://drive.google.com/open?id=0B5_r9d5SdkIvdnBxdjZvLUM3eWs

  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 13, 2017, 12:26:32 pm
I think the imported normal is correct. You must have sharp edge rendering option on, View > Object Shading > Normal/Sharp/Smooth Edge Options >...

  • No avatar
  • Posts: 976
  • Polygon
September 13, 2017, 02:56:17 pm
Nope, that's not it.

Something about NVil doesn't like the file structure generated by Houdini's native OBJ exporter. I've recorded a video in which I'm exporting the same mesh with native exporter, and my custom one which I wrote back in the day when Houdini wasn't capable of writing vertex normals to this geometry file format.

File generated by the native exporter, when imported in NVil, shows inconsequences because it marks all edges as hard (red color), but at the same time displays the geometry correctly in smooth edge shading mode. Note how I'm switching back and forth between smooth and hard edge shading mode. There is a visible difference. However if I transform any component of the mesh, all edges immediately turn into hard ones.

On the other hand, file generated by my exporter is rendered without problems, with hard edges being only where I created them. I wouldn't want to use this exporter anymore though, because it was written in Python and exporting dense meshes is quite slow.

I'm attaching two files for comparison - generated by native and custom exporter. Hopefully you can reproduce the problem because otherwise it would probably mean than my settings got corrupted.

Video: https://drive.google.com/open?id=0B5_r9d5SdkIvUTBpeXRiTUgtV0E

---
I forgot to attach the files.
« Last Edit: September 13, 2017, 03:27:47 pm by rubberDuck »

  • No avatar
  • Posts: 2103
  • Polygon
September 14, 2017, 08:36:17 am
Hi rubberDuck,

I am just posting my observations.

Looking in those last 2 files:-

Sphere_native_exporter.obj:    Vertex normal(count) = 1,104
Sphere_Custom_exporter.obj:    Vertex normal(count) = 290

The object has 48 tri`s and 240 quads, if each polygon was a seperate object, they would have a combined vertex count of 1,104. (each polygon is given its own set of vertex normals)

Due to there being no smooth group, Nvil will be seeing "Sphere_native_exporter.obj" as having hard_edges, due to each of its polygons having their own set of vertex normals.

So (refering to OP) Nvil is not splitting the vertex normals, it is reading them from file and creating the hard_edges based on that info.


  • No avatar
  • Posts: 3760
  • Developer
  • Administrator
  • Polygon
September 14, 2017, 09:57:23 am
I think it is fixed.

  • No avatar
  • Posts: 976
  • Polygon
September 14, 2017, 01:41:46 pm
Fantastic! Thank you Steve for your analysis, and IStonia for fixing the importer. :)
I verified it with a couple of models and it works great.