OBJ Export: wrong normals with scaled object #96430

Closed
opened 2022-03-14 12:13:37 +01:00 by Scurest · 9 comments
Contributor

System Information
Operating system: Linux
Graphics card:

Blender Version
Broken: 3.1
Worked: 3.0

Short description of error

When exporting an OBJ, if a mesh object has a non-trivial scaling in its world matrix, the normals are wrong

  • the normals are not normalized (unit length)
  • non-uniform scaling aren't handled correctly (inverse-transpose formula)

Exact steps for others to reproduce the error

Create a UV sphere, smooth shade it, scale down on one axis, say Scale X = 0.3. Export and reimport.

ScaledSphereExample.png

**System Information** Operating system: Linux Graphics card: **Blender Version** Broken: 3.1 Worked: 3.0 **Short description of error** When exporting an OBJ, if a mesh object has a non-trivial scaling in its world matrix, the normals are wrong * the normals are not normalized (unit length) * non-uniform scaling aren't handled correctly (inverse-transpose formula) **Exact steps for others to reproduce the error** Create a UV sphere, smooth shade it, scale down on one axis, say Scale X = 0.3. Export and reimport. ![ScaledSphereExample.png](https://archive.blender.org/developer/F12926623/ScaledSphereExample.png)
Author
Contributor

Added subscriber: @scurest

Added subscriber: @scurest

Added subscriber: @aras_p

Added subscriber: @aras_p
Aras Pranckevicius self-assigned this 2022-03-14 19:36:13 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Yup, can reproduce this. Looks like the new exporter is not applying proper normal transformation math (should use inverse transpose of the matrix, and normalize the result). Will try fixing...

Yup, can reproduce this. Looks like the new exporter is not applying proper normal transformation math (should use inverse transpose of the matrix, and normalize the result). Will try fixing...
Member

Added subscriber: @howardt

Added subscriber: @howardt
Aras Pranckevicius was unassigned by Howard Trickey 2022-03-19 21:06:28 +01:00
Howard Trickey self-assigned this 2022-03-19 21:06:28 +01:00
Member

This looks good.

This looks good.

This issue was referenced by 3a1e6bc1d5

This issue was referenced by 3a1e6bc1d5807b732536c73170f11268fb398726

This issue was referenced by 8aa365745a

This issue was referenced by 8aa365745a78c0a6778c871f865ab55df3e87e9d
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
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
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
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
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 Info 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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#96430
No description provided.