Git Product home page Git Product logo

import-ply-as-verts's People

Contributors

tombstonetumbleweedart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

import-ply-as-verts's Issues

does it change coordinates?

Hello,

Thanks for such nice tool.

I have some problem when import the pointcloud as it seems it modifies the coordinates while importing. In the image, you can see that in blender (left) the two models do not overlap as they should. When open the models on meshlab it does work (right image). Is this a problem that can be solved?

Screenshot from 2022-07-21 10-28-11

Best,
Bryan

Emission column after colors? (or just extra column in general)

I've been working on a ply writer for some particle simulation data which can map one attribute to RGB, another to alpha, and a third to emission. With very little coding experience myself, I've been working on a personal set of edits to this reader for an additional column but I figure this may be something useful to others as well, hence why I bring it as a suggestion here.

Auto generate geometry nodes and basic material

Hi, thanks for creating this updated ply importer!
I wrote something that creates a material and geometry node tree:

import bpy

mat_name = "pointcloud"
materials = bpy.data.materials    
if materials.get(mat_name) is None: 
    print("creating pointcloud material")   
    mat = materials.new(mat_name)
    mat.use_nodes = True
    materialtree = mat.node_tree.nodes
    materialtree.remove(materialtree.get("Principled BSDF"))
    materialtree.remove(materialtree.get("Material Output"))
    
    attributenode = materialtree.new(type="ShaderNodeAttribute")
    attributenode.attribute_name="Col"
    outputnode = materialtree.new(type="ShaderNodeOutputMaterial")
    pbrnode = materialtree.new(type="ShaderNodeBsdfPrincipled")
    mat.node_tree.links.new(attributenode.outputs[0],pbrnode.inputs[0])
    mat.node_tree.links.new(pbrnode.outputs[0],outputnode.inputs[0])
mat = materials.get(mat_name)

#import object
bpy.ops.import_mesh.ply(filepath=r"C:\Users\User\Desktop\file.ply")
importedObject = bpy.context.active_object
#create geometry node tree
bpy.ops.object.modifier_add(type='NODES')
nodeTree = bpy.context.active_object.modifiers[0].node_group

cubenode = nodeTree.nodes.new(type="GeometryNodeMeshCube")
CubeSize = 0.001
cubenode.inputs[0].default_value[0] = CubeSize
cubenode.inputs[0].default_value[1] = CubeSize
cubenode.inputs[0].default_value[2] = CubeSize

instancenode = nodeTree.nodes.new(type="GeometryNodeInstanceOnPoints")
materialnode = nodeTree.nodes.new(type="GeometryNodeSetMaterial")
materialnode.inputs[2].default_value = mat
shadenode = nodeTree.nodes.new(type="GeometryNodeSetShadeSmooth")
realizenode = nodeTree.nodes.new(type="GeometryNodeRealizeInstances")
geonode = nodeTree.nodes[0]
outnode = nodeTree.nodes[1]

nodeTree.links.new( geonode.outputs['Geometry'] , instancenode.inputs['Points'])
nodeTree.links.new( cubenode.outputs['Mesh'], shadenode.inputs['Geometry'])
nodeTree.links.new( shadenode.outputs['Geometry'], materialnode.inputs['Geometry'])
nodeTree.links.new( materialnode.outputs['Geometry'], instancenode.inputs['Instance'])
nodeTree.links.new( instancenode.outputs['Instances'], realizenode.inputs['Geometry'])
nodeTree.links.new( realizenode.outputs['Geometry'], outnode.inputs['Geometry'])

Colors problem

Hi!
I've tryed writing on the youtube video but seems the commet are disappeared.

The problem I was asking is that i can't get the color attribute to the points, I've defined the shader with the "attribute" "Col" as base color, and then the geometry node both with instance or mesh to points, but the points still has no colors

May I ask for help?
Thanks :)
Cattura

J-Wildfire Extraneous Data in PLY File

Certain JWF formulas will place additional nonstandard property fields into the PLY file when exporting.
This was reported by Brad Stefanov on Feb 4 2022 and replicated on my end.
Patched in v1.01, will revisit for more comprehensive solution.

Feb 5, 2022 -MAP

Blender 4.0

I couldn't install the addon in Blender 4.0

how can I install this on Mint ?

Hello, on Mint, the original plugin is located at something like

snap/blender/3915/3.6/scripts/addons/io_mesh_ply/import_ply.py

snaps are not editable. Even when running sudo nemo, I can't edit those files.

How could I use your plugin ?

Color attribute

Hi Tombstone,

Thank you very much for sharing this script. It's really helpful along with your youtube video there for a blender newbie.

I'm just wondering could this show the point color correctly with just points coordinates and their color given as input? For my file it couldn't show the color correctly as it shown in open3d.

Blender gives me this:
image
With open3d's image as:
image

My nodes connection is here and I would really appreciate if you could take a look at this specific case!
image
image
(The ply file is here
table.zip
)

Best regards,
Batwho

No color output

Hello, I'm having some trouble getting the vertex colors to appear. I exported a point cloud from meshlab, and it appears just fine, but with no color data. I don't know if this is intended, but "Col" is in the spreadsheet and seems to have correct colors, but there is no geometry node setup or material on import. Reinstalling didn't seem to help. I tried to manually prepare these, but I don't know the node editors very well. For example, I typed in Col under "Attribute" as I've seen in other issues, but I'm not sure how (or if) it gets this data from the model. I'm using Blender 3.6.1 LTS.
Capture

Thanks for any help!

Old Version

Hello! Am I able to get a copy of the previous version of this addon? I know there are benefits to the current version, but for our workflow, it breaks the whole process and we don't need the new features. Not sure why the previous version was murdered instead of just ignored. I'm talking about the old version that would display the point cloud with "Point Cloud Visualizer"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.