PLY Export or bug in Blender, joining two meshes causes exported normal's on second mesh to invert. #104159
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#104159
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Tested a wide variety of machines
Blender Version
occurs on all 2.8 to latest
Exact steps for others to reproduce the error
Create two separate meshes, join them to make one mesh and export it as PLY, sometimes the second mesh will export and when you load it into OpenGL the normals for the second mesh become inverted even though in blender they show as they should, normal, not inverted.
This has happened to me a lot and it's so annoying, I'm not sure if its something to do with the vertex winding order getting reversed somehow on the second joined mesh as I am aware vertex winding order may be used when it comes to determining face direction but I'm not sure on the exact details of that; https://www.gamedev.net/forums/topic/712275-vertex-winding-order-clockwise-or-counter-clockwise/
This doesn't happen for every join operation on two meshes, just some of them.
Here is a blend file where this occurred and you have to flip the vertices on the blue surfboard to point inwards (incorrect direction) to get it to export in the PLY file with normals pointing outwards file.blend
Notice how when you see the model in the .blend file the normals are all the correct direction, now export it to PLY and then import that PLY back into blender and the normals on the blue surfboard have been flipped.
I export the PLY as ASCII, Selection Only, everything apart from UV coordinates, no modifiers un-applied.
Added subscriber: @billgoysa
Changed status from 'Needs Triage' to: 'Resolved'
The issue is not with the PLY exporter, you probably have negative scale on one of the objects. So when this object gets merged this negative transform applies to mesh inverting its normals.
You can reproduce it by creating two cubes, then setting Scale X to -1.0, and merge it with another cube.
It is not a bug, that's just how transformations work. It is best to avoid negative scale when possible.
Ah you are right! sorry, thank you so much I must have accidentally been scaling objects into negative scales without realising, it's not super obvious this is happening when using the scale tool unless I have the item transform tab open and even then I would not have specifically noticed the scale had gone into negative unless someone had pointed it out to me like you have now.
Thank you!