Collision source priority

Discussion in 'Car Modding' started by Davvid, Jul 29, 2016.

  1. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    Hi

    I have big problems with crashing the cars on invisible objects, especially on kerbs.

    Does anyone know what is used for collisions detection when there is no single "CollTarget=True" gmt object in GEN file ? Yet in game the car still respond to all collisions just like that. I'd like to narrow what object is responsible for that crashing and I'm puzzled what the rF2 is really using... I thought that in the absence of any collision=true objects car would behave like a ghost but apparently that's not the case.

    And moreover when I set a special collision object, will it then really have priority over the regular body objects ? What's the point of "CollTarget=False" parameter if it isn't respected at all ?

    I'm really confused I must say, can anyone explain how it works ?
    TIA
     
  2. Ozzy

    Ozzy Registered

    Joined:
    Dec 18, 2013
    Messages:
    277
    Likes Received:
    26
    Rf2 is using a special collision mesh for cars. I remember a thread where they said you can either assign a specific one or it will be generated on the fly. Hope this helps a bit.
     
  3. GFraser1965

    GFraser1965 Registered

    Joined:
    Oct 6, 2010
    Messages:
    13
    Likes Received:
    0
    I presume this is the same as rFactor1 where your car would collide with guard rails, trees, and buildings based on the feeler file parameters. Car-to-car collisions occurred using the collision box colltarget=true.
     
  4. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    Feelers are supposedly non-existing in rF2. But Ozzy is probably right with creating collision model on-the-fly. But the question about priority remains (when one specifies custom coll model in GEN).
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,385
    Likes Received:
    6,601
    If there are gaps between verts you will get phantom collisions. This can happen on kerbs, kerb/grass/dirt/concrete joins, fences with gaps, etc. Converted tracks (from non-ISI games, because most rFactor style tracks are built in a way that avoids it) will usually have this issue.

    *The collbody also needs to be smooth. You want a tub, not just a lower poly version of the body, because the angled faces will cause problems.
     
  6. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Rfactor will make a coll object for your car, it will be about 100 triangles I think, this might have changed recently and been made higher, but I'm not sure. If you are hitting things on the ground, ie curbs, is most likely an undertray issue. Here's a message from Michael Borda about the undetray points:
    "Usually that means the collision model is hitting the ground before the undertray points are. Undertray points are 'softer' and have some give in them, collision model ATM, is very harsh.
    Make sure you're using all 12 undertray points, and that you have at least 6 on the very outside of the car. Keep in mind the first 4 are used for the diffuser calculations as you're probably aware...
    If the body in general is too low to the ground, as some modellers sometimes do, you can use GraphicalOffset in the HDV, this will lift the collision model too. But I would be careful about overusing this variable.

    -MB"
     
  7. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    Thanks Lazza & Coutie. I'm aware of gaps in 3d meshes and undertray points etc. We have a canoe-shaped collision model. But it's not enough. I even lifted that coll model half a meter but that changed nothing. What's more ISI cars ride flawlessly over those curbs. But question about collision priorities is still valid because our coll model doesn't cover front wing, yet in game every touch of the wing is detected so the game then doesn't use only custom explicitly defined collision model but real body shapes of the car, too.

    Finally, after many trials&errors, we found the offender. These are undershadows objects. After removal from gen there are no more crashes over curbs. I don't know why but apparently those undershadows objects somehow are collidable, too. Very strange.
     
  8. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Should be like this: MeshFile=XXX_SHAD.gmt CollTarget=False HATTarget=False AmbientObject=(True,Texture)
    Then there should be no issue.
     
  9. Davvid

    Davvid Registered

    Joined:
    Feb 11, 2012
    Messages:
    163
    Likes Received:
    31
    I know it should work like this but then it makes mentioned issues.
     

Share This Page