Rhino 8 export. OBJ VertexWelding does not work

I use rhino7 and rhino8 to export a basic box model, the format is obj, and the options are these: UseRenderMeshes = Yes VertexWelding=Welded NgonMode = None, but I open the obj file with notepad to check and find that the obj exported by rhino8 divides the six faces of the box into 6 objects, but the obj exported by rhino7 successfully merges the grid of the box into one object.

# Rhino

mtllib rhino8.mtl
g ___
o rhino8
usemtl diffuse_0_0_0_255
v -5.3726487159729004 0 8.3460140228271484
v -5.3726487159729004 5.5512294769287109 8.3460140228271484
v 1.6732470989227295 0 8.3460140228271484
v 1.6732470989227295 5.5512294769287109 8.3460140228271484
vt 0.37880834937095642 0
vt 0.19013659656047821 0
vt 0.37880834937095642 0.23986595869064331
vt 0.19013659656047821 0.23986595869064331
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
f 4/4/4 2/2/2 1/1/1 3/3/3
o rhino8
usemtl diffuse_0_0_0_255
v 1.6732470989227295 0 8.3460140228271484
v 1.6732470989227295 5.5512294769287109 8.3460140228271484
v 1.6732470989227295 0 -13.804097175598145
v 1.6732470989227295 5.5512294769287109 -13.804097175598145
vt 0.37880834937095642 0.24133080244064331
vt 0.19013659656047821 0.24133080244064331
vt 0.37880834937095642 0.99853515625
vt 0.19013659656047821 0.99853515625
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 1 0 0
f 8/8/8 6/6/6 5/5/5 7/7/7
o rhino8
usemtl diffuse_0_0_0_255
v 1.6732470989227295 0 -13.804097175598145
v 1.6732470989227295 5.5512294769287109 -13.804097175598145
v -5.3726487159729004 0 -13.804097175598145
v -5.3726487159729004 5.5512294769287109 -13.804097175598145
vt 0.18867175281047821 0
vt 0 0
vt 0.18867175281047821 0.23986595869064331
vt 0 0.23986595869064331
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
f 12/12/12 10/10/10 9/9/9 11/11/11
o rhino8
usemtl diffuse_0_0_0_255
v -5.3726487159729004 0 -13.804097175598145
v -5.3726487159729004 5.5512294769287109 -13.804097175598145
v -5.3726487159729004 0 8.3460140228271484
v -5.3726487159729004 5.5512294769287109 8.3460140228271484
vt 0.18867175281047821 0.24133080244064331
vt 0 0.24133080244064331
vt 0.18867175281047821 0.99853515625
vt 0 0.99853515625
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn -1 0 0
f 16/16/16 14/14/14 13/13/13 15/15/15
o rhino8
usemtl diffuse_0_0_0_255
v -5.3726487159729004 0 8.3460140228271484
v 1.6732470989227295 0 8.3460140228271484
v -5.3726487159729004 0 -13.804097175598145
v 1.6732470989227295 0 -13.804097175598145
vt 0.86146998405456543 0
vt 0.62160402536392212 0
vt 0.86146998405456543 0.75866919755935669
vt 0.62160402536392212 0.75866919755935669
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
f 20/20/20 18/18/18 17/17/17 19/19/19
o rhino8
usemtl diffuse_0_0_0_255
v -5.3726487159729004 5.5512294769287109 8.3460140228271484
v -5.3726487159729004 5.5512294769287109 -13.804097175598145
v 1.6732470989227295 5.5512294769287109 8.3460140228271484
v 1.6732470989227295 5.5512294769287109 -13.804097175598145
vt 0.38027319312095642 0
vt 0.38027319312095642 0.75866919755935669
vt 0.62013918161392212 0
vt 0.62013918161392212 0.75866919755935669
vn 0 1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
f 24/24/24 22/22/22 21/21/21 23/23/23
# Rhino

mtllib rhino7.mtl
g rhino7
o rhino7
usemtl diffuse_0
v -13.510058403015137 0 13.948855400085449
v -13.510058403015137 15.907227516174316 13.948855400085449
v 21.957818984985352 0 13.948855400085449
v 21.957818984985352 15.907227516174316 13.948855400085449
v 21.957818984985352 0 -10.622536659240723
v 21.957818984985352 15.907227516174316 -10.622536659240723
v -13.510058403015137 0 -10.622536659240723
v -13.510058403015137 15.907227516174316 -10.622536659240723
vt 0 0.21579603850841522
vt 0 0.43012723326683044
vt 0.48115408420562744 0.21579603850841522
vt 0.48115408420562744 0.43012723326683044
vt 0 0.67216914892196655
vt 0 0.88796514272689819
vt 0.3318684995174408 0.67216914892196655
vt 0.3318684995174408 0.88796514272689819
vt 0 0
vt 0 0.21433119475841522
vt 0.48115408420562744 0
vt 0.48115408420562744 0.21433119475841522
vt 0 0.43159207701683044
vt 0 0.64738810062408447
vt 0.3318684995174408 0.43159207701683044
vt 0.3318684995174408 0.64738810062408447
vt 0.66666668653488159 0
vt 0.66666668653488159 0.48115408420562744
vt 0.99853515625 0
vt 0.99853515625 0.48115408420562744
vt 0.66520184278488159 0.43159207701683044
vt 0.3333333432674408 0.43159207701683044
vt 0.66520184278488159 0.91128134727478027
vt 0.3333333432674408 0.91128134727478027
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
f 2/2/2 1/1/1 3/3/3 4/4/4
f 4/6/6 3/5/5 5/7/7 6/8/8
f 6/10/10 5/9/9 7/11/11 8/12/12
f 8/14/14 7/13/13 1/15/15 2/16/16
f 3/18/18 1/17/17 7/19/19 5/20/20
f 8/22/22 2/21/21 4/23/23 6/24/24

rhino7.obj (1.7 KB)
rhino8.obj (2.6 KB)

Hi Pan - I do not see this here - can you please post the V7 and V8 files you are starting with, and the exact settings you are using on the Mesh page of the export dialogs.

-Pascal

This is a screenshot of the settings for exporting selected objects in Rhino 7 and Rhino 8. My mesh is simple, it is a default box.

V7

V8

@Pan_Chan hi, I saw the message on import_3dm issues tracker. I just tested with a simple box exporting that to OBJ in Rhino 8 using the same settings as you show in your screenshots. This is the box I get with Rhino 8:

# Rhino

mtllib box_test.mtl
g Default
o object_1
usemtl diffuse_ControlText
v -8.955592155456543 0 5.7894735336303711
v -8.955592155456543 8.2798700332641602 5.7894735336303711
v 16.614583969116211 0 5.7894735336303711
v 16.614583969116211 8.2798700332641602 5.7894735336303711
v 16.614583969116211 0 -7.7796053886413574
v 16.614583969116211 8.2798700332641602 -7.7796053886413574
v -8.955592155456543 0 -7.7796053886413574
v -8.955592155456543 8.2798700332641602 -7.7796053886413574
vt 0 0
vt 0 0.61688739061355591
vt 0.32665640115737915 0
vt 0.32665640115737915 0.61688739061355591
vt 0.32665640115737915 0
vt 0.32665640115737915 0.61688739061355591
vt 0.5 0
vt 0.5 0.61688739061355591
vt 0.5 0
vt 0.5 0.61688739061355591
vt 0.82665640115737915 0
vt 0.82665640115737915 0.61688739061355591
vt 0.82665640115737915 0
vt 0.82665640115737915 0.61688739061355591
vt 1 0
vt 1 0.61688739061355591
vt 0 1
vt 0.32665640115737915 1
vt 0.32665640115737915 0.61688804626464844
vt 0 0.61688804626464844
vt 0.67334359884262085 0.61688804626464844
vt 1 0.61688804626464844
vt 1 1
vt 0.67334359884262085 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
f 1/1/1 3/3/3 4/4/4 2/2/2
f 3/5/5 5/7/7 6/8/8 4/6/6
f 5/9/9 7/11/11 8/12/12 6/10/10
f 7/13/13 1/15/15 2/16/16 8/14/14
f 3/18/18 1/17/17 7/20/20
f 7/20/20 5/19/19 3/18/18
f 4/22/22 8/24/24 2/21/21
f 8/24/24 4/22/22 6/23/23

Just one object.





In Meshes options ,if you take “Use render meshes”, will export 6 objects!

When I also check Use render meshes I still get only one object:

# Rhino

mtllib boxtest2.mtl
g Default
o object_1
usemtl diffuse_ControlText
v -1.8417494297027588 0 -6.7309789657592773
v -1.8417494297027588 16.292375564575195 -6.7309789657592773
v -1.8417494297027588 0 7.5834946632385254
v -1.8417494297027588 16.292375564575195 7.5834946632385254
v 11.35096263885498 0 7.5834946632385254
v 11.35096263885498 16.292375564575195 7.5834946632385254
v 11.35096263885498 0 -6.7309789657592773
v 11.35096263885498 16.292375564575195 -6.7309789657592773
vt 0 0
vt 0 0.69087600708007812
vt 0.26019516587257385 0
vt 0.26019516587257385 0.69087600708007812
vt 0.26019516587257385 0
vt 0.26019516587257385 0.69087600708007812
vt 0.5 0
vt 0.5 0.69087600708007812
vt 0.5 0
vt 0.5 0.69087600708007812
vt 0.76019519567489624 0
vt 0.76019519567489624 0.69087600708007812
vt 0.76019519567489624 0
vt 0.76019519567489624 0.69087600708007812
vt 1 0
vt 1 0.69087600708007812
vt 0 1
vt 0.26019516587257385 1
vt 0.26019516587257385 0.69087666273117065
vt 0 0.69087666273117065
vt 0.73980480432510376 0.69087666273117065
vt 1 0.69087666273117065
vt 1 1
vt 0.73980480432510376 1
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn -1 0 0
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 0 0 1
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 1 0 0
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn 0 0 -1
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 -1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
vn 0 1 0
f 1/1/1 3/3/3 4/4/4 2/2/2
f 3/5/5 5/7/7 6/8/8 4/6/6
f 5/9/9 7/11/11 8/12/12 6/10/10
f 7/13/13 1/15/15 2/16/16 8/14/14
f 3/18/18 1/17/17 7/20/20
f 7/20/20 5/19/19 3/18/18
f 4/22/22 8/24/24 2/21/21
f 8/24/24 4/22/22 6/23/23

