Meshing Points (Tree Structure)
3953 9 0- schiho
- Member
- 101 posts
- Joined: Dec. 2012
- Offline
I have created a bunch of points scattered in a tree-structure, i would like to mesh those, into tubes, is there any good solution?
I have tried to create a VDB and tried to fill the spacing between the dots, but it didn't work clean.
File is attached, would be really nice giving some hints. I don't have the direction vectors as attributes, but if needed for any method, i can rerun my sim.
thanks!
I have tried to create a VDB and tried to fill the spacing between the dots, but it didn't work clean.
File is attached, would be really nice giving some hints. I don't have the direction vectors as attributes, but if needed for any method, i can rerun my sim.
thanks!
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Online
- schiho
- Member
- 101 posts
- Joined: Dec. 2012
- Offline
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Online
how did you create those points?
if those are trailing points of some particles and you have stored v attribute of the particle leaving them, then it should be pretty straightforward to join them in cvex
additionally if you have age/time attribute which represents time from beginning of your sim till the trail particle is created, that can help to get correct thickness on the branches
and once you have points connected and proper attribute for thickness, you can use polywire to create desired tubes
can you provide those attribs from your sim?
if those are trailing points of some particles and you have stored v attribute of the particle leaving them, then it should be pretty straightforward to join them in cvex
additionally if you have age/time attribute which represents time from beginning of your sim till the trail particle is created, that can help to get correct thickness on the branches
and once you have points connected and proper attribute for thickness, you can use polywire to create desired tubes
can you provide those attribs from your sim?
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Online
- schiho
- Member
- 101 posts
- Joined: Dec. 2012
- Offline
Hey Tamte, thank you for the solution, that works great! I've integreated the Age value as well, i am creating the points based on a space colonialization algorithm described here:
http://algorithmicbotany.org/papers/colonization.egwnp2007.html [algorithmicbotany.org]
So i don't have a velocity attribute but a direction vector (so every created point as a direction from it's parent)
I could add branches as well in groups, but not there yet.
thanks!
http://algorithmicbotany.org/papers/colonization.egwnp2007.html [algorithmicbotany.org]
So i don't have a velocity attribute but a direction vector (so every created point as a direction from it's parent)
I could add branches as well in groups, but not there yet.
thanks!
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Online
if I consider direction from root to tips
now your direction vector points to next point
it would be great if the direction vector can keep that direction from previous point so that root point will have empty direction vector as there was no previous one and tip points would still have direction which is from previous point
the point of all this is if you invert those vectors and scale to segment length they will reach more or less the previous point and that will work even for branching ones, so the pointcloud lookup can be much more precise and you can get perfect connections
now your direction vector points to next point
it would be great if the direction vector can keep that direction from previous point so that root point will have empty direction vector as there was no previous one and tip points would still have direction which is from previous point
the point of all this is if you invert those vectors and scale to segment length they will reach more or less the previous point and that will work even for branching ones, so the pointcloud lookup can be much more precise and you can get perfect connections
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- schiho
- Member
- 101 posts
- Joined: Dec. 2012
- Offline
Hey tamte, your idea sounds great but the algorithm is evolving iteratively, so i would have to determine, that a new branch has started (when a treeNode gets 2 childnodes), so i would have to traverse the tree and retrieve the normals by determining which Node is a branch.
well….i could do that… let me provide you a solution tomorrow, i like your idea.
well….i could do that… let me provide you a solution tomorrow, i like your idea.
- tamte
- Member
- 8592 posts
- Joined: July 2007
- Online
not sure how that algorithm looks like
but if you are iterating from root to tips, you will know that direction as you first need to get that direction, then move the point, you you just need to remember direction in which the point was moved and not the direction in which you will move the next one as you have it now, shouldn't be any work at all, but depends on your setup
but if you are iterating from root to tips, you will know that direction as you first need to get that direction, then move the point, you you just need to remember direction in which the point was moved and not the direction in which you will move the next one as you have it now, shouldn't be any work at all, but depends on your setup
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- schiho
- Member
- 101 posts
- Joined: Dec. 2012
- Offline
-
- Quick Links