UnrealSP.org, now with 100% more Web 2.0!

Destructables

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: ividyon, Semfry, zYnthetic

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Destructables

Post Posted: 12 Jun 2013, 22:28

Finally you can now easily make destroyable maps and buildings, ships etc. \o/
http://www.ut99.org/viewtopic.php?f=5&t=4877
Destructibles- a simple way to make breakable stuff for your maps

Please take the time and read the instructions. There is a small learning curve but once you sort that out then the making and placing of destructibles will be quick and easy.

Installation: If you need help with this part then delete the mod and go back to Halo. Seriously.


Overview:
Destructibles have three classes- DestructibleGlass, DestructibleWood, and DestructibleStone. Choose the one closest to the material you are working with as the effects are tailored to each one.

To create:
With your map open, select the actor class browser and open the Destructibles.u package. Now, take your chosen BSP you want to make the destructible from and put your builder brush around it just like you are making a normal mover. Intersect the BSP and then right-click the "create a mover" button. You'll see three new mover classes. Select the one that is your material and the editor will make you a mover. Now place that mover where you want the destructible placed. It's almost ready for use once we adjust the properties.

Open the defaultproperties for your new Destructible mover. You will find these new settings:
ExplosionDimensions=
ChunkSize=
ChunkNumber=
ChunkTexture=
BreakingSound=

Let's do a quick rundown of these settings...

First, ExplosionDimensions sets the radius around the mover's center where the chunks will spawn. A higher number means the chunks spawn farther away. Small models will need 30-50 and larger models may need 100 or more. Experiment to see visually what looks the best given your chosen thing.
Next is ChunkSize. This is the size of the created chunks. 1 is default, 2.5 or 3 is pretty large and .25 is pretty small. Again, just test and see what works.
ChunkNumber is the number of created chunks when the object is destroyed. Don't overdo this number, try to be realistic. 3 or 4 usually works for stone, a few more for wood, and glass needs the most.
ChunkTexture is the texture the chunks will have. Does NOT need to be the same as the object being destroyed.
BreakingSound is the sound emitted from the Destructible when it breaks apart.
Lastly, there is a default setting in mover called "DamageThreshold". Don't forget to set this to whatever damage you want your object to take before it breaks apart. Consider this the 'health' setting for your Destructible.

You can see that we tried to make this mod scale from small objects to large ones by adjusting these settings. Overall it gives a good effect suite with very low overhead and minimal stress on the client and almost none on the server.

A few things to keep in mind:

Don't let your Destructible touch anything when it is placed. Because these are subclassed from mover they carry some of the weirdness too. Just give it a single unit of space and things will be fine. If you don't then the Destructible can get buggy and not work right. You were warned if you ignore this.
Also don't forget to set KeyFrame1 and move the Destructible to somewhere in the void that is outside your map. This will give the Destructible a place to go when it is triggered so that it appears it was destroyed to the player. We need to keep the mover and not destroy it since UT really doesn't like it if that happens so placing it's KeyFrame into the void accomplishes all that.

As always, improve this code if you want. Source was included so have at things. This works well for what we wanted and should fit a pretty big variety of sitations but develop on with it if you need something more particular.

Good luck!

papercoffee & gopostal

Early days, so not much to show yet, but here is an early vid of a beta.
https://www.youtube.com/watch?v=Pw67fsV0nlY
Make some stuff, break some stuff, but get creative 8)

Bleeder91<NL>
Skaarj Assassin Skaarj Assassin
Posts: 146
Joined: 24 Jun 2011, 18:45

Subject: Re: Destructables

Post Posted: 12 Jun 2013, 23:49

So basically a normal mover and an ExplodingWall merged together? :D

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Re: Destructables

Post Posted: 13 Jun 2013, 17:05

That may be a fair description, I'm not sure.
It is pretty much just combining what we already had with a little new coding.
One of those "what if..?" moments, and then "ooo that's handy".

I know you can't go too mad with it, and have a 100% destroyable map, but we can now blow the bloody doors in when the enemy refuses to answer the door-bell.
Explosives can now cause the damage you expect :D

Z-enzyme
White Tusk White Tusk
Posts: 2135
Joined: 13 Nov 2007, 20:01

Subject: Re: Destructables

Post Posted: 13 Jun 2013, 19:57

Dr.Flay wrote:I know you can't go too mad with it, and have a 100% destroyable map,


Image

User avatar MrLoathsome
Skaarj Lord Skaarj Lord
Posts: 150
Joined: 01 Jan 2009, 08:24
Location: MrLoathsome fell out of the world!

Subject: Re: Destructables

Post Posted: 14 Jun 2013, 16:16

This is gonna be cool.....
Mooo !

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Re: Destructables

Post Posted: 14 Jun 2013, 20:19

GAME-ON !!
You are going to get a head-ache Z-enzyme

BTW. I have asked before someone else asks me.
"Does it work with Unreal?"
The answer is no, but it can easily be made for Unreal by copying the classes.

If anyone here is interested in converting it, can they please keep it the same, or submit changes to Gopostal so we can keep the maps or items working for both games.

Z-enzyme
White Tusk White Tusk
Posts: 2135
Joined: 13 Nov 2007, 20:01

