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
Мой первый калькулятор!!!!!!

my_first_calculator Первый калькулятор созданный мною на питоне Версия калькулятора: 0.0.4 Как скачать? TERMUX Для скрипта нужен питон, скачиваем pkg

Lesha Russkiyov 2 Dec 29, 2021
These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel structural variation, providing new insights into their diversity and evolution history’

script-SV-genotyping These are the scripts used for the project of ‘Assembly of a pan-genome for global cattle reveals missing sequence and novel stru

2 Aug 26, 2022
Open source home automation that puts local control and privacy first

Home Assistant Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiast

Home Assistant 57k Jan 02, 2023
Experiments with Tox plugin system

The project is an attempt to add to the tox some missing out of the box functionality. Basically it is just an extension for the tool that will be loa

Volodymyr Vitvitskyi 30 Nov 26, 2022
Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells.

Identifies the faulty wafer before it can be used for the fabrication of integrated circuits and, in photovoltaics, to manufacture solar cells. The project retrains itself after every prediction, mak

Arun Singh Babal 2 Jul 01, 2022
A beacon generator using Cobalt Strike and a variety of tools.

Beaconator is an aggressor script for Cobalt Strike used to generate either staged or stageless shellcode and packing the generated shellcode using your tool of choice.

Capt. Meelo 441 Dec 17, 2022
Subscribe, listen and (in the future) download your favorite podcasts, quickly and easily.

Minimal Podcasts Player https://github.com/son-link/minimal-podcasts-player Subscribe, listen and (in the future) download your favorite podcasts, qui

Alfonso Saavedra 14 Nov 11, 2022
Patch PL to disable LK verification. Patch LK to disable boot/recovery verification.

Simple Python(3) script to disable LK verification in Amazon Preloader images and boot/recovery image verification in Amazon LK ("Little Kernel") images.

Roger Ortiz 18 Mar 17, 2022
A collection of full-stack resources for programmers.

A collection of full-stack resources for programmers.

Charles-Axel Dein 22.3k Dec 30, 2022
Synthetik Python Mod - A save editor tool for the game Synthetik written in python

Synthetik_Python_Mod A save editor tool for the game Synthetik written in python

2 Sep 10, 2022
VCC-Generator is a python script that generate VCC for testing purposes only

VCC-Generator is a python script that generate VCC for testing purposes only

Spider Anongreyhat 10 Oct 23, 2022
An example file showing a simple endpoints like a login/logout function and maybe some others.

Flask API Example An example project showing a simple endpoints like a login/logout function and maybe some others. How to use: Open up your IDE (or u

Kevin 1 Oct 27, 2021
A Python library for inspecting JVM class files (.class)

lawu Lawu is a human-friendly library for assembling, disassembling, and exploring JVM class files. It's highly suitable for automation tasks. Documen

Tyler Kennedy 45 Oct 23, 2022
🍞 Create dynamic spreadsheets with arbitrary layouts using Python

🍞 tartine What this is Installation Usage example Fetching some data Getting started Adding a header Linking more cells Cell formatting API reference

Max Halford 11 Apr 16, 2022
It really seems like Trump is trying to get his own social media started. Not a huge fan tbh.

FuckTruthSocial It really seems like Trump is trying to get his own social media started. Not a huge fan tbh. (When TruthSocial actually releases, I'l

0 Jul 18, 2022
This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever your heart desires.

Chrome-Tools Overview Welcome to the repo. This repo will have a small amount of Chrome tools that can be used for DFIR, Hacking, Deception, whatever

5 Jun 08, 2022
TimeWizard - A script that generates every single Time Wizard EDOPRO lflist possible

EDOPRO F&L list generator This project is just a script that generates every sin

Diamond Dude 2 Sep 28, 2022
A water drinking notification every hour to keep you healthy while coding :)

Water_Notification A water drinking notification every hour to keep you healthy while coding. 💧 💧 Stay Hydrated Stay Healthy 💧 💧 Authors @CrazyCat

Arghya Banerjee 1 Dec 22, 2021
Strawberry Benchmark With Python

Strawberry benchmarks these benchmarks have been made to compare the performance of dataloaders and joined database queries. How to use You can run th

Doctor 4 Feb 23, 2022
A simple script for generating screenshots with Vapoursynth

Vapoursynth-Screenshots A simple script for generating screenshots with Vapoursynth. About I'm lazy, and hate changing variables for each batch of scr

7 Dec 31, 2022