Author Topic: Mysterious collision detection problem  (Read 2704 times)

0 Members and 1 Guest are viewing this topic.

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Mysterious collision detection problem
I've spent a couple of days trying to figure out a problem that I've more or less reduced to this very minimal test case. The problem: you can shoot/fly through some parts of the turret, both the base and the arm. The attached .zip contains just the .pof file in question.

It's modelled in 3ds Max 9, and exported to a .dae with the ColladaMax exporter. In pcs2 I simply make it recalculate the moment of inertia, change the texture to a retail one (so I don't have to include an irrelevant custom one) and set the rotation axis for the Turret01 subobject to "Z Axis". Obviously I've went through every detail I can think of and I can't find anything wrong with it that'd explain why it happens: there's no inverted face normals, I did reset x-form and all that in max, also tried the -node removal in the .dae, etc. I have no idea from which point in the whole process the problem originates from.

Much appreciation to anyone who can solve the mystery. :confused:

[attachment deleted by admin]

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Mysterious collision detection problem
I've noticed similar problems with some of the ships i've exported from 3dsmax 6 (plugin not colladamax). Certain area's of a ship will have shots passing through the hull. Also encountered a lot of this when I tried a humanoid shape, made the legs and feet seperate subsystems. All shots would simply pass through the feet completely and the legs were only hittable at the upper part.

So yeah... if anyone has any clue. I'd like to hear it as well
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 
Re: Mysterious collision detection problem
I believe subsystems don't extend the bounding box.  You'll need to place tiny polys (real small triangles will work) at the extended areas (tips of the toe, heal, etc).
That's cool and ....disturbing at the same time o_o  - Vasudan Admiral

"Don't play games with me. You just killed someone I like, that is not a safe place to stand. I'm the Doctor. And you're in the biggest library in the universe. Look me up."

"Quick everyone out of the universe now!"

 

Offline Col. Fishguts

  • voodoo doll
  • 211
Re: Mysterious collision detection problem
Yes, it's a known feature/bug of PCS2 (I'm not 100% if it was different in PCS1). Submodels that lie outside the bounding box of one of the main parent meshes will have no collision detection.

You can get around this by cleverly placing invisible polys which are part of the main mesh to extend the bounding box OR make it so that one of the lower LOD main meshes (detail1, detail2 or detail3) has a bounding box that encompasses all the submodels. Because I found this out by accident on a model where all the no-collision-detection vanished as soon as I included a lower LOD that was big enough to encompass all the submodels of detail0.
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Mysterious collision detection problem
Awesome, thanks a whole lot! That indeed seems to solve the basic collision detection issue. I'm still left with other problems though, but at least this is a very good start.

 

Offline Spoon

  • 212
  • ヾ(´︶`♡)ノ
Re: Mysterious collision detection problem
Indeed, I too must thank you guys, Scooby_Doo&Col. Fishguts.
Urutorahappī!!

[02:42] <@Axem> spoon somethings wrong
[02:42] <@Axem> critically wrong
[02:42] <@Axem> im happy with these missions now
[02:44] <@Axem> well
[02:44] <@Axem> with 2 of them

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Mysterious collision detection problem
All right, now I'm stumped on this:

In working.pof, collision detection works fine and the turret also actually shoots at stuff.

In not-working.pof, the turret just sits there idly and never does anything. Also, while collision detection works in the sense that shots impact the turret base and barrels just fine, flying my ship into the barrel results in an assert crash: ASSERTION: "pm->submodel[submodel_num].movement_type == MOVEMENT_TYPE_ROT" at modelread.cpp:3941

In both working.pof and not-working.pof the turret is exactly the same, the only difference is that in not-working.pof I extruded out one side of the detail0 object and moved the extruded vertices out. Nothing else changed, so this must be due to some odd bounding box -like thing. However, I have no idea whatsoever what it could be exactly or how I should fix/prevent it. Again, the situation could be summarized as: :confused:

[attachment deleted by admin]

 

Offline Water

  • 210
Re: Mysterious collision detection problem
Are you sure the turret works properly? From what I can see, all the rotation points are in the same place. Body, turret and barrel.

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Mysterious collision detection problem
Are you sure the turret works properly? From what I can see, all the rotation points are in the same place. Body, turret and barrel.
Well, it shoots at stuff. I'm not sure what you mean about the rotation points though, since AFAIK they are in different places. Turret01 has an offset and Turret01-arm has a non-zero offset, meaning the pivot/rotation points are in different places, no?

  

Offline chief1983

  • Still lacks a custom title
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Mysterious collision detection problem
I think your crash might be related to a bug I reported.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays