Skip to content

TE: Normals on Imported Geometry break when the Lighting Mode is set to "Vertex Color" #1080

@Christian-Croft

Description

@Christian-Croft

Tomb Editor 1.10.0

In Blender, we can set two type of vertex attribute/color:

  • Vertex, giving a color to a vertex, shared upon surrounding faces. This ignores any sharp edges and produce a soft lighting on all faces.
  • Face Corner, giving a color to a vertex, applied only on a face. This considers sharp edges and produce more precise lighting.

Both work on TE. and the vertex have the correct color.

But, if we import a model in TE and set the Light Mode to "Vertex Color", then the normals of the model break in two way:
If a model use "Vertex Color" attribute, then the custom normals are all soft and we loose all split normals on sharp edges.
if a model use "Face Corner" attribute, then the normals are all sharp and we loose soft normals on curvy surface.

If any of these two model are imported with the Light Mode "Calculate from room light" then all normals, averaged or split, remain intact and show as they should.

Here an image to illustrate:

Image

  • Left: attribute set to "Vertex", light mode set to "Vertex Color"

all normals are soft, we loose the sharpness around the front and back of the arch.

  • Middle: attribute set to "Face Corner", light mode set to "Vertex Color"

all normals are hard, we loose the soft normals on the curve and the sphere (note the jagged light)

  • Right: attribute set to "Face Corner", light mode set to "Calculate from Room Light"

all normals are correct, we have the sharp edges on the front and back of the arch, and the sphere is round.

I used FBX in the exemple, but the issue is the same with DAE.

Here the level file (project + imported geometry model and textures).

Levels.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions