shatter help


#241

Awesome work Dave! I dont have time to pick apart your script at the moment, but whats the main difference? How did you approach the cup problem? Works good on my end. :buttrock:


#242

Wow :slight_smile: Is there any way to try your program?


#243

Hi Michael, yes, the ‘cup problem’. You know, I spent quite a bit of time trying to do that with edge bridging like we discussed earlier in this thread, but I just could not get it to work 100% reliable. The method I used in the end is to take the bounding box of the mesh, make a polycube of those dimensions, chop that up with the cut plane and finally use a boolean intersection with the original mesh. I’ll admit I was nervous to use boolean at all, but I knew the ‘cell’ produced from cutting the cube always made good geometry, so if the original mesh to be shattered is sound it seems OK. I’ve tried it on a few meshes, sometimes there is a warning of boolean operation not possible, but this has always been when the crack width has been bigger than a small shard so there is no intersection. There is still the chance of there being more than one shell in any one shard, but thats easy to rectify later.
Also, I’ve been working on a C++ version that would create a node of ‘cells’. This is incredibly fast compared to these scripts (25,000 cells in about 10 seconds). The problem is learning maya API and C++ at the same time is making progress slow. I’d be happy to hear from anyone who knows poly plugins well and is prepared to lend a hand for fun:)
Cheers
Dave.


#244

thanks dave - the script work great but I had a problem with a large mesh (it failed to do the Boolean). Do the locators all have to be insde the mesh? I was hoping that I could do a quick and sloppy breakup of a mesh.


#245

Hi, did you get an error or a warning? sometimes warnings are produced if there is no intersection with your original mesh, perhaps your points are outside the area, or the crack width is large. This is not necessarily a problem to the result. If you have an error maybe your mesh has topology problems? If you are starting from particles, try using the constrained locator utility… select mesh, then particles and the locators are only points within the mesh. I think as a rule you want to make sure you start with a really water tight mesh, with no construction history, for best results.

Cheers
Dave.


#246

I got it to work - it was my mesh. It had some nasty parts that needed cleaning.


#247

That would be awesome to convert this to a plugin, I cant even imagine how much faster it would be.


#248

Im quite impressed with this new ver of the script. I decided to perform a “stress test” on it, and try to break it, but so far its going quite well. Heres an example of an extruded sphere, where each face is extruded out and down, forming a complex concave mesh:

And it didn’t mess up at all. Great work Dave! :smiley:


#249

im having problems installing this

do i just put the script in my script folder then source it? or do I have to put something in my userSetup.mel folder??


#250

just drop both in your script folder and run

dg_voro_py_UI();

make sure you select the mesh, then the GROUP of locators, not the locators themselves (use the Outliner). it doesn’t work with particles.


#251

Wow! That’s awesome Dave, testing out the script now and it’s solid so far, works like a charm.


#252

it’s really a bad thing to join this thread so late…
you guys have done really great job there, the tools are simple but useful!
keep going, i’ll contribute what i can to help this out.


#253

s there any way to try your program?

You can sign up for beta-testing here:
http://undeclared-variable.com/contact


#254

Hi, I made a few corrections to the script I posted earlier, as I found a few problems breaking long thin objects. It can be downloaded here

Dave.


#255

Thank you davegreenwood!

haven’t tried yet, but anyway it’s an easy to use script.


#256

davegreenwood

I seem to be having problems with the Particles to Locators button

so i put the scripts in my script folder
then created a button with dg_voro_py_UI;
everything works fine, I click on the button the UI appears

but I seem to be having a problem with the particle to locators button

I select the particles and when I click on the button I get this error

Error: No module named dg_voroPy

Traceback (most recent call last):

File “<maya console>”, line 1, in <module>

ImportError: No module named dg_voroPy

Im on a Mac is that makes a difference.

Next to that
Thanks for this great tool.


#257

I had problems too until I realized that you have to click on the locator group node (use the outliner), not the locators themselves. Then it worked fine. I think there should be a clearer note about that in the interface since I’m likely not the only person who stumbled on that.

It works fine on the Mac - it was coded on one and I’m on OS X.


#258

I think were on different pages.

Doesnt the particles to locators mean, that it will take the particles and put locators in there place?

see I still may not be getting it

this is what Im doing,

create a cube
emitting from the cube and running it, soo a bunch of particles shows up on the cube.
I select the particles, and click on particles to locators, doesnt work
I created a locator, select locator then particle click button doesnt work
select particles to locator then click button it doesnt work.

its a little time comsuming to create a locator, move it, create another one, move it and so on and so on.


#259

select the particleShape node


#260

I am.
I still keep on getting the error.
I dont get what Im doing wrong.