Blender PLY Exporter, exporting broken UV/ST coordinates. #103230
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#103230
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?
The UV coordinates exported by the PLY exporter in Blender do not work anywhere else on complex meshes, other than for importing back into blender, making them useless?
Use the obj from here: https://developer.blender.org/T103199
Convert it to ASCII PLY, then load it and the texture into here: https://www.creators3d.com/online-viewer
Or anything that is not Blender. Observe broken UV/ST coordinates.
Texture map added to this issue.
Added subscriber: @billgoysa
Added subscriber: @MikhailRachinskiy
Please provide simple PLY ASCII example file with correct UVs.
I don't have the means to do that, because I can only generate PLY ASCII using Blender. I convert the PLY files to OpenGL buffers, you could look at how the OBJ exporter creates its UV coordinates because those are correct. For this reason I am tempted to created a OBJ to OpenGL buffers converter.
The PLY exporter served me really well when I was only exporting vertex colours, but surprisingly it's UV export has been broken since blender 2.7b is the earliest I have tested, so presumably it's always exported broken UV coordinates, which is shocking to think how few people use the exporter for that purpose to have not reported the issue.
It's pointless to look at OBJ files as it is different file format, it has its own specification and organizes geometry data differently from PLY format.
There is no example of exporting UVs in official PLY spec .
I looked at MeshLab exported PLY file, and it does export UVs differently from Blender. Blender puts UVs data in vertex domain, whereas MeshLab puts them in face corners. Both are valid but have different uses.
I will take on this task, in no particular timeframe.
Changed status from 'Needs Triage' to: 'Confirmed'
This comment was removed by @billgoysa
Small update for you, I did get the existing UV/ST to work from the PLY exporter, I just had to flip the V/T coordinate, if you add flip check boxes for each of the two texture coordinates this should solve the problem.
A UV map exported from an OBJ does look better but it also doubles the vertex count.
I hope this helps!
So in OpenGL buffers, flip V/T and it works fine! A lot of software renders in this OpenGL spec so that's why it was broken on many other softwares,
In that sense it might also be good to add a drop down above the invert U/V check boxes that allows you to select OpenGL, so its explicit that people know that the UV's being exported are ready to be dumped right into OpenGL.
OpenGL is bottom up texture coords, so that's why the V needed flipping, DirectX is top down, so for DirectX you would not need to flip V.
So in that sense you could add both DirectX and OpenGL to the dropdown.
https://www.saschawillems.de/images/2019-03-29-vulkan-flipping-the-viewport/viewports_gl_vk.png
Here you can see Vulkan is also the same as DirectX and I believe Metal is the same too, which means OpenGL is the only odd one out that I have found so far not following convention.
A face corner / vertex domain selection would still be really cool, but a little stat showing the exported vertex would probably be necessary if you added that, so people really know the impact of the decision they are making.
Oh yes and also, correct me if I am wrong but.. I am pretty sure that if I select my mesh, go into edit mode, select all the vertices, click the Edge dropdown, select "Mark Sharp", go back into Object mode, add the modifier "Edge Split", apply it. If I export the mesh with UV's now I get the OBJ UV mapping/face corner when I export the PLY. But this does result in a way higher vertex count than the OBJ would export so maybe not perfect lol. I suppose one could also select all the vertex in edit mode, select Mesh drop down, select Split > Faces by Edges, then right click the mesh and select Seperate > By Loose Parts and then in object mode select all faces and join them but that's slower.
Thanks for the heads up, I made a test file with UV stored in face corners and it appears to work well (except that online service you provided seems to only support triangles with UVs).
Now, I need to rewrite exporter and importer. No timeframe.
3.6 will have new experimental C++ PLY exporter
43e9c90061
, current Python PLY exporter will be marked as legacy and will no longer be developed, therefore I am closing this task as obsolete.Please test your case against new experimental PLY exporter, and if same issue occurs open a new bug report.