Custom Collision Volume issue
Moderator: Moderators
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Custom Collision Volume issue
(Apologies if I describe this problem somewhat poorly, it's been a while since I had to deal with it, but we've run into an issue that requires it to be resolved:).
A little while ago, custom collision volumes were introduced. This was excellent, as we had plenty of units in IW where the old spherical volumes were insufficient and created some strange collision situations.
However, after we converted IW to use the custom collision volumes, we found a number of situations where units that were now using the custom volumes would at times take fire (and clearly be impacted), but take no damage from the fire.
After asking around, we were told (IIRC) that while there were custom collision boxes, the way damage was calculated (or as KDR tells me, the way AOE is calculated) is still determined from a sphere. This means that if the custom hitbox is hit by a weapon, and that weapon does not have sufficient AOE to make up the difference between the hitbox and the sphere, then the unit takes no damage (or, less damage).
Unfortunately, the result of this is that it largely moots the inclusion of custom volumes - anything that really needed custom volumes can't really be used, because it won't receive damage properly from many weapons (and in some situations, will be invulnerable from certain angles but not from others). Most things that 'get away' with the difference didn't really need the custom volumes to begin with.
Are people aware of this issue, and are there any plans to rectify it?
A little while ago, custom collision volumes were introduced. This was excellent, as we had plenty of units in IW where the old spherical volumes were insufficient and created some strange collision situations.
However, after we converted IW to use the custom collision volumes, we found a number of situations where units that were now using the custom volumes would at times take fire (and clearly be impacted), but take no damage from the fire.
After asking around, we were told (IIRC) that while there were custom collision boxes, the way damage was calculated (or as KDR tells me, the way AOE is calculated) is still determined from a sphere. This means that if the custom hitbox is hit by a weapon, and that weapon does not have sufficient AOE to make up the difference between the hitbox and the sphere, then the unit takes no damage (or, less damage).
Unfortunately, the result of this is that it largely moots the inclusion of custom volumes - anything that really needed custom volumes can't really be used, because it won't receive damage properly from many weapons (and in some situations, will be invulnerable from certain angles but not from others). Most things that 'get away' with the difference didn't really need the custom volumes to begin with.
Are people aware of this issue, and are there any plans to rectify it?
Re: Custom Collision Volume issue
I found that this was an issue, but only past a certain point. Raised the AOE on a few things, and voila, problem solved, and it didn't require a giant size change- mainly from 8 to 24, IIRC, which in Spring really doesn't matter very much in terms of gameplay. You'd think it would, but it doesn't.
The other issue is that you need to make sure that your centroid is properly offset, etc., so that Units are firing at the true center.
All of that said, I haven't seen major issues with any really large things with custom volumes at all. I have skyscrapers that are taller than anything else in Spring... no problems. I have lengthy units... no real problems. I don't have anything that's to-scale length of a warship or whatever, mind you, but I have plenty of stuff with linear lengths > 24 from centroid, and they register just fine.
Dunno why the change in minimum AOE dealt with it, but it did.
The other issue is that you need to make sure that your centroid is properly offset, etc., so that Units are firing at the true center.
All of that said, I haven't seen major issues with any really large things with custom volumes at all. I have skyscrapers that are taller than anything else in Spring... no problems. I have lengthy units... no real problems. I don't have anything that's to-scale length of a warship or whatever, mind you, but I have plenty of stuff with linear lengths > 24 from centroid, and they register just fine.
Dunno why the change in minimum AOE dealt with it, but it did.
Re: Custom Collision Volume issue
this completely depends on the weapon used, as argh said AOE is a rather crucial factor. it's a bit of a mess currently, i agree.
Re: Custom Collision Volume issue
Yes and no, respectively.Are people aware of this issue, and are there any plans to rectify it?
If a damage calculation method (ex.: "orthogonal distance to center-line") were suggested to me that doesn't suck and handles all weapon and volume types well, then the 'no' could become a 'yes' however.

Re: Custom Collision Volume issue
As long as we're making a topic about issues:
1. Units still use the model sphere in targetting code.
2. Kloot removed the tags to move and resize the model sphere from the unitdef.
1. Units still use the model sphere in targetting code.
2. Kloot removed the tags to move and resize the model sphere from the unitdef.

- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Custom Collision Volume issue
There is an impactOnly tag for weapons (which I highly recommend, by the way; I think most of the bugs have been worked out by this point). What it does:
- If it hits a unit's collision volume, it deals damage directly to that unit, with no splash damage and with no regard to distance.
- If it doesn't hit a unit it explodes as normal.
- Be sure to define an explosion generator for the weapon (even if it's just a null explosion); otherwise it will crash Spring.
Re: Custom Collision Volume issue
Nah, that got fixed. I think.
- Evil4Zerggin
- Posts: 557
- Joined: 16 May 2007, 06:34
Re: Custom Collision Volume issue
Oh it did? Well, one less reason not to use it :p
Re: Custom Collision Volume issue
In my experience it's sufficient to use impactOnly on things that have no notable AOE (i.e. will usually hit only one target) and anything that's large enough to hit multiple targets should also be large enough to reach across the difference between shape and radius.
Additionally for very large units where the shape simply isn't spherical it doesn't matter from my experience, impactOnly weapons will still miss and with AOE weapons people won't notice that the blast should not have reached the hull, especially since the footprint has to be square either way.
Additionally for very large units where the shape simply isn't spherical it doesn't matter from my experience, impactOnly weapons will still miss and with AOE weapons people won't notice that the blast should not have reached the hull, especially since the footprint has to be square either way.
Re: Custom Collision Volume issue
Footprint doesn't have to be square for aircraft. Considering how most spacecraft look in video games, I'd say the non-circular-collision-volumes would kinda fail for those.
I really wish they'd just gone with multiple spheres (explosions just pick the closest sphere) if we couldn't do arbitrary meshes. The little shopping-list of volumes just seems like it will be a pain to maintain.
I really wish they'd just gone with multiple spheres (explosions just pick the closest sphere) if we couldn't do arbitrary meshes. The little shopping-list of volumes just seems like it will be a pain to maintain.
Re: Custom Collision Volume issue
Footprints should probably be square for aircraft anyway because a rectangle that doesn't rotate looks stupid. For aircraft you have the easy case that a bullet that misses the collision shape will usually not hit the ground right next to the unit but just fly past unless it's flak and most flak has a large AOE anyway. THIS has no problems with its damage calculation.
Re: Custom Collision Volume issue
Also, have you thoroughly tested this in 78? Because my understanding is this: It uses the distance from the bounding radius of the collision shape when calculating damage done. The bug in 77 was that it never calculated damage against the unit it hit because the AoE didn't reach it's footprint. The unit hit is now always has a damage calculation run on it.
-
- Imperial Winter Developer
- Posts: 3742
- Joined: 24 Aug 2004, 08:59
Re: Custom Collision Volume issue
Well, in IW the issue is that AOE is the primary way to increase a weapon's anti-infantry potential, so most weapons have some small level of AOE involved in them to specifically increase their ability to hurt clumps of infantry. There are only a handful of units that don't have any real AOE to speak of.
For similar reasons it is not so easy to just go adding AOE to any units that may not have it.
In practice, there were a handful of units that were suffering from this (especially the commanders, who are really the last things you want to occasionally be invulnerable).
Lurker: Thanks for the clarification, I hope you're right, as that would seem that it would solve the problem (or atleast, solve the worst errors caused making it acceptable to use).
For similar reasons it is not so easy to just go adding AOE to any units that may not have it.
In practice, there were a handful of units that were suffering from this (especially the commanders, who are really the last things you want to occasionally be invulnerable).
Lurker: Thanks for the clarification, I hope you're right, as that would seem that it would solve the problem (or atleast, solve the worst errors caused making it acceptable to use).
Re: Custom Collision Volume issue
I have not had any issues with size. My large commander has been hit with small aoe and it takes damage fine.
if units have projectiles flying through them you have to add that collision volume check thing.
if units have projectiles flying through them you have to add that collision volume check thing.
Re: Custom Collision Volume issue
smoth wrote:I have not had any issues with size.

Re: Custom Collision Volume issue
The impcom has a huge sphere, that's not the issue. I think it might be related to all the c yardmap squares around it.Warlord Zsinj wrote:In practice, there were a handful of units that were suffering from this (especially the commanders, who are really the last things you want to occasionally be invulnerable).