|
Looking for a tutorial on shattering/physics
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Looking for a tutorial on shattering/physics // Roundtable
Post by davidjohnson // Aug 30, 2006, 8:15am
davidjohnson
Total Posts: 169
|
I remember seeing a animation of a Huge picture made up of cubes and then the cubes fell and shattered on the floor. Is there a tutorial for this? I want to try an effect that is sort of like that... |
Post by frank // Aug 30, 2006, 8:34am
frank
Total Posts: 709
|
This should be relatively simple using Adhesion in the tS physics engine. You would have to slice the mesh up a bunch, making separate objects, then group it all and apply the per-object physics. I forget what it's called but there's a way to apply to individual objects in a hierarchy / group.
One of the keys to making it realistic is the way in which the object is sliced. You can't just make arbitrary shapes, especially with glass. There has to be some type of pattern to it.
Here are some examples turned up by Google's Image search:
http://www.mib.org.uk/NR/rdonlyres/6B8CDB19-1E71-426C-93AB-2D2F1AE46445/0/splinter.jpg
http://www.jacksonglass.co.uk/images/main/broken_glass.jpg
EDIT: For building a breaking glass mesh, try CK Game Factory's Knife tool (part of PolyTools). |
Post by davidjohnson // Aug 30, 2006, 8:41am
davidjohnson
Total Posts: 169
|
Thank Frank. I am new at the physics so I am looking for a walk-through of sorts. It is just going to be a video-wall type of shot using cubes, so hopefully it won't be that hard... |
Post by frank // Aug 30, 2006, 9:02am
frank
Total Posts: 709
|
Here you go.
I'll have a sample animation up shortly. |
Post by frank // Aug 30, 2006, 9:27am
frank
Total Posts: 709
|
Here are some framegrabs from the animation. I think the results are fairly decent given the quick time this was done in.
For a more realistic example, I'd adjust individual adhesion or make the bigger pieces "stick" (ie. not simulate) as some glass would remain in the window, for instance.
Another thing would be to include a lot more smaller bits to the breakage. |
Post by davidjohnson // Aug 30, 2006, 9:29am
davidjohnson
Total Posts: 169
|
Frank it is awesome considering the short amount of time you spent doing it! I can't figure out how to slice, I am not getting that knife tool coming up (using 6.5), maybe it is only in later versions? |
Post by frank // Aug 30, 2006, 9:35am
frank
Total Posts: 709
|
David - the Knife tool is part of CK Game Factory's PolyTools.
http://ckgamefactory.hp.infoseek.co.jp/tsxe/polytool.html |
Post by davidjohnson // Aug 30, 2006, 9:54am
davidjohnson
Total Posts: 169
|
Ok, I think I got it. A lot of weird stuff happened when I try to cut it up, but the simulation look pretty good dispite having some intersecting lines somehow.
Now, is there a way I can create a cube with a resolution of 8 that will cut up easier than using the knife tool? Does TS have a break-up into parts or something?
I am also finding that if I drop the object, it will break apart nicely, but if I try to run the ball through it, like you did - it just goes right through it without breaking it apart, when allow collision is on, it just bounces off the vertices and doesn't make it break apart... I am not sure why...
And lastly (hopefully), is there a way to paint the entire piece with a texture and have the texture cut up a well, like a cube with a face the front only (just the face) that will shatter? |
Post by frank // Aug 30, 2006, 10:08am
frank
Total Posts: 709
|
Now, is there a way I can create a cube with a resolution of 8 that will cut up easier than using the knife tool? Does TS have a break-up into parts or something?
Not that I know of. If you are wanting to do some cube/block simulation (such as a brick wall) you may want to use individual cube primitives with the collision detection feature turned on. This way you can "stack" the parts and place them side by side and they shouldn't intersect but should be flush. ...then group them all together and follow the same procedure shown earlier. |
Post by TomG // Aug 30, 2006, 10:25am
TomG
Total Posts: 3397
|
Could use the array tool to make the group of cubes, then turn the array into a hierarchical group.
To save assign physics individually to each cube, could use the Object Replace tool to replace them all - make one cube with physics, and replace all the cubes in your hierarchy with that one, which has physical properties.
With careful set up, the array could make the cubes real close together, and some physics could finalise that to make them all sit on top of one another.
Apply UV mapping to the hierarchy so the texture is mapped over all the cubes at once, rather than each being individually mapped.
And there you go - could work? Avoids any cutting up, and does give you an absolutely regular set of cubes.
HTH!
Tom |
Post by frank // Aug 30, 2006, 10:40am
frank
Total Posts: 709
|
One thing I forgot to mention.
You'll notice in my example of glass breaking, I didn't use a glass shader. That's because I couldn't (in short time) figure out how to keep the individual pieces / cracks from showing up, even with reflection and refraction turned off.
A trick here would be to have two versions of the object, one pre-cut and another one that's all solid. You can have the solid one visible up until the point of impact, then hide it and set the broken one to visible.
The issue here, however, is that your simulation piece would show up "instantly cracked" as all the lines and such will be evident as soon as it's visible.
But anyhow, that's glass... Brick / stone / cement stuff should be easier. |
Post by Matski007 // Aug 30, 2006, 12:14pm
Matski007
Total Posts: 539
|
frank would you be interested in posting that tutorial on ts7.mat-ski.com ? |
Post by frank // Aug 30, 2006, 5:04pm
frank
Total Posts: 709
|
frank would you be interested in posting that tutorial on ts7.mat-ski.com ?
It's not a very comprehensive one but SURE, I wouldn't mind.
Lemme go see can I register...
UPDATE: Tutorial has been posted, Matski. :) |
Post by Rareth // Aug 31, 2006, 3:27am
Rareth
Total Posts: 149
|
nice, but I can't get to the ckgamefactory site for somereason it won't load |
Post by frank // Aug 31, 2006, 6:49am
frank
Total Posts: 709
|
I've attached a sample animation of breaking glass.
This was mostly for my own curiosity - to see how the visible/invisible keyframing of a solid and grouped version of the glass would look.
Although the bit with the solid (non-cracked) glass visible is very short, you can kinda get the idea. |
Post by Chester Desmond // Aug 31, 2006, 7:11am
Chester Desmond
Total Posts: 323
|
sweet.
looks very realistic .. I don;t think the 'perfect to cracked' thing is an issue as it all happens so fast. |
Post by Rareth // Aug 31, 2006, 9:16am
Rareth
Total Posts: 149
|
Looks great Frank. |
Post by Burnart // Aug 31, 2006, 1:01pm
Burnart
Total Posts: 839
|
Good info contained in this thread - nice one guys.;) |
Post by Steinie // Aug 31, 2006, 1:11pm
Steinie
Total Posts: 3667
|
Frank never ceases to amaze me with his little animations. Why don't you put together a longer movie sometimes? I for one would love to see it. |
Post by Zeipher // Aug 31, 2006, 1:50pm
Zeipher
Total Posts: 224
|
Frank never ceases to amaze me with his little animations. Why don't you put together a longer movie sometimes? I for one would love to see it.
Agreed! I tried to twist him arm on this one before :D |
Post by TheWickedWitchOfTheWeb // Aug 31, 2006, 3:22pm
TheWickedWitchOfTheWeb
Total Posts: 858
|
Agreed! I tried to twist him arm on this one before :D
You're not alone! |
Post by frank // Aug 31, 2006, 4:12pm
frank
Total Posts: 709
|
Frank never ceases to amaze me with his little animations. Why don't you put together a longer movie sometimes? I for one would love to see it.
Agreed! I tried to twist him arm on this one before
You're not alone!
:) Thanks, guys! It means a bunch to me.
I've been cooking an idea for the past few months but I can't guarantee it will ever see light.
:confused: |
Post by davidjohnson // Sep 1, 2006, 6:43am
davidjohnson
Total Posts: 169
|
Frank, that is a great animation and I am glad you are working on something that means alot to you!
I can't believe how good the glass looks and the realism of the break. Was that all using the knife tool? |
Post by frank // Sep 1, 2006, 5:57pm
frank
Total Posts: 709
|
Frank, that is a great animation and I am glad you are working on something that means alot to you!
I can't believe how good the glass looks and the realism of the break. Was that all using the knife tool?
Thanks, David!
I used CK Game Factory's knife tool to "cut up" the plane, based on how I thought the cracks would look (using real cracked glass images as reference). But yes, the knife tool was the only tool used to build the broken glass object.
The simulation could have been better (glass object was too thick, some physics properties could've been tweaked a bit more, smaller pieces added, etc.) But I think the potential is there to do some pretty realistic sequences.
I'm looking forward to seeing what kind of stuff you come up with!
One more tip: Right-click on the Start Simulation icon and change Collision Detection to "Vert/Face". This will help prevent things like objects intersecting. |
Post by Zeipher // Sep 7, 2006, 12:36pm
Zeipher
Total Posts: 224
|
I'm tryin this out using the knife tool. I chop everything up, and yet it stays as one object. I tried decomposing into different objects, and it does nothing. The sword tool, rather than the knife, chops everything up, but it doesnt seem to like looking pretty... everything sort of breaks apart strangely.
Anyone got any ideas as to why? |
Post by Burnart // Sep 7, 2006, 12:53pm
Burnart
Total Posts: 839
|
I've not much experience with this tool - I only looked it up after reading this thread! - but I did notice that you have to draw right across the shape from one side to the other to get it to cut properly. By this I mean start and finish outside of the object being cut.. |
Post by stan // Sep 7, 2006, 1:06pm
stan
Total Posts: 1240
|
Zeipher, there are two plugins called knife ckgame factory's polytool set has "knife 1.00" which is what Frank is refering to..
and the monster toolkit has "MonsterKnife" and "MonsterSword"..and monstersword is the one that cuts out of the two in monstertoolkit :D .. |
Post by splinters // Sep 7, 2006, 1:07pm
splinters
Total Posts: 4148
|
Not used this for a while but I remember having the same trouble-I was trying to cut a face but not going through each side. Think of the tool more like a sword than a scalpel; you swing it to slice through the block.
In other words...like Burnart said-try cutting right through. Pretty sure I tried it in an early TS7 so it should be fine. |
Post by frank // Sep 7, 2006, 3:46pm
frank
Total Posts: 709
|
On the Knife tool from CK Game Factory, right-click to see more options. When using it to split an object, be sure "Divide object" is enabled. If you have "Knife" enabled, it simply adds edges (and this too is fantastic if you need it). |
Post by Zeipher // Sep 8, 2006, 2:23am
Zeipher
Total Posts: 224
|
Ahh, cool stuff. Yeah, I was using MonsterKnife and MonsterSword. Shame, I could do with one with a bit more functions. How much is it? Would I have to purchase the whole of cooltools? Is MonsterSword just as good? |
|