Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds)

Overview

import-ply-as-verts

Blender 3.1 Alpha (and later) PLY importer that correctly loads point clouds (and all PLY models as point clouds)

Latest News

  • Mandelbulb3D - Recommended to use v1.99 for now. The BTracer2 module in v1.99.32 isn't compatible with the importer yet but it's an easy patch, will be fixed asap.
  • Updated .blend files to remove a HDRI I forgot was attached :) Also have both Cycles and Eevee versions.

Until I get the script correctly packaged as an addon, it will be necessary to replace the stock import module with the new one. See the Install.pdf file for more detail.

The stock PLY importer that ships with Blender was never intended for vertex-colored point clouds (ie, PLY files with zero edges and faces). Most of my fun math graphics are point clouds from Mandelbulb3D, J-Wildfire, and photogrammetry scans gone horribly wrong. Until now, getting these clouds into Blender has involved a great deal of heavy lifting. Since 2017 I have been developing a standalone app for this but with the recent functionality added in Blender 3.1 Alpha and newer, I happily abandon my project to throw full energy into the beauty of Geo Nodes.

I was able to sleuth out why the importer didn't work. For the technically minded, the issue was that the Vertex Color Data Block in Blender is intimately tied to Faces. One cannot exist without the other. However, the color data was still being read in. The tricky part was spending many quality hours with bpy.data. to ultimately find a useful data structure for said color data. Finally, a Custom Attribute was the answer!

And now instead of endlessly coding ON point clouds, we all get to PLAY with point clouds.

And hast thou slain the Jabberwock? Come to my arms, my beamish boy! O frabjous day! Callooh! Callay! He chortled in his joy.

Lewis Carroll, 'The Jabberwocky'

Demo Video: https://youtu.be/-OMV2LrTwVw

Node_Setup-03

Changelog:

  • Feb 5, 2022 - v1.01 patched to allow for certain J-Wildfire formulas that add extraneous data to the PLY file during export.
Comments
  • Colors problem

    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

    opened by Tonysa87 4
  • J-Wildfire Extraneous Data in PLY File

    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

    opened by TombstoneTumbleweedArt 0
  • Emission column after colors? (or just extra column in general)

    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.

    opened by beanachew 0
  • does it change coordinates?

    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

    opened by bgpantojar 8
  • Auto generate geometry nodes and basic material

    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'])
    
    
    opened by RH2 1
Releases(v2.1)
Owner
Michael Prostka
Michael Prostka
This is a modified variation of abhiTronix's vidgear. In this variation, it is possible to write the output file anywhere regardless the permissions.

Info In order to download this package: Windows 10: Press Windows+S, Type PowerShell (cmd in older versions) and hit enter, Type pip install vidgear_n

Ege Akman 3 Jan 30, 2022
A lighweight screen color picker tool

tkpick A lighweigt screen color picker tool Availability Only GNU/Linux 🐧 Installing Install via pip (No auto-update): [sudo] pip install tkpick Usa

Adil Gürbüz 7 Aug 30, 2021
Render your templates using .txt files

PizzaX About Run Run tests To run the tests, open your terminal and type python tests.py (WIN) or python3 tests.py (UNX) Using the function To use the

Marcello Belanda 2 Nov 24, 2021
Shopify Backend Developer Intern Challenge - Summer 2022

Shopify Backend Developer Intern The task is build an inventory tracking web application for a logistics company. The detailed task details can be fou

Meet Gandhi 11 Oct 08, 2022
apysc is the Python frontend library to create html and js file, that has ActionScript 3 (as3)-like interface.

apysc apysc is the Python frontend library to create HTML and js files, that has ActionScript 3 (as3)-like interface. Notes: Currently developing and

simonritchie 17 Dec 14, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

18.6k Jan 02, 2023
Experimental Brawl Stars v36.218 server emulator written in Python.

Brawl Stars v36 Experimental Brawl Stars v36.218 server emulator written in Python. Requirements: Python 3.7 or higher colorama Running the server In

8 Oct 31, 2021
GibMacOS - Py2/py3 script that can download macOS components direct from Apple

Py2/py3 script that can download macOS components direct from Apple Can also now build Internet Recovery USB installers from Windows using dd and 7zip

CorpNewt 4.8k Jan 02, 2023
A notebook explaining the principle of adversarial attacks and their defences

TL;DR: A notebook explaining the principle of adversarial attacks and their defences Abstract: Deep neural networks models have been wildly successful

1 Jan 22, 2022
Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Blender-miHoYo-Shaders - Shaders for Blender attempting to replicate the shading of games developed by miHoYo

Matsuri 449 Jan 07, 2023
Files relating to polymtl university

This is a tool I developed quickly, which allows users to visualize class availability by day of the week for a given program at polymtl. The schedule

PN 3 Mar 15, 2022
Wordle-solve - Attempting to solve wordle

Wordle Solver Run with python wordle_beater.py. This hardmode wordle solver take

Tom Lockwood 42 Oct 11, 2022
Monitor the New World login queue and notify when it is about to finish

nwwatch - Monitor the New World queue and notify when it is about to finish Getting Started install python 3.7+ navigate to the directory where you un

14 Jan 10, 2022
Ingest openldap data into bloodhound

Bloodhound for Linux Ingest a dumped OpenLDAP ldif into neo4j to be visualized in Bloodhound. Usage: ./ldif_to_neo4j.py ./sample.ldif | cypher-shell -

Guillaume Quéré 71 Nov 09, 2022
My programming language named JoLang. (Mainly created for fun)

JoLang status: not ready So this is my programming language which I decided to name 'JoLang' (inspired by Jonathan and GoLang). Features I implemented

Jonathan 14 Dec 22, 2022
Modelling and Implementation of Cable Driven Parallel Manipulator System with Tension Control

Cable Driven Parallel Robots (CDPR) is also known as Cable-Suspended Robots are the emerging and flexible end effector manipulation system. Cable-driven parallel robots (CDPRs) are categorized as a t

Siddharth U 0 Jul 19, 2022
A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz

A community based economy bot with python works only with python 3.7.8 as web3 requires cytoolz has some issues building with python 3.10

4 Jan 01, 2022
dta Convert Dict To Attributes!

dta (Dict to Attributes) dta is very small dict (or json) to attributes converter. It is only have 1 files and applied to every python versions.

Rukchad Wongprayoon 0 Dec 31, 2021
sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character.

ꦱꦮ sawa (ꦱꦮ) is an open source programming language, an interpreter to be precise, where you can write python code using javanese character. sawa iku

Rony Lantip 307 Jan 07, 2023
Improving Representations via Similarities

embetter warning I like to build in public, but please don't expect anything yet. This is alpha stuff! notes Improving Representations via Similaritie

vincent d warmerdam 229 Jan 08, 2023