1.999.10
- fixed ply export
- fixed project filter (https://developer.blender.org/T97025)
Oooh thatâs again a great batch of features !
Multi station e57 file import is awesome, it will save me a lot of time ! It worked with pymeshlab but I couldnât make it work with pye57, it only imports the first cloud. No error in the console. Is there some specific requirement ?
Hereâs a test file fwiw
test_2.e57 (5.0 MB)
In CC
using pye57 (also it seems it doesnât import vertex colors)
using pymeshlab
Cheers
it will work now for multi scan files. it was, ehm, my fault, overlook. on the other hand, there is not much documentation for pye57⌠anywayâŚ
what i noticed is that pymeshlab uses scalar (intensity in this case) instead of colors (if missing), so in pcv, if you enable scalar viewing, youâll get something similar, only pymeshlab remapping of values seems to be different than mine, but this can adjusted using range, or using color scheme to be better visible
edit: and then with pcv > filter > colorize you can bake scalar into colors if you wish
Oh yeah my bad I was so thrilled I didnât even make sure I was using the latest version, sorry for that ! Thanks for the explanation, thatâs clearer now, top notch !
Convert
option: Mesh To Points
, creates vertex mesh with attributes from points, adds geometry nodes that converts vertices to points and assigns colors to points and adds material, with this you get cycles point cloud rendering without need for blender alpha build (works in blender 3.1+)Start Frame
setting for ply sequencesSplit Selected
operator for Remove Color
and Remove Value
filters and selection Tools
Frame Points
Cycle Forever
is turned offHi, is it possible to generate point cloud from points made through geonodes? and save them as ply with colors?
interesting question, took me a while, but it is
lets have some points generated from scratch:
then with this setup:
note Points To Vertices
node and defined output attributes and with small script, data can be collected, even with some scalar values
import bpy
import numpy as np
import space_view3d_point_cloud_visualizer as pcv
o = bpy.context.active_object
depsgraph = bpy.context.evaluated_depsgraph_get()
e = o.evaluated_get(depsgraph)
me = e.data
l = len(me.vertices)
vs = np.zeros(l * 3, dtype=np.float32, )
me.vertices.foreach_get('co', vs)
vs.shape = (-1, 3)
ns = np.zeros(l * 3, dtype=np.float32, )
me.attributes['n'].data.foreach_get('vector', ns)
ns.shape = (-1, 3)
cs = np.zeros(l * 4, dtype=np.float32, )
me.attributes['c'].data.foreach_get('color', cs)
cs.shape = (-1, 4)
ds = np.zeros(l, dtype=float, )
me.attributes['d'].data.foreach_get('value', ds)
ii = np.zeros(l, dtype=int, )
me.attributes['i'].data.foreach_get('value', ii)
sc = np.empty(l, dtype=[('distance', float), ('index', int), ], )
sc['distance'] = ds
sc['index'] = ii
v = pcv.mechanist.PCVOverseer(o)
pd = pcv.data.PCVPointData.from_arrays('_.ply', {'vs': vs, 'ns': ns, 'cs': cs, 'scalars': sc, }, )
v.data(pd, True, )
i guess this would make useful tool. i see what i can do. it wonât be easy i guess, too many variable conditions⌠it will have to require from user to do all setup in nodes and modifierâŚ
anyway, thanks for suggestion/idea!
ok, it will be in next release. ui is nothing spectacular, but it canât be because attributes does not exist until they are evaluatedâŚ
Awesome !
FWIW for a personal project I created an enum property that fetches the attribute name on the geometry nodes modifier, might be of help somehow instead of typing the names ?
The items
method :
def get_output_attributes(self, context):
o = context.active_object
mod = o.modifiers[self.mod_name]
node_tree = mod.node_group
if node_tree is None:
return ("",) * 3
output_node = next((n for n in node_tree.nodes if isinstance(n, bpy.types.NodeGroupOutput)), None)
if output_node is None:
return ("",) * 3
inputs = output_node.inputs
for input in inputs[1:-1]:
yield (input.identifier + "_attribute_name", input.name, input.identifier)
Hereâs how I use it :
thanks, but i think typing names is the safest. if the attribute is in evaluated data, all is good, if not, report and stop. for example what if you happen to have two geonodes modifiers, each outputting different attributes? in evaluated data you get both attributes. looping over all modifiers and collecting all outputs and deciding which overwrites which, if at all⌠donât like it much.
edit: and if you are particularly nasty, you can delete attribute in nodes
Wow, thanks. I was able to recreate those points rendered however it didnt export. Anyway, the tool is very helpful for my current project, thanks. That is very pity blender can
t save particles/points into ABC or ply from the box.
Also, I wanted to ask if it is possible to add functionality to allow the export of multiple point clouds generated from the different objects in the scene into one ply file?
eh, donât understand, sorry, is it something with pcv? or something else? donât run the code i used for demonstration, it is for that case only.
select all object that have pcv with loaded and displayed points, on one pcv go PCV > Filter > Join, with default settings it will join all points to a new empty with new pcv on it and shuffles all points together. then it will unload all used, so for generated points you might want to disable that option. then from new pcv with all points you can export ply (PCV > Export)
Hi, I`m trying to generate point cloud from particle system on the object but getting error
BMElemSeq[key]: invalid key, key must be an int
what does it mean?
Also error appears only when vertex colors are the source for coloring
can you please run blender from command line and post here full error? this it does not help much
https://docs.blender.org/manual/en/dev/advanced/command_line/launch/index.html
Sorry, I`ve just deleted my vertex colors and created them again, and the error is gone. I will keep it in mind next time.
Hi! Every time i render inside PCV blender gets stuck and it won´t recover. Is there any solution to this issue? thanks
hi, i know about it. it seems to happen only on windows and with 2.0. itâs been reported to me that pcv 1.10 works fine. i suspect it is related to bgl
module deprecation. pcv 2.0 does not use bgl
, but new gpu
module, and it seems to be blender internal bug, but isolating issue is difficult because there is not console message or indication that something went wrong. on mac i have no problems with rendering⌠so, working iâm on itâŚ
Remove Value
and edit > Select Value
(both for scalars) can now select single value instead of range only (input value is converted to scalar data type before selecting, e.g. if scalar is unsigned int then ui input float value is converted positive integer, so input 1.789 will select 1 in integer scalar)Project
new parameter Strength
, at 1.0 points land on surface, at 0.5 they will move half way and so onSimplify
new method option Slice
, it does the same as Display > Percentage
, but it applies to points directly