Build Mesh from point cloud using MayaAPI

452 views
Skip to first unread message

illunara

unread,
Jan 8, 2018, 10:54:50 AM1/8/18
to Python Programming for Autodesk Maya
Hi
I want to build an low-res mesh base on an array of meshs. Anyone has experience with this? 
Thank a lots

Michael Boon

unread,
Jan 8, 2018, 10:17:01 PM1/8/18
to Python Programming for Autodesk Maya
It can be done, and actually isn't too hard. Use the MFnMesh.create() function.

Give it a try, and if you get stuck, get back to us and someone here will be able to help you with specifics.

Tuan Nguyen

unread,
Jan 8, 2018, 11:29:52 PM1/8/18
to python_in...@googlegroups.com
Hi Michael
Thank you for your reply

However MFnMesh require polygonConnects, which i don't know how to retrieve. The cloud points are totally random.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0ec124ce-ac7c-4591-9846-10d322da78b1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael and Amanda

unread,
Jan 9, 2018, 12:58:43 AM1/9/18
to python_in...@googlegroups.com
In that case you'll need to figure how you want connect your points. I guess you want to construct a bounding hull around them. I've never done that, and it's far more complex that building the mesh in Maya will be after you figure it out. However I expect there are algorithms on the web, and possibly even something already written in Python that you can adapt.

On 9 Jan. 2018 3:29 pm, "Tuan Nguyen" <cb.il...@gmail.com> wrote:
Hi Michael
Thank you for your reply

However MFnMesh require polygonConnects, which i don't know how to retrieve. The cloud points are totally random.
On Tue, Jan 9, 2018 at 10:17 AM, Michael Boon <boon...@gmail.com> wrote:
It can be done, and actually isn't too hard. Use the MFnMesh.create() function.

Give it a try, and if you get stuck, get back to us and someone here will be able to help you with specifics.

On Tuesday, 9 January 2018 02:54:50 UTC+11, illunara wrote:
Hi
I want to build an low-res mesh base on an array of meshs. Anyone has experience with this? 
Thank a lots

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

Marcus Ottosson

unread,
Jan 9, 2018, 1:25:25 AM1/9/18
to python_in...@googlegroups.com
Not my expertise, but maybe you could generate a volume out of the points, and then a surface from the volume via e.g. metaballs.

On 9 January 2018 at 05:58, Michael and Amanda <boon...@gmail.com> wrote:
In that case you'll need to figure how you want connect your points. I guess you want to construct a bounding hull around them. I've never done that, and it's far more complex that building the mesh in Maya will be after you figure it out. However I expect there are algorithms on the web, and possibly even something already written in Python that you can adapt.
On 9 Jan. 2018 3:29 pm, "Tuan Nguyen" <cb.il...@gmail.com> wrote:
Hi Michael
Thank you for your reply

However MFnMesh require polygonConnects, which i don't know how to retrieve. The cloud points are totally random.

On Tue, Jan 9, 2018 at 10:17 AM, Michael Boon <boon...@gmail.com> wrote:
It can be done, and actually isn't too hard. Use the MFnMesh.create() function.

Give it a try, and if you get stuck, get back to us and someone here will be able to help you with specifics.

On Tuesday, 9 January 2018 02:54:50 UTC+11, illunara wrote:
Hi
I want to build an low-res mesh base on an array of meshs. Anyone has experience with this? 
Thank a lots

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0ec124ce-ac7c-4591-9846-10d322da78b1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAA27_yLtidYrUvm4DP3k6VNO%3DDHz%3DeG%2BPhXaYP3jN9mOBgHbrw%40mail.gmail.com.

Rémi Deletrain

unread,
Jan 9, 2018, 5:32:44 AM1/9/18
to Python Programming for Autodesk Maya
Poisson recom reconstruct mesh data from point cloud.

it's possible to found source code "here" and paper "here" for principe of reconstruction. Python binding in github "here". It's possible to transform source code for match in maya.
I found "this" to

Otherwise "MeshLab" make it very well and it's possible to convert vertex color to texture.

Marcus Ottosson

unread,
Jan 9, 2018, 5:43:23 AM1/9/18
to python_in...@googlegroups.com
Also found "convex hull" might be another good fit for the problem. Looks like it can also operate on randomly scattered points.

Tuan Nguyen

unread,
Jan 9, 2018, 10:25:10 AM1/9/18
to python_in...@googlegroups.com
I thought there will be an algorithm out there to solve this problem, but its sound much more complicated than that. I guess i will sit down and look at all references you have told me.
Thank you everybody for your suggestions

On Tue, Jan 9, 2018 at 5:43 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Also found "convex hull" might be another good fit for the problem. Looks like it can also operate on randomly scattered points.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD7F%3DoqhEE4Z%3Ds6od5in6WWUf_wQNYYOpSenETuO3ja8A%40mail.gmail.com.

Nicholas Yue

unread,
Jan 9, 2018, 10:47:55 AM1/9/18
to python_in...@googlegroups.com
What about using tetgen for meshing the point cloud?


Cheers

On 9 Jan 2018 7:25 am, "Tuan Nguyen" <cb.il...@gmail.com> wrote:
I thought there will be an algorithm out there to solve this problem, but its sound much more complicated than that. I guess i will sit down and look at all references you have told me.
Thank you everybody for your suggestions

On Tue, Jan 9, 2018 at 5:43 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Also found "convex hull" might be another good fit for the problem. Looks like it can also operate on randomly scattered points.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAMCvD%2BGdCUUrsbXXL8VE%2Bk7z%3D_Oa01k7A24B0s%3DRGC0P0CFmdA%40mail.gmail.com.

Tuan Nguyen

unread,
Jan 9, 2018, 11:07:47 AM1/9/18
to python_in...@googlegroups.com
Wow, look promising

On Tue, Jan 9, 2018 at 10:47 PM, Nicholas Yue <yue.ni...@gmail.com> wrote:
What about using tetgen for meshing the point cloud?


Cheers
On 9 Jan 2018 7:25 am, "Tuan Nguyen" <cb.il...@gmail.com> wrote:
I thought there will be an algorithm out there to solve this problem, but its sound much more complicated than that. I guess i will sit down and look at all references you have told me.
Thank you everybody for your suggestions

On Tue, Jan 9, 2018 at 5:43 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Also found "convex hull" might be another good fit for the problem. Looks like it can also operate on randomly scattered points.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOD7F%3DoqhEE4Z%3Ds6od5in6WWUf_wQNYYOpSenETuO3ja8A%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/7YH5txe4Yrw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CADYXiJJPc%3D_p347TAxmRKJiDM5agm84fdo4sVGA4odKFZPd1eg%40mail.gmail.com.

AK Eric

unread,
Jan 9, 2018, 12:32:43 PM1/9/18
to Python Programming for Autodesk Maya
It's also worth noting you can call to meshlab on the commandline, via meshlabserver.  It has it's own internal convex hull filter that's super easy to use via the gui or commandline if as a saved filter script.  Some examples here:

I have my own Python module that wrappers it's commandline usage callable from Maya, quite handy when needed.

vincent...@gmail.com

unread,
Jan 9, 2018, 9:02:52 PM1/9/18
to Python Programming for Autodesk Maya
speaking of metaballs, hermite rbf might be a good option to generate such surfaces from a given set of points. You can find both explanation and implementation here :
http://rodolphe-vaillant.fr/?e=12
Reply all
Reply to author
Forward
0 new messages