Subject: Re: Destructables

Post Posted: 15 Jun 2013, 09:26

I'm sooo into it. In Unreal 227 it could be abused to a massive extent with static meshes! Fully destructible map - hell yeah!
I can try to convert it to 224 and 227 so the mod would be compatible with both.

BUT, it can take me some time. Got a life here (like everybody DUH) and dozen of other projects. But THIS ONE I would definitely use for my Day of the Titan.

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Re: Destructables

Post Posted: 15 Jun 2013, 19:59

I'll try and keep everyone posted with any maps or vids that turn up.

User avatar Darkon
White Tusk White Tusk
Posts: 2211
Joined: 12 Nov 2007, 15:11
Location: P46153

Subject: Re: Destructables

Post Posted: 21 Jun 2013, 20:56

Nice.. but keep in mind that things can't float in air... irl that is. :P
there's more

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Re: Destructables

Post Posted: 22 Jun 2013, 02:11

If you want "real-life" go outside.
If you want "Unreal-life" go crazy.

In Sci-Fi and Fantasy, there is magic and anti-grav.
In our beloved game, there are 2 famous towers sat upon a floating rock.

Most versions of the classic Bathroom map, have a floater in the toilet.
Finally you will now be able to shoot the sh*t out of the sh*t.
Maybe releasing a secret peanut or sweetcorn pickup ?

There are maps with huge Dirigibles/Air-ships. They are floating movers.
"Whatever floats your boat" go for it.

Z-enzyme
White Tusk White Tusk
Posts: 2135
Joined: 13 Nov 2007, 20:01

Subject: Re: Destructables

Post Posted: 22 Jun 2013, 12:27

Dr.Flay wrote:If you want "real-life" go outside.
If you want "Unreal-life" go crazy.

True, but...
Darkon wrote:Nice.. but keep in mind that things can't float in air... irl that is. :P

... doable. I think.
You are using movers, right? Why not set collision radius and height properly, set the movement to Projectile and make layers of fracture movers? Like if six out of ten movers destroyed from a layer, destroy 4, move second and third layer down until one of the movers gets 'BUMP.LevelInfo' function call? Or even with a trace function.
[] - a mover

Code: Select all

[][][][][][][][][][] - layer 3
[][]    [][]    [][] - layer 2
[][][][][][][][][][] - layer 1

Or, by a connection scheme which is far more complicated. Base layer is the lowest one. Every base mover on startup traces the connection to the nearest mover, if not a base mover executes its function to trace other movers around and loop until you have a full connection. If there is no Base Mover in the connection scheme this mover executes fall function sticked to the rest of the net that remains. The mover that hits the ground (BSP) becomes the base mover and traces everything again. Should work.

gopostal
Skaarj Assassin Skaarj Assassin
Posts: 143
Joined: 01 Aug 2008, 06:35

Subject: Re: Destructables

Post Posted: 23 Jun 2013, 15:31

That's a damn nice improvement idea Z. Please feel free to march forward with this if you want to continue the mod. I'm going to be only doing my coop server for the forseeable future.

I briefly toyed with the idea of adding gravity to the movers once they were triggered (as an option) but the mover base code is really tricky stuff and I'm not sure it would work online like I wanted. Really I had high hopes for this mod but seeing the buggy nature of touching destructibles hurts the overall attractiveness of the mod quite a lot. You'll have to account for that too if you move them around in the map subject to other destructibles being destroyed. If they touch from the resulting movements it can mess up the occlusion tree and the movers can disappear in whole or part (faces). I wish I knew how to fix that :(

User avatar Dr.Flay
Skaarj Lord Skaarj Lord
Posts: 216
Joined: 23 Aug 2012, 06:24
Location: Kernow, UK
Contact:

Subject: Re: Destructables

Post Posted: 23 Jun 2013, 19:49

Indeed, as Gopo says, the torch has been handed forth, so that any bright-sparks, with any illuminating ideas, can light the way by making any changes them-selves.

Think of this project as "building-blocks" in every way.
Build with it, and build on it.
..I hear no fat-lady singing yet :D

User avatar Shivaxi
Gilded Claw Gilded Claw
Posts: 1911
Joined: 24 Jun 2008, 19:51
Location: Behind You! =P
Contact:

Subject: Re: Destructables

Post Posted: 26 Aug 2013, 03:19

personally im waiting for Dots to get UPhysX working again, as I had a few destructible things in the process, like a wooden walkway bridge that was fully destructible, chairs you could break limb by limb, etc. some other stuff...wish i had a video of it
http://img836.imageshack.us/img836/9950/shivavatar2.jpg Image

Waffnuffly: If there is any purpose for the god damned ocean, it is for us to eat it.
Jet_v4.3.5: I want to be Lincoln and kick Satan's ass. Emancipate and Proclimate on his ass.

redeye
Banned Banned
Posts: 1393
Joined: 08 Dec 2007, 06:55

Subject: Re: Destructables

Post Posted: 26 Aug 2013, 05:49

Yes but things go wrong.
Just ban everyone


Who is online

Users browsing this forum: No registered users and 6 guests