Page MenuHome

Alembic doesn't export custom normals correctly
Closed, ResolvedPublic

Description

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):

Mesh after being reimported:

Mesh after being imported in Marmoset:

Mesh in Maya:

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:

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.

Details

Type
Bug

Event Timeline

Bastien Montagne (mont29) lowered the priority of this task from Needs Triage by Developer to Normal.

@Sybren A. Stüvel (sybren) that one is for you I think?

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

Hello,

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


Blender version hash is 893fa598319e

Thanks,
Martin

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.

@Micah (Micah) 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 (Micah) 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 @Sybren A. Stüvel (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?

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 :)

Micah (Micah) added a comment.EditedJul 17 2019, 2:05 PM

@Micah (Micah) 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.

@Sybren A. Stüvel (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]

@Micah (Micah) 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 (Micah) 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?


thanks for the files, now it’s time for our Alembic magician (aka @Sybren A. Stüvel (sybren)) to investigate again. :)

@Micah (Micah) 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 @Rubén (Rub)) is properly exported after applying 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:

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.


The effect is most visible in the lower part of the hood where the manufacturers logo will be attached.

@Sybren A. Stüvel (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?

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.

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

Cheers,
Martin

@Sybren A. Stüvel (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!

Thanks for confirming :)

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