Alembic doesn't export custom normals correctly #56792

Closed
opened 4 years ago by Ruben-1 · 34 comments

System Information
Windows 10 and GTX 970
Blender Version
Broken: 2.79

Short description of error
When trying to export a mesh with custom normals as Alembic they are not exported correctly. If the mesh shading was set as smooth or flat before adding the custom normals you get that after reimporting the Alembic file.

If I try to import it in other programs like Marmoset Toolbag, 3ds Max 2016 or Maya 2018 the shading is full of errors if the box "Normals" was ticked during export, even if there were no custom normals to export.

Mesh with custom normals (I apply the Data transfer modifier before exporting):
1.jpg

Mesh after being reimported:
2.jpg

Mesh after being imported in Marmoset:
3.jpg

Mesh in Maya:
6.jpg

The mesh in the left is it without custom normals, only "smooth" but with "Normals" ticked during export, the one in the right is the one of the previous images but in 3ds Max, also with broken normals:
4.jpg

5.jpg

Exact steps for others to reproduce the error

  1. Make any type of mesh or use the one in the file.
  2. Add custom normals to it, like adding Data Transfer with a sphere overlapping the mesh to transfer its normals, like I did in the first image (remember to have Auto Smooth unselected).
  3. Apply Data Transfer or any modifiers.
  4. Export the mesh as Alembic with "Normals" selected.
  5. Reimport.

alembicbug.blend

**System Information** Windows 10 and GTX 970 **Blender Version** Broken: 2.79 **Short description of error** When trying to export a mesh with custom normals as Alembic they are not exported correctly. If the mesh shading was set as smooth or flat before adding the custom normals you get that after reimporting the Alembic file. If I try to import it in other programs like Marmoset Toolbag, 3ds Max 2016 or Maya 2018 the shading is full of errors if the box "Normals" was ticked during export, even if there were no custom normals to export. Mesh with custom normals (I apply the Data transfer modifier before exporting): ![1.jpg](https://archive.blender.org/developer/F4687321/1.jpg) Mesh after being reimported: ![2.jpg](https://archive.blender.org/developer/F4687230/2.jpg) Mesh after being imported in Marmoset: ![3.jpg](https://archive.blender.org/developer/F4687229/3.jpg) Mesh in Maya: ![6.jpg](https://archive.blender.org/developer/F4687397/6.jpg) The mesh in the left is it without custom normals, only "smooth" but with "Normals" ticked during export, the one in the right is the one of the previous images but in 3ds Max, also with broken normals: ![4.jpg](https://archive.blender.org/developer/F4687270/4.jpg) ![5.jpg](https://archive.blender.org/developer/F4687310/5.jpg) **Exact steps for others to reproduce the error** 1. Make any type of mesh or use the one in the file. 2. Add custom normals to it, like adding Data Transfer with a sphere overlapping the mesh to transfer its normals, like I did in the first image (remember to have Auto Smooth unselected). 3. Apply Data Transfer or any modifiers. 4. Export the mesh as Alembic with "Normals" selected. 5. Reimport. [alembicbug.blend](https://archive.blender.org/developer/F4687509/alembicbug.blend)
Poster

Added subscriber: @Ruben-1

Added subscriber: @Ruben-1
mont29 commented 4 years ago
Owner

Added subscribers: @dr.sybren, @mont29

Added subscribers: @dr.sybren, @mont29
dr.sybren was assigned by mont29 4 years ago
mont29 commented 4 years ago
Owner

@dr.sybren that one is for you I think?

@dr.sybren that one is for you I think?

Added subscriber: @SanteriHolm

Added subscriber: @SanteriHolm

This bug still seems to exist and is really getting in the way of our pipeline.
I did some digging and seems like blenders vertex normals are exported to point normals
blender_custom_vertex_normals.jpg

houdini_blender_alembic_import_.jpg

This bug still seems to exist and is really getting in the way of our pipeline. I did some digging and seems like blenders vertex normals are exported to point normals ![blender_custom_vertex_normals.jpg](https://archive.blender.org/developer/F6540060/blender_custom_vertex_normals.jpg) ![houdini_blender_alembic_import_.jpg](https://archive.blender.org/developer/F6540064/houdini_blender_alembic_import_.jpg)

Added subscriber: @SteffenD

Added subscriber: @SteffenD

Added subscriber: @martinium

Added subscriber: @martinium

Hello,

Yes seems like we have the same problem with Alembic export. FBX or obj export works correctly but Alembic doesn't.
blender_abc-Normals.jpg

3dsMax_2019_abc_vs_fbx.jpg
Blender version hash is 893fa59831

Thanks,
Martin

Hello, Yes seems like we have the same problem with Alembic export. FBX or obj export works correctly but Alembic doesn't. ![blender_abc-Normals.jpg](https://archive.blender.org/developer/F7001079/blender_abc-Normals.jpg) ![3dsMax_2019_abc_vs_fbx.jpg](https://archive.blender.org/developer/F7001078/3dsMax_2019_abc_vs_fbx.jpg) Blender version hash is 893fa598319e Thanks, Martin

Added subscriber: @Micah-13

Added subscriber: @Micah-13

I have had the exact same problem these guys ave had. The only way to fix this that I know of is to import the file into cinema 4D, then export again. This will fix the normals. The issue is, it makes the file size bigger. This is extremely inconvenient.

I have had the exact same problem these guys ave had. The only way to fix this that I know of is to import the file into cinema 4D, then export again. This will fix the normals. The issue is, it makes the file size bigger. This is extremely inconvenient.
Collaborator

@Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too.

@Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too.

In #56792#713769, @dr.sybren wrote:
@Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too.

Hi @dr.sybren,

I can send you alembic with broken normals from blender, and correct ABC of the same model from 3ds max or Houdini. Would that work for you?

> In #56792#713769, @dr.sybren wrote: > @Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too. Hi @dr.sybren, I can send you alembic with broken normals from blender, and correct ABC of the same model from 3ds max or Houdini. Would that work for you?
Collaborator

I already have a fix waiting for 2.81 in D5191, which I'll commit when the repository is open for new features again (it's now locked in preparation of the 2.80 release). If that fix is in and doesn't help, then I'd really appreciate some files to test with :)

