Two road mesh system & how they interact with Real Road effect

Discussion in 'Track Modding' started by svictor, Aug 14, 2020.

  1. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    255
    Likes Received:
    1,644
    Since more and more track conversion that involves two road mesh system have been made, especially those that have converted in a wrong way (for example, converted without the highly detailed road surface mesh).

    I feel it is necessary to create a thread to explain and discuss some important aspect of two road mesh system and their effect on RF2's Real Road.

    Most of the tracks that use this two mesh system are from Assetto corsa, other sims such as GPL and iRacing also use 2 mesh.

    Explain two road mesh system:

    Two road mesh system consists:
    1. Visual mesh layer. Those are for visual only, they don't contact with cars at all. They have much less poly count, very simple surface.

    2. Physical mesh layer. Those are invisible, but contact with car and tyres. And they have high density poly, such as the one created from laser scanned data or LIDAR (also some AC modder use some software to artificially create extra vertices&faces to improve none-laser mesh too). And usually this physical mesh doesn't have proper texture map.​

    Now, the bare minimum to activate real road for one road mesh object in RF2:
    Set instance name with RaceSurface prefix, set Deformable & CollTarget & HATTarget to True. As it was mention by one Dev 5 years ago.

    Note: the latest 397 track such as Portland no longer uses Deformable tag, maybe something has changed to real road.​

    How to make two mesh system work in RF2 (but not real road):

    1. Set both CollTarget & HATTarget to False for visual mesh layer (visible). And doesn't require Deformable tag.
    2. Set Deformable & CollTarget & HATTarget to True, Render to False for physical mesh layer (invisible).​

    Now, the reason why real road effect won't work with two road mesh system in RF2:
    Real Road effect requires tyre directly in contact with the surface, then this contacted surface will generate groove and marble and dry/wet area accordingly.

    However, visual mesh does not contact with tyre or anything, which means it will not generate any real road effect, even if you have real road shader or RaceSurface prefix. (Of course you can set this visual mesh as CollTarget or HATTarget, but then you will be driving on this flat layer obviously)​

    And one very important thing to mention:
    Either CollTarget or HATTarget will activate collision as soon as you set it to True. Whether you set only one of them to true or both to true, the tyre will be able to contact and drive on this particular road mesh.​

    The reason I mention this is because there are a few AC conversion tracks, which attempted to utilize AC's two mesh system, and what they did is:
    1. Set visual mesh to CollTarget=False & HATTarget=True

    2. Then set physical mesh to CollTarget=True & HATTarget=True, Render=False
    They probably think that enable only HATTarget=True for visual mesh will activate Real Road on visual mesh, but tyre will not contact with visual mesh. However the truth is, now tyre will contact and drive on visual mesh as well as physical mesh, depends on which layer is higher than the other.​

    Now, if modders really want to use two mesh system in RF2, what happens to Real Road?
    Since we have to make visual mesh not contacting with tyre, none of the Real Road effect will be generated on visual mesh.

    The car tyre will now drive on the invisible physical mesh, Real Road effect will be generated, but the graphic changes will be invisible for obvious reason.

    And the result will be two mesh system without visible Real Road (their grip effects do exist, just that you can not see).​

    So, can we retain the highly detailed physical mesh while also have all the Real Road effect and features?
    Yes, all we need is throw away visual mesh (no more two mesh system), use only physical mesh as racesurface. But it's not easy either, there are a few things need to take care:
    1. Physical mesh usually has gap between other mesh surfaces or objects ( usually a few millimeter or centimeter wide), this will look very bad and require extensive time to fix all the gaps (even take more time to find all of them).

    2. Since physical mesh isn't used for visual display, the texture UV map is probably wrong and not set correctly, this will require 3d software to fix them proper, extra difficulty.

    3. Physical mesh may not created with rectangle shape, such as some tracks from AC use large amount irregular mesh shape and varied vertices density. They can create visual artifacts for real road groove or marble, such as black patches here and there, or distorted groove texture.​

    And there are a few conversions that actually deleted physical mesh, and using visual mesh as driving surface, which means laserscanned/LIDAR surface is no longer there.

    Hope this article will provide some help to track making, and my knowledge and experience with modding is certainly limited, please help to correct for any mistake, or discuss for better solutions.

    Thanks.
     
    Last edited: Aug 15, 2020
    philrob, Mauro and Corti like this.
  2. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    3,442
    Likes Received:
    570
    TLDR...... two mesh system doesn't work in rF2.... never has from the start, nor is there a poly limit for tracks that AC has.
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    9,152
    Likes Received:
    4,231
    @Woodee you should have read it mate :p
     
    Corti likes this.
  4. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    3,442
    Likes Received:
    570
    I did.
     

Share This Page