Announcement

Collapse
No announcement yet.

Darkplaces model collision question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Darkplaces model collision question

    Does darkplaces have support for any kind of custom collision? I'm making models for props and trees but the old square bbox collision quake has is only really good for certain things, it would be much more useful if I could have more accurate collision on models.

  • #2
    If you make them solid BSP, and set their size so that the box fully encloses the model, then the engine will run collision based on model vertices. It shouldn't matter what engine. Keep in mind this is fairly expensive computing power, so try to keep your moels somewhat simple. Spike can offer better details if you need more.

    As far as DP, yes there are custom solid sizes. If you look through the dpextensions, they should all be listed in there. Add the solid type to defs.qc and then assign it to the model. Seven is the guy to talk to for more info on this.
    'Replacement Player Models' Project

    Comment


    • #3
      That bsp collision sounds quite useful.

      Actually regarding that, if i were to make a model, then make a really low poly shape encasing the model and make it invisible in game - would bsp collision use the simple mesh encasing the model, or would it still try to compute the collision using all the vertices?

      Comment


      • #4
        Bloodshot

        Should work. Set the simpler model to alpha value of 0 (invisible) and make sure it has all of the same orientation properties as the parent model (complex one). In this case, the parent model could just be set to SOLID_TRIGGER or maybe even not solid. Keep in mind that velocities and physics react differently to different solid types, so it's probably best to only use this for stationary models.

        Also keep in mind that there are engines that don't support entity alpha, although with the majority of players using FitzQuake derivatives (QuakeSpasm, MarkV, etc.) or DP, this shouldn't be an issue. It's almost something EVERY engine should have at this point in time...I'd bet most players expect this feature now.
        'Replacement Player Models' Project

        Comment


        • #5
          Hmm, what about a model with multiple objects? like in DP, say i have an .obj with the main model, and a simple collision mesh with a fully transparent material making it invisible in the obj model. Basically including the collision in the model file itself without having to parent something else to it in code.

          Comment


          • #6
            That might work. I honestly have no idea. I don't see why it wouldn't. You could leave a small part of your UV map as straight-up alpha and unfold the transparent 'shell' onto it. Hell, you could probably even do this on animated models if you model it carefully. Worth a try, let me know what you find out.
            'Replacement Player Models' Project

            Comment


            • #7
              I forgot to post here but yes, using an invisible plane works. It also seems like really complex models with bunched up polygons can cause performance issues if they are too bumpy, so that seems to confirm that encasing the model in a simple collision mesh is quite useful and resolves those issues.

              That being said semi complex surfaces used like terrain seem to work fine too, they probably just can't be too non-uniform/irregular.

              Comment


              • #8
                Good to know, thanks! How did the terrain look? Since it's not a bmodel, the lighting probably looks funny on it huh?
                'Replacement Player Models' Project

                Comment


                • #9
                  I can't say as i didn't compile light. I tested it with DP's rtlights, but those are real time so...yeah

                  I'm sure having an area with uniform lighting it would look okay

                  Comment

                  Working...
                  X