Custom Edge normals
Blender supports only custom split normals. That's a problem for game development. Because a vertex is only allowed to have one normal by the GPU. And split normals are causing splitted vertices. And every game modeler who gets aware of that fact will close Blender immidiatly. The ability to edit normals only by splitting them will destroy the whole mesh optimization.
If it is too hard to implement edge normal editing because of the software design then I suggest the ability to turn the custom normals into edge normals during export. And to remove the standard edge normals.
If that is possible.
3 Comments
What you mean by "Blender supports only custom split normals. That's a problem for game development." ? Blender has for now Waighted Normal and Edit Normal modifier, you can rotate normal manually (like on GIF).
Yes - on GPU level vertex have only one normal, so hard edge shown in Blender actually mean that in some Unreal it will be two vertices (not one with two normals). So what now? How it connected to "custom edge normal" (whatever you mean by this)?
"I suggest the ability to turn the custom normals into edge normals during export." and then what? As far as I understand how game engines work - they have no idea about most of bells and whistles we see in modeling software and operate mostly by vertex data. What's that "edge normals" you want to export?
It curious to me, I didn't know something?
* @IIIFGIII * The blue normal in your gif is the edge normal. The pink is the split normal. You have two normals per vertex. And you will export two normals per vertex. You export the pink split normal and the blue edge normal.
The GPU will see this two normals and split a vertex into two vertices. A mesh with a lot of custom normals will behave like a mesh with hard edges.
And this can be pretty bad for performance.
A foliage mesh with 10000 vertices and 10000 custom split normals will have 20000 vertices in the game.
A vertex normal is just a
vec3vertex attribute. (Or even `vec2 if you use Tangent-space encoding)You can add as many vertex attributes as you want without duplicating vertices. You can also add a boolean attribute on each edge to represent whether or not it should be "sharp". You can use these to calculate normals in any way you want.
This is all things you can do in OpenGL and Vulkan. If Unity or Unreal can't handle reading this data from arbitrary attributes that it's a skill issue on their part.
Geometry is just buffers. Buffers are like large tables. You have a primary column which is the domain (vertex, edge, etc) and you can have as many secondary columns (called attributes) as you want.
You can even reuse attributes in the same buffer by making smart use of the
VertexAttributePointers. For example if you want to have 2 or more UV maps or vertex color etc for a single model, you can add a layout like thisvec3 position | vec2 firstUV | vec2 secondUVand in your draw call draw the geometry first with the first UV and then with the second UV, sharing the geometry position data.Also you mention export. How are you exporting? The export file formats are much more limited. I hope you're not still using WavefrontObj. The modern way to export geometry efficiently between programs in a GL-native manner which requires minimal parsing or transcoding is the GLTF and GLB file formats. Those can handle arbitrary attributes.