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
Fast STL (ASCII & Binary) importer for Blender

blender-fast-stl-importer Fast STL (ASCII & Binary) importer for Blender based on https://en.wikipedia.org/wiki/STL_(file_format) Technical notes: flo

Iyad Ahmed 7 Apr 17, 2022
Generic NDJSON importer for hashlookup server

Generic NDJSON importer for hashlookup server Usage usage: hashlookup-json-importer.py [-h] [-v] [-s SOURCE] [-p PARENT] [--parent-meta PARENT_META [P

hashlookup 2 Jan 19, 2022
Blender-3D-SH-Dma-plugin - Import and export Sonic Heroes Delta Morph animations (.anm) into Blender 3D

io_scene_sonic_heroes_dma This plugin for Blender 3D allows you to import and ex

Psycrow 3 Mar 22, 2022
Blender addons - A collection of Blender tools I've written for myself over the years.

gret A collection of Blender tools I've written for myself over the years. I use these daily so they should be bug-free, mostly. Feel free to take and

null 217 Jan 8, 2023
Blender addon that enables exporting of xmodels from blender. Great for custom asset creation for cod games

Birdman's XModel Tools For Blender Greetings everyone in the custom cod community. This blender addon should finally enable exporting of custom assets

wast 2 Jul 2, 2022
Easytile blender - Simple Blender 2.83 addon for tiling meshes easily

easytile_blender Dead simple, barebones Blender (2.83) addon for placing meshes as tiles. Installation In Blender, go to Edit > Preferences > Add-ons

Sam Gibson 6 Jul 19, 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 7, 2023
Purge all transformation orientations addon for Blender 2.8 and newer versions

CTO Purge This add-on adds a new button to Blender's Transformation Orientation panel which empowers the user to purge all of his/her custom transform

MMMrqs 10 Dec 29, 2022
Addon for Blender 2.8+ that automatically creates NLA tracks for all animations. Useful for GLTF export.

PushDownAll An addon for Blender 2.8+ that runs Push Down on all animations, creating NLA tracks for each. This is useful if you have an object with m

Cory Petkovsek 16 Oct 6, 2022
Reload all Blender add-on modules

Reload-Addon This add-on creates a list of the modules that the add-on selected in the drop-down menu contains and reloads them with the keyboard shor

null 2 Dec 2, 2021
Donatus Prince 6 Feb 25, 2022
This is a Blender 2.9 script for importing mixamo Models to Godot-3

Mixamo-To-Godot This is a Blender 2.9 script for importing mixamo Models to Godot-3 The script does the following things Imports the mixamo models fro

null 8 Sep 2, 2022
addon for blender to import mocap data from tools like easymocap, frankmocap and Vibe

b3d_mocap_import addon for blender to import mocap data from tools like easymocap, frankmocap and Vibe ==================VIBE================== To use

Carlos Barreto 97 Dec 7, 2022
Procedural modeling of fruit and sandstorm in Blender (bpy).

SandFruit Procedural modelling of fruit and sandstorm. Created by Adriana Arcia and Maya Boateng. Last updated December 19, 2020 Goal & Inspiration Ou

Adriana Arcia 2 Mar 20, 2022
Blender pluggin (python script) that adds a randomly generated tree with random branches and bend orientations

Blender pluggin (python script) that adds a randomly generated tree with random branches and bend orientations

Travis Gruber 2 Dec 24, 2021
Blender addon that simplifies access to useful operators and adds missing functionality

Quick Menu is a Blender addon that simplifies common tasks Compatible with Blender 3.x.x Install through Edit -> Preferences -> Addons -> Install... -

passivestar 94 Dec 27, 2022
TB Set color display - Add-on for Blender to set multiple objects and material Display Color at once.

TB_Set_color_display Add-on for Blender with operations to transfer name between object, data, materials and action names Set groups of object's or ma

null 1 Jun 1, 2022
Blender addon, import and update mixamo animation

This is a blender addon for import and update mixamo animations.

ywaby 7 Apr 19, 2022
A small Blender addon for changing an object's local orientation while in edit mode

A small Blender addon for changing an object's local orientation while in edit mode.

Jonathan Lampel 50 Jan 6, 2023