Hello! Is there some way to have in Unreal Engine animated mesh that can have different normals on each frame?
This is important for shading when I import results of simulations using alembic.
Currently it seems that Unreal just doesn’t support mesh having dynamic normals in any way.
For example, here’s an alembic of a sphere tas has smooth shading at frame 1 and flat shading at frame 2.
If I open it in Blender and try to play it, I can see that normals are dynamic. sphere_changed_normals.abc (107.3 KB)
But when I import it to Unreal Engine I don’t see any changes in normals between frames.
What I’ve tried and had no result.
convert alembic to fbx with changing normals for shape keys - in Unreal Skeletal Mesh’s morph target normals are the same as the original mesh;
import alembic to unreal directly - both as skeletal mesh (same problem with shape keys having base normals) and geomtry cache (no result)
I have done this in the past by just linearly interpolating between the base mesh normal and a normal map or generated normals.
By generated I mean procedurally/ mathematically. For example, faceted normals can be generated by taking the cross product of the DDX and DDY of the World Position. So there’s no need to waste a texture if that is the effect you’re trying to achieve.
Using ddx/ddy of world position to determine normals will work if you’re looking for smooth shading is a great method to get normals for geometry “generated” from vertex shader but this method wouldn’t support flat shading, if I understand it correctly.
At the 2 minute mark in this video (about an unrelated topic) you can see faceted normals being generated using the method I described. The mesh is a smooth shaded sphere, but the faceted normals can easily be generated. In the case of a sphere, smooth normals can also be generated because the smooth normal of any point on the surface will just be the normalized vector between that point and the center of the sphere.
I’m running into a similar issue with specifically path trace rendering of geometry caches and collections, no matter what model or material I use. Any idea how something like this could be fixed? https://www.youtube.com/watch?v=5EqWi_k-Ngg