Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm new to 3D game dev and was wondering if anyone could help me out.

I'm planning to use UDK and would like to have deformable items in the world.

So a projectile strikes a target, and a dent or hole is inflicted.

At first I thought there might be a way to load a mesh at the impact point and then "subtract" that mesh from the target mesh. Is this possible? This would allow me to have different "impact effect" - like thin and deep, or wide and shallow. (Similar to this, but without requiring DX11)

I've searched for this but not sure what to call it (deformable meshes, boolean mesh operations, etc), but if it already has an answer then that would be great.

If my approach is wrong, could you point me to any alternatives? Don't really want to go down the chunks route.

Or, if Unity etc. supported it, then it's not too late for me to change engine.

Thanks very much, Martin

share|improve this question
    
If I'm not mistaken, "The Museum of Microstar" Unity demo used displacement, but it required DirectX11 too, so it would be a good place to dig more info about it. Overall, Unity gives you acess to the mesh and you can modify it in runtime, so you can code your own functionality. There are packages that use this functionality in other ways, like Shatter Toolkit, so you can get an idea of what you can do with it. –  golergka Apr 26 '13 at 11:41
    
Thanks for those, I've also been looking into the MegaMesh plugin for Unity, but its not ready for relaase yet. There is a boolean operator plugin in the asset store, but seems to struggle with mid-high poly meshes, I will experiment asap and update this when I know more. –  Martin Lyne Apr 26 '13 at 11:50
    
TBH, bullet decals are usually just that, faked decals with a parallax or other 3D type shader applied to give the impression of actual damage. Doing actual geometery deformation is usually not bothered with due to the complexity of doing so in realtime. You're into the land of voxels at that point. –  Matt D Jul 11 '13 at 1:12
add comment

closed as too broad by BlueRaja - Danny Pflughoeft, Anko, Byte56 Feb 4 at 15:21

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

3 Answers

You could consider the approach outlined here:

http://answers.unity3d.com/questions/316064/can-i-obscure-an-object-using-an-invisible-object.html

(The answer is written in terms of unity, but the same shared based applies to Unreal as well.)

Basically you add geometry to your game that only writes to the Z buffer, and then draw the objects that need holes in them. This is pretty speedy, as it can be done without modifying the meshes at the cost of two additional draw calls.

The biggest problem is that if two bullet hole receiving objects are back to back, a bullet hole will go though all such objects until a bullet proof object is reached. (This may actually be desired in some cases). However if only some geometry in your game like wooden doors and the like can receive bullet holes, the effect could be pretty convincing.

share|improve this answer
add comment

Typically what you're asking for is non-trivial. There are some expensive middleware packages for this feature, but not a lot of free ones.

A straight-forward (but still non-trivial) approach is generate pre-broken versions of geometry and then to switch to those. This requires more art investment and has a number of limits, of course. Good investment in tools can improve the workflow but will take some time to get up and running.

Difficulties of this in general are those objects are 3D (with multiple "materials" internally). If you blow up a hill, you don't just want to depress the grass on it. You want to generate dirt, stone, and clumps of turf that landed nearby. To put a hole in a wall, you need to know what the inside of the wall looks like (walls are not infinitely thin planes in real life). Putting a hole through an entire building in your scenery is that much harder. Handling physics appropriately (e.g., ensuring a structure collapses if you remove its supports) is even harder still, since you need to model the structure intricately both visually and physically.

You can hack around a lot of this with some basic assumptions and tricks. Walls can have "decal" objects that are placed around a hole to make it look rougher and hide/cover the spaces between the inside and outside of the wall. Generating the hole in real-time is still a trick, though; AAA solutions precompute these holes, often with high-powered algorithms and very extensive and complex tools integration.

The difficulty of properly handling deformable terrain is partly why you almost never see it outside of a few precomputed cases and games like Scorched Earth (which is all 2D). It's possible, but not easy, and potentially unfeasible for complex types of terrains and structures.

Note that both UDK and Unity use NVIDIA's PhysX, which is one such middleware with "destruction" capabilities. UDK includes a "fracture" tool in UnrealEd using the APEX Destruction toolkit with PhysX to do things the precomputed way mentioned above. It's up to you to decide if this is "good enough" for your needs or not.

share|improve this answer
add comment

If it is still not too late to use Unity you can try this: https://www.assetstore.unity3d.com/#/content/9411

In the description you can check out a video and a realtime webplayer demo showcasing the main features :)

share|improve this answer
1  
Welcome to GD.SE! When posting links here it is usually standard to explain the contents of the page in the answer, as it prevents frustration for future viewers if the page is migrated or goes down. –  handuel Jul 23 '13 at 19:47
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.