Jump to content

reading point colors from .ply files


Recommended Posts

I have a .ply file that I am importing into a geometry node. The .ply format content is a point cloud with color information.

The points import and display. I also get 3 point attributes: diffuse_red[1], diffuse_green[1], diffuse_blue[1]

In details view I can see healthy numbers in those point attributes.

In a point sop I tried: add color $DIFFUSE_RED I get 'unable to evaulate expression'

My first thought is perhaps these point attributes from the import only look like floats but are really strings.

I've tried some hscript expressions using atof, point, and eval... no go, either I'm tripping up in syntactical errors or I'm barking up the wrong tree.

I'm just trying to map these attributes to point colors so I can see them in the viewport.

Thanks for any assistance.

Link to comment
Share on other sites

easiest way is to use VOP SOP to combine your attributes to color (Cd)

see example file

or you can use Attribute Create to initialize variables for your existing attributes

fill in name: diffuse_red

local variable: DIFFUSE_RED (or any)

and uncheck Write Values parameter to just initialize the variable and not overwrite attribute's value

now you can use that variable in Point SOP for example

color_points.hip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...