Advertisement

Craters in Terrain

Started by May 22, 2003 08:13 PM
1 comment, last by UponTheEnd 21 years, 9 months ago
I have terrain right now and i can transform the height of each vertex when i want to while running. my problem is say i have a big cannon or something that hits the ground from the enemy base. i want to make a crater showing that it hit therre, maybe even be able to get into the crater for some cover from the enemy. i was wandering what kind of math you would use to calculate the crater and which vertices to change to get a smooth effect. thanks alot
"What we do in life, echos in eternity" -- Gladiator
here''s an idea: you calculate the create offsets beforehand, something like this:


0 0 15 15 0 0
0 15 4 4 15 0
15 4 -8 -10 4 15
15 4 -9 -12 4 15
0 15 4 4 15 0
0 0 15 15 0 0

then center it on the heightmap where the cannonball landed and add the respective values. You can work on creating the crater offset image manually since it shouldn''t be too large.



Never do anything that is a waste of time and be prepared to wage long tedious wars over this principle - Michael O''Connor

"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared
Advertisement
I just got an idea right now :
Generate the required vertices for a sphere(the contact sphere...) then intersect them with the terrain...you would have to make a "boolean" operation with them...
Try to find near vertices from both objects and weld them(put from sphere to terrain,and also(if) remake the gldrawelements scheme,(don`t touch that!)),
I think youre talking about "Red Fraction" thing right ?

It was just an idea...

Relative Games - My apps

This topic is closed to new replies.

Advertisement