I already have a fix waiting for 2.81 in [D5191](https://archive.blender.org/developer/D5191), which I'll commit when the repository is open for new features again (it's now locked in preparation of the 2.80 release). If that fix is in and doesn't help, then I'd really appreciate some files to test with :)

In #56792#713769, @dr.sybren wrote:
@Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too.

@dr.sybren sorry for late reply

I have a version exported from blender and another re-exported from cinema 4D.
I would prefer to send it to you privately. Is that Okay? Edit: [Removed]

> In #56792#713769, @dr.sybren wrote: > @Micah-13 can you make a simple test case for me, with a Blend file, the ABC as exported from Blender, and the ABC re-exported from Cinema 4D? Then I have an example of what the data in the Alembic file should be, and can work to make Blender export that too. @dr.sybren sorry for late reply I have a version exported from blender and another re-exported from cinema 4D. I would prefer to send it to you privately. Is that Okay? Edit: [Removed]
mont29 commented 4 years ago
Owner

@Micah-13 hey, we do not accept that kind of private sharing on this tracker, this is against out policy. You should be able to reproduce the issue with a dummy test-case file (or maybe with a limited sub-set of your original scene that you could share publicly)? In general anyway, it’s much easier for us to work on the smallest possible file, rather than 'real life' ones.

@Micah-13 hey, we do not accept that kind of private sharing on this tracker, this is against out policy. You should be able to reproduce the issue with a dummy test-case file (or maybe with a limited sub-set of your original scene that you could share publicly)? In general anyway, it’s much easier for us to work on the smallest possible file, rather than 'real life' ones.

In #56792#725148, @mont29 wrote:
@Micah-13 hey, we do not accept that kind of private sharing on this tracker, this is against out policy. You should be able to reproduce the issue with a dummy test-case file (or maybe with a limited sub-set of your original scene that you could share publicly)? In general anyway, it’s much easier for us to work on the smallest possible file, rather than 'real life' ones.

Okay, thanks for telling me. I removed my e-mail as well just in case. I have uploaded them here. If you use maya or Unity, you can test the results to get a better picture of what I am talking about.
Is this okay?
hand cinema 4d re-export.abc
hand blender export.abc

> In #56792#725148, @mont29 wrote: > @Micah-13 hey, we do not accept that kind of private sharing on this tracker, this is against out policy. You should be able to reproduce the issue with a dummy test-case file (or maybe with a limited sub-set of your original scene that you could share publicly)? In general anyway, it’s much easier for us to work on the smallest possible file, rather than 'real life' ones. Okay, thanks for telling me. I removed my e-mail as well just in case. I have uploaded them here. If you use maya or Unity, you can test the results to get a better picture of what I am talking about. Is this okay? [hand cinema 4d re-export.abc](https://archive.blender.org/developer/F7615068/hand_cinema_4d_re-export.abc) [hand blender export.abc](https://archive.blender.org/developer/F7615067/hand_blender_export.abc)
mont29 commented 4 years ago
Owner

thanks for the files, now it’s time for our Alembic magician (aka @dr.sybren) to investigate again. :)

