OBJ export: Smoothing group issue #68807

Closed
opened 2019-08-18 22:42:49 +02:00 by cameron casey · 8 comments

System Information
Operating system: Win 10
Graphics card: GTX 1070 ti

Blender Version
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) 2.80
Worked: (optional) it works fine in 2.79

Short description of error
If you export a shaded object as an obj with smoothing groups checked off in the settings it makes every edge a sharp on that object. but you don't know until you reimport it. Even if you try to fix the object it still seems to have shading issues. This doesn't happen in 2.79 so I assume its a bug.
Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).
Subdivide a cube. make your cube shaded. export as obj file. check smoothing groups on as you export it. Import the obj back in to blender and look at it in edit mode.

**System Information** Operating system: Win 10 Graphics card: GTX 1070 ti **Blender Version** Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) 2.80 Worked: (optional) it works fine in 2.79 **Short description of error** If you export a shaded object as an obj with smoothing groups checked off in the settings it makes every edge a sharp on that object. but you don't know until you reimport it. Even if you try to fix the object it still seems to have shading issues. This doesn't happen in 2.79 so I assume its a bug. **Exact steps for others to reproduce the error** Based on the default startup or an attached .blend file (as simple as possible). Subdivide a cube. make your cube shaded. export as obj file. check smoothing groups on as you export it. Import the obj back in to blender and look at it in edit mode.
Author

Added subscriber: @cameroncasey3d

Added subscriber: @cameroncasey3d
Philipp Oeser changed title from Smoothing group issue to OBJ export: Smoothing group issue 2019-08-19 12:24:40 +02:00
Member

Added subscribers: @mont29, @lichtwerk

Added subscribers: @mont29, @lichtwerk
Member

Hm, not sure I understand correctly:

Here is a file with half flat, half smooth shaded faces:

#68807.blend

  • in 2.80, when object exports with smoothing groups OFF, reimport (with smoothing groups ON) will result in an edgeloop in the middle being marked sharp
  • in 2.80, when object exports with smoothing groups OFF, reimport (with smoothing groups OFF) will result in all flat shaded faces being marked sharp

this seems to match 2.79 behavior exactly?

@cameroncasey3d : could you check that example and state if this is unexpected behavior for you? Or provide a better example?

@mont29: if I try to export above file from master with Smooth Groups option ON I am getting following assert:
BLI_assert failed: /blender/source/blender/blenkernel/intern/mesh_mapping.c:738, poly_edge_loop_islands_calc(), at '(((poly_groups[*p]) == (0)) || ((poly_groups[*p]) == (poly_group_id)))'

Hm, not sure I understand correctly: Here is a file with half flat, half smooth shaded faces: [#68807.blend](https://archive.blender.org/developer/F7672935/T68807.blend) - in 2.80, when object exports with smoothing groups OFF, reimport (with smoothing groups ON) will result in an edgeloop in the middle being marked sharp - in 2.80, when object exports with smoothing groups OFF, reimport (with smoothing groups OFF) will result in all flat shaded faces being marked sharp this seems to match 2.79 behavior exactly? @cameroncasey3d : could you check that example and state if this is unexpected behavior for you? Or provide a better example? @mont29: if I try to export above file from master with `Smooth Groups` option `ON` I am getting following assert: `BLI_assert failed: /blender/source/blender/blenkernel/intern/mesh_mapping.c:738, poly_edge_loop_islands_calc(), at '(((poly_groups[*p]) == (0)) || ((poly_groups[*p]) == (poly_group_id)))'`
Author

@lichtwerk https://i.imgur.com/MSg1eS1.gifv I made a gif to show you the issue. Youre thinking of the wrong checkbox. Also I meant to say when its checked on not off thats why there was confusion Im sorry

@lichtwerk https://i.imgur.com/MSg1eS1.gifv I made a gif to show you the issue. Youre thinking of the wrong checkbox. Also I meant to say when its checked on not off thats why there was confusion Im sorry
Member

Yes poly_edge_loop_islands_calc or something related seems broken in a way (will check further).

And just as a note: since above is also used in mesh_calc_islands_loop_poly_uv I smell a connection to blender/blender#68954, blender/blender#69035 (pure speculation atm. though...)

Yes `poly_edge_loop_islands_calc` or something related seems broken in a way (will check further). And just as a note: since above is also used in `mesh_calc_islands_loop_poly_uv` I smell a connection to blender/blender#68954, blender/blender#69035 (pure speculation atm. though...)
Bastien Montagne was assigned by Philipp Oeser 2019-08-22 22:10:13 +02:00
Member

This is caused by blender/blender@2e91fc39ac
@mont29: mind checking on D5561?

This is caused by blender/blender@2e91fc39ac @mont29: mind checking on [D5561](https://archive.blender.org/developer/D5561)?

This issue was referenced by blender/blender@ae0b855a32

This issue was referenced by blender/blender@ae0b855a32ddcffb146d66407785f36e277b631c
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#68807
No description provided.