Deforming Objects

Started by
6 comments, last by Techoptrix 19 years, 6 months ago
I am trying to find a direction for my final year project. I am looking at doing a 3d version of a 2d shoot-em up I did called Fren-zE for the PS2. The style of the game uses abstract primitives for creating enemies. I want to apply the same principle to generate 3d enemies by using cubes etc. I want the focus of my study to be the way the enemy explodes when hit by the players fire. Instead of having some predefined smaller pieces I want to destroy say the cube in real-time. How would I go about doing this and does anybody have any examples they can point me towards for reference?
Advertisement
Doesn't really have anything to do with AI, but anyway.

If you're just using cubes then when a cube is destroyed create 9 new smaller cubes (3x3x3) and position them so that they would constitute the larger cube. You can then apply physics/whatever and send them off in various directions. This could also be recursive, continuously breaking the cubes to the level of granularity you desire.
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
I'm moving this to the Game Programming forum since it has nothing to do with AI. I'm sure it will find an appropriate home once the original author better indicates what problems they are trying to solve.

Timkin
why are you using only cubes, your gonna have to use triangles to make these cubes, so why not just use other shapes?

then when an object explodes, you could leave its polys as seperate entities somewhere and add an explosion vector to each of its points, the vector could be a normalized vector from the center of the poly to the center of the explosion.
Idea:
To simulate cracking, you could clip the cube with "random" planes and give the pieces velocity pointed away from the splitting plane

Another thing could be CSG subtracting say an explosion sphere from the cube.
delete this;
I will be making the focus of my project something along the lines of the following:

An investigation into the use of (slice planes/clip planes) to create segmentation of a given object in real time, and how this compares to the existing methods employed in todays games.


I aim to be able to apply whatever the result is to more than just cubes, basically any poly.

Could anybody point me in the right direction for any resources on this kind of thing, i.e. how to apply a clip plane to a particular object for instance. I will then need to keep what would normally be discarded and join all the verts for both the new resulting objects from clipping and then use someting like looping through each of the new verts sequentially using tri strip to create the new faces.

Any ideas or discussions will be appreciated
Applying the clip plane to slice an object is fairly simple, you just test each vertex for which side of the plane it's on, for this just googling on clip planes should give you plenty of info. This could also be sped up using spatial partitioning on the model, again googling for spatial partitioning should give you some useful information (one example is axis-aligned bounding box (AABB) trees). You'll also want to look at how to insert extra vertices into the model at the slice point (since you probably don't want the result of the slice depending on the resolution of the vertices in the model).

Capping the open ends after doing the slice is a little more difficult. When dealing with convex objects is easier than concave objects, so you many want to limit your project to convex objects.

Perhaps something you may also want to consider is using heightmaps to slice the object rather than planes. Not too much more difficult than using planes and will allow you have jagged slices as well as perfectly straight slices (eg something getting torn rather than cut).
"Voilà! In view, a humble vaudevillian veteran, cast vicariously as both victim and villain by the vicissitudes of Fate. This visage, no mere veneer of vanity, is a vestige of the vox populi, now vacant, vanished. However, this valorous visitation of a bygone vexation stands vivified, and has vowed to vanquish these venal and virulent vermin vanguarding vice and vouchsafing the violently vicious and voracious violation of volition. The only verdict is vengeance; a vendetta held as a votive, not in vain, for the value and veracity of such shall one day vindicate the vigilant and the virtuous. Verily, this vichyssoise of verbiage veers most verbose, so let me simply add that it's my very good honor to meet you and you may call me V.".....V
Thanks for the feedback. Yes, the slice plane route is going to be the path Im taking although I do like the sound of the heightmaps to create that irregularity. Since I dont want that style of effect when i come to make the game to demo the study, I will stick at researching slice planes and spatial partitioning.

For now I will too stick to convex objects to make life a little easier. I have never used slice planes before and although I have only just spent 10mins during break in lectures I havent been able to find any specific tutorials or discusions on their implementation for slicing an object and generating the new vertices, any links would be nice although I will research some more later.

This topic is closed to new replies.

Advertisement