Perhaps share the results of the Rhino command _SystemInfo, that might shed some light on the results you’re seeing.

When I uncheck Use render meshes I get only one object.
but when check Use render meshes will get six objects.
This is my _SystemInfo report:

Rhino 8 SR10 2024-8-13 (Rhino 8, 8.10.24226.13001, Git hash:master @ c36ab43d576d4854b29b091b6b3a38e09decabf5)
License type: Commercial, build 2024-08-13
License details: Stand-Alone

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.0

Computer platform: DESKTOP 

Standard graphics configuration.
  Primary display and OpenGL: NVIDIA GeForce RTX 3070 (NVidia) Memory: 8GB, Driver date: 6-23-2023 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 536.40
    > Accelerated graphics device with 4 adapter port(s)
        - Windows Main Display attached to adapter port #0

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 6-23-2023
  Driver Version: 31.0.15.3640
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 8 GB

Rhino plugins that do not ship with Rhino
  C:\Users\CP\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\KeyShot11RhinoPlugin (55124e8a-aa81-4be8-8e12-9f452c473970)\1.0.0.0\KeyShot11RhinoPlugin\Rhino 7\KeyShot11RhinoPlugin.rhp	"KeyShot11RhinoPlugin"	1.0.0.0
  D:\Blender\插件修改\Rhino to blender插件重新修改obj\Rhino-to-blender-edit-only-me\rename_obj-rhino里的插件制作\rename_obj\rename_obj_bylayer.rhp	"rename_obj_bylayer"	0.2.8994.21392
 

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino 8\Plug-ins\Commands.rhp	"Commands"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp	"SectionTools"	
  C:\Program Files\Rhino 8\Plug-ins\export_OBJ.rhp	"export_OBJ"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp	"MeshCommands"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp	"Displacement"	
  C:\Program Files\Rhino 8\Plug-ins\IronPython\RhinoDLR_Python.rhp	"IronPython"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	8.10.24226.13001
  C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"

Can you see what’s causing this problem?

Although unlikely I would disable both your own plug-in as the keyshot plug-in and see if that changes the results.

I am testing with an internal 8.11 build, I don’t know if there have been changes to OBJ export between 8.9 and 8.10, and 8.10 and 8.11 that could affect this issue. @tim do you know if there have been changes that could explain the issue @chen8 is seeing?

It shouldn’t be a problem with non-rhino plugins. I have disabled all non-rhino default plugins, but the result is still the same.

Hi chen,

I can’t think of any changes in OBJ export that would cause what you’re seeing but your initial report was last November and I honestly can’t remember back that far. I will look at the changelog in the meantime and see if anything stands out.

I tried both platforms with “Use render meshes” and I’m getting the same results as Nathan. (I thought, based on the look of the dialogs that you were using Mac, but now I realize those were Nathan’s.)

What you’re describing is odd. I would understand it if the ‘o’ names were different. Or if the ‘usemtl’ names were different. They’re the same though so I don’t understand why the sides would get split up like that.

Why don’t you give me your model so I can see what’s going on in a debugger. Before saving, run ExtractRenderMesh, then I’ll be sure to have both the object, and the mesh, and I can try exporting a couple of ways.

Tim

Hi Tim,
This is my 3dm file, obj.3dm (64.3 KB),just a box and it`s render mesh.

@tim looks like polysurfaces get exported in an exploded manner. Attached an open polysurface contstructed of two separate planes joined together. The OBJ file contains two objects instead of just one.

open_polysurface_for_obj_export.3dm (70.3 KB)

and the resulting OBJ file

polysurface_export.obj (807 Bytes)

Hi Chen,

OK. I can repeat this now when the box is a polysurface, extrusions (the default) work.

Looks like this happened as a consequence of the change made for this issue, https://mcneel.myjetbrains.com/youtrack/issue/RH-67571/File-IO-Render-meshes-of-Edge-softening-did-not-export-to-OBJ. I’ll see if joining the meshes, there is a mesh per face, after the call to RhinoObject.RenderMeshes will fix the export without breaking edge softening stuff we were trying to fix.

In the meantime, if you create your box as an extrusion it will work the way that is expected. You can do this by running UseExtrusions and selecting Extrusion.

Tim

There’s a new YouTrack issue to track this. https://mcneel.myjetbrains.com/youtrack/issue/RH-83395 I have a fix done for it, just waiting for someone smarter than me to look over the changes I made before I try to merge it.

Tim