shatter help


#221

Hi, there is a script already there to convert particles to locators. Look in the dg_voroTK.mel file and you will see dg_parToLoc , this relys on another procedure; isPointInsideOfMesh, which in turn relys on the rayIntersect plugin, from Highend3D.
NB. I compiled the plug on my own machine, and named it rayIntersectCmd, so if yours is not named so, you will have to change that in the isPointInsideOfMesh proc.
eg this:

 if (!`pluginInfo -q -loaded "rayIntersectCmd"`)
  		  loadPlugin "rayIntersectCmd";
  

might be changed to this:

 if (!`pluginInfo -q -loaded "rayIntersect"`)
   		  loadPlugin "rayIntersect";
   

BTW, the rayIntersect is definitely the way to go for checking if particles or anything are in your mesh. Also it’s pretty easy to compile, so a good place to start if your interested in plug-ins.

If you can’t get the rayIntersect plug, it’s pretty easy to convert particles to locators. Have a read through the original script posted back in this thread.

Why locators? Well, they are easy to move around individually, you could deform a bunch of them with deformers etc, and also you could create them from point data read in from external applications;)

Cheers
Dave.


#222

As regards the cup problem, well the best way to deal with that is to understand why it might occur. A cup is a good example of an object that, when cut, might have a border edge crossing or enclosed by another border edge. I had a look to see if I could detect that somehow, but in the end I figured it’s a lot simpler to place a couple of hand fractures, so as that condition would not occur.
So for your cup, if you split it vertically, so when you look down you see two opposing ‘C’ shapes, you should have less trouble. Occasionally, there are other bad results, and I think these are when the cut plane lies directly on top or very near, a face. But this seems to happen rarely (if ever) in convex objects, and much less than 1 percent in concave shapes.
Here’s a very concave shape that broke up into 100+ pieces without problem: file:
Cheers
Dave.


#223

The cup problem is happening because certain cuts result in a mesh with more then 1 poly shell. Maya doesn’t know how to fill the hole and resolve meshes with more then 1 shell. Im working on a workaround at the moment, but its proving tricky :frowning:

The plan at the moment is to pick a random border edge on one of the shells, and find the nearest edge on the second border shell, do a poly bridge, then fill hole. That should solve it.


#224

Well the rayIntersect plugin is windows only.

From what I can tell there is no mac version, soo us mac users cant use the dg_voroTK.mel script to turn the particles into locators.


#225

is that rayintersect a standard plug-in or a third party one? ya, if we can keep this as platform-agnostic as possible, it would be good for us Mac users.


#226

Hmmm so i have a solution that appears to be working for the close boarder. It works for 2 shells only, but should be perfect for the cup example. I pretty much did what I was originally explaining, and it APPEARS to be working quite well. Ill add this to the script and see how well it behaves.


#227

its a plugin from highend3d
from what I know, if im not mistaken, it does the exact same thing that isPointInsideOfMesh does. which I dont even know how to use.

If someone can give us an example of what isPointInsideOfMesh does, or how to use it, that would be amazing.

AtrusDni,
its cool that your back on the script and it seem to be working.

also cgbeige is right. within the past couple pages, people have introduced us to several shatter and dynamic plugins, like DMM (from Pixelux) and the one from Td-College that DrGonzo has told us about. which might be going into beta testing soon.

There all for windows, and none for mac or linux. the great thing about this is, that since its a mel script, and even if they use python, thats still a multi platform language, which in turn can be used by everyone.

from what I have read, pixelux will be releasing the dmm plugin for mac, but not sure when it will be.

but im sure as of this point I speak for everyone that were thankfull for everything that everyone is doing here, from atrusDni, davegreenwood, sanctuary and everyone here for working together to not only figure out a problem, but also provide tools for the community.


#228

I’ve re-arranged the scripts I posted earlier slightly, to make the use of the dg_parToLoc tool easier. Download again from the original link, and check the read me.

Also here is a rayIntersect for maya 2009 OSX 10.5 intel.

It might work on 10.4, but I can’t check, and of course it will only work on 2009.
BTW if anyone is on a Mac, you should really install the dev tools. Maya comes with lots of example plugs, with xCode project files. It’s not that hard to compile your own plug-ins if your on a mac. (I’m speaking as a novice coder here…)

Cheers
Dave.


#229

Hi Michael,

Hmmm so i have a solution that appears to be working for the close boarder. It works for 2 shells only, but should be perfect for the cup example. I pretty much did what I was originally explaining, and it APPEARS to be working quite well. Ill add this to the script and see how well it behaves.

be careful with this one, I tried something similar, but there are several shapes you could start with that will give you more than one shell and you definitely would not want to bridge the borders. Have a look at the helix image I posted earlier, I couldn’t figure a way that would fix the cup but not break a shape like this.

I think the acid test is a helix shaped pipe, if anyone can break that up without errors I’d be very impressed.

I’m definitely interested in what you come up with.

Cheers.
Dave.


#230

thought people would find it fun that I used the Voronoi shatter script (few versions older one that works on OS X) in an EP label design:


#231

Kind of a bump kind of a reply. This thread is too good not to keep alive BTW. Just checking has anyone found/compiled a Linux rayIntersect plug-in?


#232

Great to see that you guys are working on the script… I’ve been an avid user of it.


#233

We have set up a blog here:
http://www.fracture-fx.com/

Regularly updated!


#234

Here are some simple sims done in Fracture - in slow mo
http://www.vimeo.com/5236340
http://www.vimeo.com/5236529
http://www.vimeo.com/5236491
http://www.vimeo.com/5236547

All these sims can be set up in under a minute.


#235

looks cool - can it add debris like Blast Code? and how’s the Mac version coming :stuck_out_tongue:


#236

That looks awesome Kevin!

Looks really robust, some really great results over there.


#237

looks cool - can it add debris like Blast Code?

Not yet, but it’s in the works.

and how’s the Mac version coming

We will focus initially on Win and Linux.


#238

Hi all, I see this thread has resurfaced. I finally took the plunge into Python, and the last script I did in this thread was a good basis for me to learn from. As well as translating into python, I took the opportunity to try fix the ‘cup problem’ and as a bonus there is a reasonable speed increase, mostly due to the way lists can be manipulated in Python. Anyway, if anyone wants to try it, I’ve attached to this post.
BTW, there seems to be regular requests for mac versions in this thread. I’d just like to make clear this script is intended to be entirely cross platform, but in addition I’m certain it will work on a mac because I developed it on a mac.
Cheers
Dave.


#239

thx davegreenwood for the script, i test it and work great!
but one little thing: it create lots of empty groups in outliner after shatter, i don’t know if those groups are doing something like construction history or something but at least they should be grouped together or deleted

anyway thank you for sharing!
great work! :thumbsup:


#240

hi, yes that’s because there is construction history on your original mesh. I’ve kept error checking to a minimum for speed, and that is the only issue I’m aware of. I have just been making sure I use the cleanest possible mesh, but I might fix that if I get time.
Cheers
Dave.