ScriptSpot home

Script

QHULL2MAX

By haavards · 2011-08-26

Community compatibilityNo compatibility reports yet

No reports yet for the available releases.

Community reviewsNo reviews yet.
Version
0.1beta
3ds Max compatibility
Unknown
How compatibility works

Choose the 3ds Max version you use. For example, selecting 2020 puts direct matches for 2020 first, followed by listings that say a supported version or newer.

Scripts that only mention an older version can still appear as “2020 unconfirmed.” Listings that rule out 2020 are excluded. Use “Show scripts with unconfirmed compatibility” to also see listings without a clear match.

Community reports show what worked for members on a specific release. They’re separate from the listing’s compatibility claims and don’t change the filter.

Date updated
2011-08-26
Legacy votes
5

Downloads

Description

(copypasta from my website)
QHull in 3ds max

I stumbled over the http://www.qhull.org/ library and it got some really powerfull features like computing convex hulls, Delaunay triangulation and Voronoi diagrams. Decided to try and get some of these features to 3dsmax, so first of is a 2d Voronoi diagram as a geometric object plugin and a convex hull script. Instead of writing a c# wrapper I took an easy workaround piping the output from the cmd window into 3dsmax using .net. I guess there is some extra overhead doing it this way, but compared to the meshing time in max, it is miniscule. For the 2d voronoi diagram you can interactivly change the number of points giving a instantly a new diagram/mesh. On my old pc I can mesh a diagram with 2-3k points interactivly.

The second script using qhull is a standard convex hull generator. I have not tested it against other convex hull generators in max, but I guess it is pretty fast where the meshing part and file IO in 3dsmax is the bottleneck.

I'm planning to add particle support to add points to the 2d voronoi diagram, but I'm having a hard time passing large strings as a argument in the cmd window. For the convex hull I solved it by writing the vertex data to a file and pass that on to qhull. This would not be a good solution for the particles if they are animated, as far as I can see. These two scripts are more like tests than full blow complete scripts, so it may be bugs in them!

Download:qHull2Max.rar

Extract all the files to the same location. If you permanently want to install the geometric plugin in you need to place it in the plugins folder as described in the help file, along with the qvoronoi.exe and rbox.exe files

More by haavards

View all contributions
Comments (7)

Comment policy

onodi.andras

VoroGlide

Hello havaards,
It would actually be pretty cool to have something like the VoroGlide in max. Do you think you could pass point position data to the qhull.exe to create the tessalation in max? A manual update would be just great for that.
http://www.pi6.fernuni-hagen.de/GeomLab/VoroGlide/index.html.en

haavards

If you got any specific request just post them and I'll look at it when I got time. :)

onodi.andras

Thanks a lot haavard. I should have known. :)
Have you any idea when you plan to add new features and release a new version of the voronoi object? I was planning to use the script for some architectural stuff, so passing through a bunch of point objects to the qhull executable would actually be quite awesome for this.
Keep up the good work!

haavards

Since it is a geometric primitive plugin you will find it in the "havardsc" category in the create tab after you run the script :)

onodi.andras

Installing problem

Hello Haavards,
I want to try the 2dVoronoiGeoObj.ms but I can't seem to start it. Starting a script doesn't do a thing. Can you help me out?
Thanks in advance

haavards

Yeah, but then I would have to update that file every time the user changes some setting in the particle setup, don't know if there exist a callback for that? Maybe a manual update button would do the trick :J
I will certainly look into it.

kilad

Cool! I tried it a while ago(the hull only), but wrote the positions to file both ways, to and from qhull. It worked fine, but the bottleneck was actually the meshing as you say. Wouldn't it work fine to step through the file on each frame?