Blender Geometry Nodes: PLY Import Node does not import custom Attributes #126013

Closed
opened 2024-08-07 07:33:25 +02:00 by Tolga Yildiz · 9 comments

System Information
Operating system: Windows
Graphics card: NVIDIA GTX 1650

Blender Version
Broken: (example: 4.3.0, main, f1cca3055776, 2020-12-30)
Worked: none

Short description of error

The new geometry node at Input>Import>Import PLY does not import custom vertex attributes, custom face attributes and custom edge attributes.

If you use the blender importer from the file context menu you can see it imports vertex colors but the importer in the geometry node does not have the attributes.

This file also has colors defined on the faces and weight defined on the edges with custom PLY attributes as it can be seen from the header of the PLLY file. None of the face and edge weights are imported by both blender importer and geometry nodes importer.

Exact steps for others to reproduce the error

extract the zip below and open the blend file, the import is using relative directories so it should be fine when you open the file.

**System Information** Operating system: Windows Graphics card: NVIDIA GTX 1650 **Blender Version** Broken: (example: 4.3.0, main, `f1cca3055776`, 2020-12-30) Worked: none **Short description of error** The new geometry node at Input>Import>Import PLY does not import custom vertex attributes, custom face attributes and custom edge attributes. If you use the blender importer from the file context menu you can see it imports vertex colors but the importer in the geometry node does not have the attributes. This file also has colors defined on the faces and weight defined on the edges with custom PLY attributes as it can be seen from the header of the PLLY file. None of the face and edge weights are imported by both blender importer and geometry nodes importer. **Exact steps for others to reproduce the error** extract the zip below and open the blend file, the import is using relative directories so it should be fine when you open the file.
Tolga Yildiz added the
Type
Report
Status
Needs Triage
Severity
Normal
labels 2024-08-07 07:33:26 +02:00
Member

@aras_p Could you take a look?

@aras_p Could you take a look?

