Jump to content
Marissa Farrell

Triangulation: A work in progress

Recommended Posts

Currently I'm working on an algorithm to generate random triangles within a source shape.

 

Here are some images and a video of my progress. When I find it more stable, a vwx file will be available.

 

MarionetteTri2.PNG

 

 

 

  • Like 4

Share this post


Link to post

A physical representation of this Marionette script - my intent is to create a dodecahedron lamp.

 

This was printed on a Wanhao Duplicator i3 V2 printer using Hatchbox Glow-in-theDark PLA.

 

The script will be available after a special update for Marionette on the forums :)

 

20161202_101435.jpg

  • Like 2

Share this post


Link to post

Hello MarissaF,

That's looking good!

Does it will work with a specified set of points?

Does it work in a non planar condition?

 

Best,

Rubén

Edited by RHF

Share this post


Link to post
2 hours ago, RHF said:

Hello MarissaF,

That's looking good!

Does it will work with an specified set of points?

Does it work in a non planar condition?

 

Best,

Rubén

 

Currently it only works on the x, y plane.

 

This should work reliably with any set of points. The way I have it set up is that based on your starting geometry, the bounding box is taken and a specified number of points are placed within that rectangular area. After that, the points are all checked to see if they exist on or within the shape itself, if the points lay outside of the shape they are ignored. The remaining points are then triangulated using Delaunay triangulation.

 

If you wanted, you could specify exactly where each of the points sit instead of them being randomly generated.

Share this post


Link to post

Thanks for your answer.

One more question: Will the algorithm be a node by itself or a complete Marionette setup?

 

Best

Rubén

Share this post


Link to post

Triangulation of points will be a standalone node. The node will rely on the scipy and numpy libraries which will be installed for you if they haven't already been installed. This node will only work in Vectorworks 2017 or newer.

Share this post


Link to post

This is really cool !

:x

5 thumbs up on the 3 thumbs scale.

Share this post


Link to post

And an unavoidable click for Alan.

It gets better and better.

 

Pity that my mind is not compatible with Marionette or Programming.

Share this post


Link to post

I had better come clean, I was teasing Marisa to see if I could get a bite but alas no result.

ths done with displacement mapping. Better demote me.

but will try to do this with marionette have tested and seems to work ok.

Share this post


Link to post
1 minute ago, Alan Woodwell said:

Better demote me.

 

Everything fine.

I wait until you do something really bad.

 

Marissa,

I suffer from triangulation :$

Like Slabs with openings when exported into a Mesh App.

Mesh Apps need ugly supporting Edges to build holes in a Face or planar set of polygons.

Therefore you would split the Face into quads at all of the hole's edges before and finally

delete a single quad poly to create your hole.

 

When Solids get finally meshed for export the triangles mostly start from one edge and you

often get ugly long thin triangles that in worst case even may overlap.

Similar happens for roads and such for DTMs in VW.

 

Could there be a more intelligent way to mesh complex solids (in theory) at all ?

(Beside not forcing triangulation for simple quad faces like the sides of a cube or wall)

Or is the current approach necessary and ideal as it mostly works with all complex conditions.

Share this post


Link to post

lol @Alan WoodwellI was so confused as to how you could have done that from just my image...

Doing that with Marionette would be as simple as it was with my other image processing network! Totally doable. You'll just have to wait for me to share ;)

 

@zoomer

I'm currently looking into making meshes from points, which is similar to what it sounds like you're trying to explore.

I haven't gotten very far - the problem is mostly that it's very hard to determine where the outside of a set of points actually is, especially if there are concave areas in the solid. I think the reason that meshes from solids have those skinny triangles is due to the polygonalization of the edges in order to keep the detail of the surfaces, but I may be mistaken.

 

There may be a better way to accomplish it, but I can't say that I've seen anything better than what you're describing.

Share this post


Link to post

No, in your case it looks quite good. :)

It was only a general question as you currently seem to deal with meshes.

And there are some occasions in VW where that is done already.

(DTM, C4D/FBX export, Mesh Objects, ....)

 

My question was if there can be a perfect solution at all in reality.

 

Currently I see that Solid's Edges aren't touched or further tessellated when a CAD meshes,

like you would do when you create a Mesh in a 3D Mesh App manually.

Everything happens between the vertices only. If you would arrange the triangles manually, you maybe

would choose different connections that could result in a better mesh.

Or if you have holes and need that supporting edges to the border of that face anyway, instead of getting any

arbitrary diagonal Edge to any Vertex, you may choose to make more Slices.

 

But could a computer or algorithm do the same "intelligent" work at all ?

 

Sorry, I think I am hard to understand.

I could look for some screenshots if any interest.

Share this post


Link to post

@MarissaFI was looking over the Python Imageing Library and would it be true in saying the answer lies therein to be able to read the RGB values for pixels which I can use in marionette to be able to extrude th height of each block based on the 16 bit or 32 bit colour value?

Share this post


Link to post

So for real this time, Used Marissa's ReadImageNode and GetPixRGB was able to produce a section of the image extrude by the pixel colour.

Will improve it to make it faster and do the the complete image later.

Capture.JPG

Capture-01.JPG

Capture.JPG

Edited by Alan Woodwell
  • Like 1

Share this post


Link to post

@MarissaFI simply love your Image nodes, the Art aspect of this is endless and can create wonderful pieces. Thankyou.:)

There are no lights in the  file only the image brightness. One with draped surface looks like snow.

Capture-01.JPG

Capture.JPG

Edited by Alan Woodwell
  • Like 2

Share this post


Link to post

If you can remember the magic eye photos, well you should be able to bring the 2 images together (using your eyes to go cross-eyed) as one in the centre to see it in 3D.

Capture.JPG

Capture.JPG

Edited by Alan Woodwell
  • Like 1

Share this post


Link to post

Hi,

Attached is the simplified file for the Image Processing for you to play with. See Video to understand how it works at;

 https://youtu.be/h0_ybZjAYak

@MarissaFAgain thanks to Marissa for the nodes which made it all possible.

Understanding this helps you in the overall understanding of Marionette.

ImgProcessing-03A.vwx

 

Capture.JPG

Edited by Alan Woodwell

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×