thanks for the files, now it’s time for our Alembic magician (aka @dr.sybren) to investigate again. :)
Collaborator

@Micah-13 without the source Blend file those ABC files are a bit pointless, since I cannot re-do the export I also can't tell whether it's fixed or not.

The file in the original Task (by @Ruben-1) is properly exported after applying D5191.

@Micah-13 without the source Blend file those ABC files are a bit pointless, since I cannot re-do the export I also can't tell whether it's fixed or not. The file in the original Task (by @Ruben-1) is properly exported after applying [D5191](https://archive.blender.org/developer/D5191).

I don't know if this helps, but I prepared some ABC files in Blender and Houdini which show that Blender currently ignores / destroys the custom normals both on import and on export.
I have an original car hood geometry that looks perfect in Blender. I exported it as an FBX and import it into Houdini. Normals are still OK. Then I export it as an Alembic from Houdini. The normals are still OK, but they aren't imported correctly in Blender.
If I export the geometry with the correct normals as an Alembic from Blender, the normals are being garbled during export. If I import it in Houdini it looks like this:
Screenshot from 2019-07-18 14-42-18.png

If I import this ABC in Blender, normals are being ignored again. I attached the two ABC files, the original blend file and some screenshots. I hope this helps in finding a solid solution, because this is a major concern for us that kind of renders the usage of this important industry standard useless at the moment.
Alembic_Normals.png
The effect is most visible in the lower part of the hood where the manufacturers logo will be attached.

Alembic_Normals_v01.blend

Alembic_Normals_from_Houdini.abc

Alembic_Normals_from_Blender.abc

I don't know if this helps, but I prepared some ABC files in Blender and Houdini which show that Blender currently ignores / destroys the custom normals both on import and on export. I have an original car hood geometry that looks perfect in Blender. I exported it as an FBX and import it into Houdini. Normals are still OK. Then I export it as an Alembic from Houdini. The normals are still OK, but they aren't imported correctly in Blender. If I export the geometry with the correct normals as an Alembic from Blender, the normals are being garbled during export. If I import it in Houdini it looks like this: ![Screenshot from 2019-07-18 14-42-18.png](https://archive.blender.org/developer/F7616433/Screenshot_from_2019-07-18_14-42-18.png) If I import this ABC in Blender, normals are being ignored again. I attached the two ABC files, the original blend file and some screenshots. I hope this helps in finding a solid solution, because this is a major concern for us that kind of renders the usage of this important industry standard useless at the moment. ![Alembic_Normals.png](https://archive.blender.org/developer/F7616437/Alembic_Normals.png) The effect is most visible in the lower part of the hood where the manufacturers logo will be attached. [Alembic_Normals_v01.blend](https://archive.blender.org/developer/F7616439/Alembic_Normals_v01.blend) [Alembic_Normals_from_Houdini.abc](https://archive.blender.org/developer/F7616440/Alembic_Normals_from_Houdini.abc) [Alembic_Normals_from_Blender.abc](https://archive.blender.org/developer/F7616441/Alembic_Normals_from_Blender.abc)

@dr.sybren Right if that is the case I will wait for the fix to be implemented and try again. Did you say it will be in 2.81?

@dr.sybren Right if that is the case I will wait for the fix to be implemented and try again. Did you say it will be in 2.81?
Collaborator

In #56792#726218, @SteffenD wrote:
this is a major concern for us that kind of renders the usage of this important industry standard useless at the moment.

Yes, I know, which is why I wrote a fix in D5191. Indeed it'll be in 2.81.

> In #56792#726218, @SteffenD wrote: > this is a major concern for us that kind of renders the usage of this important industry standard useless at the moment. Yes, I know, which is why I wrote a fix in [D5191](https://archive.blender.org/developer/D5191). Indeed it'll be in 2.81.

@dr.sybren Great to hear! Thanks for your support!

@dr.sybren Great to hear! Thanks for your support!

Thanks, Sybren! Do you have an idea when we can expect 2.81 to be open so we can test it?

Cheers,
Martin

Thanks, Sybren! Do you have an idea when we can expect 2.81 to be open so we can test it? Cheers, Martin

@dr.sybren : I just gave the very latest master ( 7f29fc7415 ) a quick try and now the normals are perfect for both Alembic im- and export. Much appreciated! Thanks!

@dr.sybren : I just gave the very latest master ( 7f29fc7415a4 ) a quick try and now the normals are perfect for both Alembic im- and export. Much appreciated! Thanks!
Collaborator

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
dr.sybren closed this issue 4 years ago
Collaborator

Thanks for confirming :)

Thanks for confirming :)
paulC commented 4 years ago

