Jump to content
• Advertisement

# "explosion view" algorithm

This topic is 5162 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Hi there! I'm trying to build an algorithm for generating an "explosion view" of a (triangle tesselated) model being composed of different parts. So unfortunately no "explosions" in a special-effects way ;-), but rather a disassembly view of the whole model. Basically, there are some parts of the model plugged into each other and I need to find the direction to pull the parts out again automatically. Google showed up some stuff about "castability of polyhedra" that seems somehow related, but not exactly what I need. I thought about sending rays into arbitrary directions from each of the vertices of each part and check which rays do intersect another part of the model (like shadow-ray testing). A weighted combination of the directions with a low number of intersections should be a rather good approximation of the "real" pull-out direction most times, hopefully. But maybe there's a more accurate or faster approach? Do you think the above sketch of an algorithm sketch works for most "ordinary" parts (that is, e.g. a bolt plugged into a box-like shape)? Thanks a lot for any hints! Leonhard

#### Share this post

##### Share on other sites
Advertisement
The castability thing is indeed what you are looking for I think. It is an algorithm that determines whether an object 'die-cast' in a mold can be removed without breaking the mold. For this, a direction of removal must be computed such that the object can be removed from its mold -- this might very well be the direction corresponding to your part being removed from the object.

On the other hand -- is it at all possible to make a good explosion view of any model in a mechanic way? Just on intuition I'd say there'll always be cases where it just will not look right.

Greetz,

Illco

#### Share this post

##### Share on other sites
@Illco: Thank you very much for the fast reply!

Probably I should have a deeper look into those papers.

Unfortunately, determining castability _for a certain direction_
or breaking the mold into two parts divided by a plane
(what most papers seem to deal with) isn't exactly what I'm looking for,
as it's already known that each part is removable, but I need to find
the direction instead (without breaking the rest of the model ;-).

Indeed it's questionable if good automatic explosion views are
possible at all. I completely agree that some manual fine tuning will
nearly always be necessary.

#### Share this post

##### Share on other sites
I think the algorithm you proposed might work, but I'm not too certain. I don't have any first-hand experience with implementing this kind of algorithm, so this is just my theory:

In the bolt-box case you describe, you have to make sure your test rays are evenly distributed so combining them will indeed yield the ray pointing out from the box, parallel to the bolt. This introduces a new problem of where to cast the rays from? Perhaps the center of the object would do, but this certainly does not hold true for all cases. And exactly where is the center of a bolt anyway?

Another, perhaps more feasible approach would be to define the explosion ray in the model using two dummy vertices. For the bolt for example, you could put a dummy in the 'screw end' and a dummy at the top. This way it's easy to define the ray along which the part will move when it's exploded. It may not be the easiest way to do it, but in theory it sounds nice :)

#### Share this post

##### Share on other sites
@remigius: You're right, shooting the rays from the center of the object to be removed might not always work, that's why I thought of shooting rays from all of the vertices of the object and counting how many of them are "shadowed" / will collide. This might work more often, but will be quite expensive, I suppose. Thanks for the hint to use uniformly distributed directions.

Getting hints right from the modeler, like the dummy vertices you proposed, would be ideal. Unfortunately, the models I'll be working on will include nothing more than the pure model geometry.

Another idea I recently had is to find the vertices of the bolt that are farthest away from the box and take a weighted sum of their normals to find the direction for removal. Might this be a better approach?

#### Share this post

##### Share on other sites
I'm know expert, just sharing my ramblings, so I'm no authority on what's the best approach :)

Taking the average normal of vertices that are furthest from the box might work for the bolt example, but it's heavily dependent on the geometry. Even with the bolt, if you take the top of the bolt to be a typical cilinder, all normals at the top will be pointed outward, except for the cap... come to think of it, this might work after all because the outward facing normals will cancel eachother out...

I'll try to get back to you on this later...

#### Share this post

##### Share on other sites
There was a siggraph paper on this about eight years ago. I'll see if I can track it down.

#### Share this post

##### Share on other sites
@remigius: The problem with the normal averaging approach appears to be the choice of the right number and weighting of vertices (which are farthest away), so that normals with opposing directions will cancel each other out most of the time, as you pointed out. Let me know if you have a good strategy for that :-).

@Sneftel: I'd highly appreciate it if you could point me to a reference of this SIGGRAPH paper.

#### Share this post

##### Share on other sites
Alright, here's a couple of results... search Google Scholar, they should come up.

"Designing effective step-by-step assembly instructions"
"Automatic generation of exploded views by graph transformation"

#### Share this post

##### Share on other sites
@Sneftel: Thanks a lot! These papers look very promising.

It's amazing to see how much research has been done on this subject.
One widely-used way to find the removal direction seems to be the following: Find all triangle pairs that touch each other and try to move the part into the direction of the normal of these triangles. Using an acceleration grid for the position of the triangles, this should actually be feasible. (Although some tricky cases still remain, of course. For example, parts that can only be removed by rotation instead of translation. But that's too advanced for me right now :-)

[Edited by - leonhard on August 26, 2005 4:53:07 PM]

#### Share this post

##### Share on other sites

• Advertisement
• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• Advertisement

• ### Popular Now

• 16
• 11
• 9
• 25
• 54
• Advertisement
×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!