@ChengduLittleA I could at some point. But overall, the geometry node for file imports is the new GSoC 24 project (just added in #125587), so maybe @Devashish-Lal could look into it first.

@ChengduLittleA I could at some point. But overall, the geometry node for file imports is the new GSoC 24 project (just added in #125587), so maybe @Devashish-Lal could look into it first.
Author

Previously experimental now default PLY importer also does not import the per face and per edge custom attributes. I think this can would be useful for encoding different data in a single file and exporting/importing geometry nodes meshes with attributes.

Previously experimental now default PLY importer also does not import the per face and per edge custom attributes. I think this can would be useful for encoding different data in a single file and exporting/importing geometry nodes meshes with attributes.
Member

Hi, any updates to this?

Hi, any updates to this?
Author

I am not sure, at some point I want to be a part of this actually. How can I get involved with the development? I have some ideas on also supporting per face, per edge attributes for the blender's PLY importer.

I am not sure, at some point I want to be a part of this actually. How can I get involved with the development? I have some ideas on also supporting per face, per edge attributes for the blender's PLY importer.
Member

Hi @bebop_artist , if you want to contribute code for blender, the document here is a great starting point :D You could also poke us in the chat if you have any questions.

Hi @bebop_artist , if you want to contribute code for blender, [the document here](https://developer.blender.org/docs/handbook/new_developers/) is a great starting point :D You could also poke us in the chat if you have any questions.
Bart van der Braak added
Type
Bug
and removed
Type
Report
labels 2024-08-14 12:53:17 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Needs Info from Developers
labels 2024-08-14 14:43:32 +02:00
Member

well that was a easy fix 🤔

well that was a easy fix 🤔
Author

There is a strange behavior for importing with attributes now. If the attributes named with any of the following:

  • red
  • green
  • blue
  • alpha

Then it will not import those attributes. I think the reason could be that Mesh *PLY_import_mesh(const PLYImportParams *import_params); is treating those attribute names differently and try to accumulate them into a single attribute like a Col vector field. These attributes can be imported with default importer and Col attribute is available, but not in the nodes importer. For the default importer, another interesting point is for the color attributes red, green, blue are mandatory where the alpha is optional to form a 'Col' field.

Following simple ply imports with all fields available from different float channels.

ply
format ascii 1.0
element vertex 1
property double x
property double y
property double z
property uchar r
property uchar g
property uchar b
property uchar a
end_header
0.880699   0.99446363 0.41441209   0 226  33 0

following ply imports with the node but the attributes are not imported

ply
format ascii 1.0
element vertex 1
property double x
property double y
property double z
property uchar red
property uchar green
property uchar blue
property uchar alpha
end_header
0.880699   0.99446363 0.41441209   0 226  33 0

following ply imports with the node but only the attribute r is imported

ply
format ascii 1.0
element vertex 1
property double x
property double y
property double z
property uchar r
property uchar green
property uchar blue
property uchar alpha
end_header
0.880699   0.99446363 0.41441209   0 226  33 0

Also the 'uchar' 8-bit fields are imported as 'float32':
image

For summary there are three bug reports:

  1. Import PLY does not import the attributes with the following names:
  • red
  • green
  • blue
  • alpha
  1. uchar fields are imported as Float fields
  2. Import PLY in the File > Import > Stanford PLY (.ply) does not import incomplete declarations of color attributes, i.e.red, green, blue are mandatory and the alpha is optional to form a 'Col' attribute.

For the future plan for a feature where per face, per edge attributes are also supported:

  • per face attributes can be read into homogeneous arrays if all the faces share the same amount of vertices, if not we need to handle the faces and attributes serially
  • per edge attributes can be read into homogeneous arrays

How can I make a feature request for the last part?

There is a strange behavior for importing with attributes now. If the attributes named with any of the following: - `red` - `green` - `blue` - `alpha` Then it will not import those attributes. I think the reason could be that ```Mesh *PLY_import_mesh(const PLYImportParams *import_params);``` is treating those attribute names differently and try to accumulate them into a single attribute like a `Col` vector field. These attributes can be imported with default importer and `Col` attribute is available, but not in the nodes importer. For the default importer, another interesting point is for the color attributes `red`, `green`, `blue` are mandatory where the `alpha` is optional to form a 'Col' field. Following simple ply imports with all fields available from different float channels. ``` ply format ascii 1.0 element vertex 1 property double x property double y property double z property uchar r property uchar g property uchar b property uchar a end_header 0.880699 0.99446363 0.41441209 0 226 33 0 ``` following ply imports with the node but the attributes are not imported ``` ply format ascii 1.0 element vertex 1 property double x property double y property double z property uchar red property uchar green property uchar blue property uchar alpha end_header 0.880699 0.99446363 0.41441209 0 226 33 0 ``` following ply imports with the node but only the attribute `r` is imported ``` ply format ascii 1.0 element vertex 1 property double x property double y property double z property uchar r property uchar green property uchar blue property uchar alpha end_header 0.880699 0.99446363 0.41441209 0 226 33 0 ``` Also the 'uchar' 8-bit fields are imported as 'float32': ![image](/attachments/468dc54b-341a-44cb-ab3d-de02a9e4ab38) For summary there are three bug reports: 1. Import PLY does not import the attributes with the following names: - `red` - `green` - `blue` - `alpha` 2. `uchar` fields are imported as `Float` fields 3. Import PLY in the `File > Import > Stanford PLY (.ply)` does not import incomplete declarations of color attributes, i.e.`red`, `green`, `blue` are mandatory and the `alpha` is optional to form a 'Col' attribute. For the future plan for a feature where per face, per edge attributes are also supported: - per face attributes can be read into homogeneous arrays if all the faces share the same amount of vertices, if not we need to handle the faces and attributes serially - per edge attributes can be read into homogeneous arrays How can I make a feature request for the last part?
Blender Bot added
Status
Confirmed
and removed
Status
Resolved
labels 2024-08-14 17:54:10 +02:00
Member

Hi @bebop_artist! Could you put your last comment in a separate report? It sounds like a different issue from this one. I'm not sure if it's a feature request or a bug, the pipeline module would know better.

Hi @bebop_artist! Could you put your last comment in a separate report? It sounds like a different issue from this one. I'm not sure if it's a feature request or a bug, the pipeline module would know better.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-08-14 19:15:28 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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#126013
No description provided.