Added subscriber: @paulC

Added subscriber: @paulC
paulC commented 4 years ago

Just tryed it, look like it work in 2.81, thanks for the Fix!

Just tryed it, look like it work in 2.81, thanks for the Fix!
Bogu commented 3 years ago

Added subscriber: @Bogu

Added subscriber: @Bogu
Bogu commented 3 years ago

Problem still occurs in Blender 2.82 and 2.83 despite working in 2.81.

Problem still occurs in Blender 2.82 and 2.83 despite working in 2.81.
Collaborator

@Bogu I can't reproduce the issue with Blender 2.83 beta (668867558e) and the example file & steps in this task. Please write a new bug report, with a clear description of what you see, what you expected to see, an example blend file, and steps to reproduce.

@Bogu I can't reproduce the issue with Blender 2.83 beta (668867558e) and the example file & steps in this task. Please write a new bug report, with a clear description of what you see, what you expected to see, an example blend file, and steps to reproduce.
Bogu commented 3 years ago

@dr.sybren when I want to export alembic file in 2.82 it has smooth shading all the way despite sharp edges, or auto smooth option toggled on.

Here is an alembic file of a screw that changes it's length over time download file . When exported originally from Blender 2.82 it had proper normals (it was a array based object). When imported as abc normals are gone, everything is smooth shaded and auto smooth option is greyed out. Then I import the same alembic to Blender 2.81 and here the screw is all flat shaded, though I can use autosmooth. Auto smoothed mesh exports properly

To reproduce this bug just import downloaded file into blender 2.82 and try to set proper normals to it and export. Then import back again to check if normals work. They won't. In 2.81 however they do.

@dr.sybren when I want to export alembic file in 2.82 it has smooth shading all the way despite sharp edges, or auto smooth option toggled on. Here is an alembic file of a screw that changes it's length over time **[download file ](https://drive.google.com/file/d/1w7XnD9UF4WoMzfuR_y79qFdJqMkn0_SD/view?usp=sharing)**. When exported originally from Blender 2.82 it had proper normals (it was a array based object). When imported as abc normals are gone, everything is smooth shaded and auto smooth option is greyed out. Then I import the same alembic to Blender 2.81 and here the screw is all flat shaded, though I can use autosmooth. Auto smoothed mesh exports properly **To reproduce this bug just import downloaded file into blender 2.82 and try to set proper normals to it and export. Then import back again to check if normals work. They won't. In 2.81 however they do.**
Collaborator

@Bogu Please, as I said, write a new bug report (so in Blender choose Help → Report a Bug). Please include concrete steps to reproduce; "set proper normals to it" is not something that is reproducable. Also please attach files to the report, rather than offering a download link; this is done by dragging the file & dropping it into the text area. That way the file is maintained as reference in the bug tracker.

@Bogu Please, as I said, write a new bug report (so in Blender choose Help → Report a Bug). Please include concrete steps to reproduce; "set proper normals to it" is not something that is reproducable. Also please attach files to the report, rather than offering a download link; this is done by dragging the file & dropping it into the text area. That way the file is maintained as reference in the bug tracker.
Bogu commented 3 years ago

This comment was removed by @Bogu

*This comment was removed by @Bogu*
Sign in to join this conversation.
No Label
Interest/Alembic
Interest/Animation & Rigging
Interest/Asset Browser
Interest/Asset Browser Project Overview
Interest/Audio
Interest/Automated Testing
Interest/Blender Asset Bundle
Interest/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
Interest/Eevee & Viewport
Interest/Freestyle
Interest/Geometry Nodes
Interest/Grease Pencil
Interest/ID Management
Interest/Images & Movies
Interest/Import/Export
Interest/Line Art
Interest/Masking
Interest/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
Interest/Python API
Interest/Render & Cycles
Interest/Render Pipeline
Interest/Sculpt, Paint & Texture
Interest/Text Editor
Interest/Translations
Interest/Triaging
Interest/Undo
Interest/USD
Interest/User Interface
Interest/UV Editing
Interest/VFX & Video
Interest/Video Sequencer
Interest/Virtual Reality
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/Asset Browser (Archived)
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Code Quest
legacy project/Datablocks and Libraries
legacy project/Eevee
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/GPU / Viewport
legacy project/GSoC
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Nodes
legacy project/OpenGL Error
legacy project/Papercut
legacy project/Pose Library Basics
legacy project/Retrospective
legacy project/Tracker Curfew
legacy project/Wintab High Frequency
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
Platform/FreeBSD
Platform/Linux
Platform/macOS
Platform/Windows
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Milestone
No project
No Assignees
9 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#56792
Loading…
There is no content yet.