Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender 2.80 point cloud visualizer with sequence or animation? #12

Closed
enzyme69 opened this issue Jul 28, 2019 · 4 comments
Closed

Blender 2.80 point cloud visualizer with sequence or animation? #12

enzyme69 opened this issue Jul 28, 2019 · 4 comments

Comments

@enzyme69
Copy link

Hi Uhlik, just wondering with Blender 2.80 is almost out of beta, would it be possible to revisit your add-on and add special feature for:

  • Loading sequence of PLY point cloud data
  • Ability to see and pass point cloud data with bpy (for use in Animation Nodes, Sverchok, etc)....

Thanks again!

I am happy to donate for this~

@uhlik
Copy link
Owner

uhlik commented Jul 28, 2019

hi, both looks doable, but not easy. can you elaborate a bit? i have (currently) no need for such features, so i'd like to know better how to implement it..

loading sequence - something like loading of image sequences works in compositor? you select one image, then it tries to extract some seq number from its name and to find other images in directory? you can set number of, start frame, etc. than what? preload all ply files and store in memory? each frame new batch will have to be created and filled with data might slow down things (?) also, with sequences i would disable all extra features, just display options would be left..

passing data from elsewhere - something like

from view3d_point_cloud_visualizer import PCVInterface
pcv = PCVInterface()
pcv.init() # just in case there is no draw handler
o = bpy.context.active_object
vs = [[0.0, 0.0, 1.0]]
ns = [[0.0, 0.0, 1.0]] # optional, if not available pass None
cs = [[1.0, 0.0, 0.0]] # optional, if not available pass None
pcv.draw(o, vs, ns, cs)
# ... for example each frame call with new data
pcv.erase(o) # finished

something like that would be possible even now, only in a bit messy way.. i had to write something like that in because of recent editing features, but it is meant for internal use, no data checking, some conditions are assumed, etc.

best would be start with robust data changing during runtime and than get sequence loading for free..

@uhlik
Copy link
Owner

uhlik commented Jul 28, 2019

what about this? it is already commited. to draw something

import bpy
import numpy as np
from view3d_point_cloud_visualizer import PCVControl
c = PCVControl()
c.init()
o = bpy.context.active_object
n = 100
vs = np.random.normal(0, 2, (n, 3))
ns = np.array([[0.0, 0.0, 1.0]] * n)
cs = np.random.random((n, 3))
c.draw(o, vs, ns, cs)

when finished

import bpy
import numpy as np
from view3d_point_cloud_visualizer import PCVControl
c = PCVControl()
o = bpy.context.active_object
c.erase(o)
c.reset(o)

@uhlik
Copy link
Owner

uhlik commented Jul 31, 2019

ok, sequence is in (at lest, its first and easy implementation) and script access is also finished, have a look to readme..

@uhlik
Copy link
Owner

uhlik commented Jul 31, 2019

would you try it with sverchok, animation nodes, etc? i have no experience with any of them

@uhlik uhlik closed this as completed Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants