Batch fixing upside down Billboards objects using Blender

Discussion in 'Track Modding' started by svictor, Sep 10, 2023.

  1. svictor

    svictor Registered

    Joined:
    Jan 20, 2019
    Messages:
    1,001
    Likes Received:
    6,754
    Here is two methods for batch-fixing upside down Billboards objects using blender, which can be applied to any number of objects, other 3D software should have similar tools to do this.

    Some discussion about upside down Billboards issue can be found in thread here.


    Method 1
    The first method is to do 180 deg Rotation on Y-Axis of Global View using Individual Origins, then also 180 deg UV rotation. This method basically rotate whole mesh upside downside to fix issue with vertex/face order, and Individual Origins allows each mesh to be individually rotated without changing position. I used this method on both Isle of Man & Dundrod previously, as direct GPL to RF2 conversion always end up with upside down issue when converting GPL objects to rF2's Billboards objects.

    Steps as following (see pic):
    [​IMG]
    1. Switch to Individual Origins from Transform Pivot Point menu.
    2. Select all Billboards objects that have upside down issue, Press TAB to enter EDIT mode.
    3. Press 3 to enable face selection, press A to select all faces, then press R, manually type 180, then press Enter.
    4. On left-bottom screen Rotation dialog, set Axis to Y, and Orientation to Global.
    5. Switch to UV Editing tab at top, on the left UV editor, switch to Individual Origins from Pivot menu.
    6. Make sure mouse point is in UV editor area, then press A to select all UV, and press R, manually type 180, then press Enter.
    7. Done. You can now press TAB again to return to Object mode, and can now be exported or converted to Billboards objects using other APP such as gJED, 3dsimed, etc. Of course don't forget to apply 0.996 vertex alpha (in blender or 3Dsimed or 3dsmax) before converting to billboards.


    Method 2
    The second method is to manipulate the order of triangulated faces using blender built-in Sort Elements option, which is inspired by @Frederick Alonso finding about vertices order in this post.

    The reason I choose reordering faces instead of vertices is because changing vertices order does not fix upside down issue after exporting from blender (not sure if there is different behavior in 3dsmax). To test this, I have wrote a blender script to precisely change the vertices order uniformly based on face orientation & normal direction, tested with various combinations such as 0-1-2-3, 1-0-3-2, 0-2-1-3, 2-0-3-1 (bottom to top order), but all failed to fix upside down issue. After doing more comparison between good meshes and upside down meshes, I noticed that those good meshes always have a 0-1 (bottom to top) faces order, while upside down meshes have 1-0 faces order, and faces order is not affected by vertices order.

    Steps as following (see pic):
    [​IMG]
    1. Open Preferences, enable Developer Extras. Then enable Indices under Developer from Show Overlays menu.
    2. Select all Billboards objects that have upside down issue, Press TAB to enter EDIT mode.
    3. Press 3 to enable face selection, press A to select all faces (if there are Quad faces, press Ctrl+T to triangulate them also), then press P and select By Loose Parts. Now you will see all meshes are separated into individual objects, this is to ensure that faces reordering would limited to each individual meshes.
    4. Press TAB twice to re-enter EDIT mode with all those separated individual objects.
    5. Press A to select all faces. You can see now that all triangulated meshes have a 1-0 (bottom to top) faces order.
    6. From menu Mesh > Sort Elements, select View Z Axis, and now all meshes have a 0-1 faces order.
    7. Press TAB again, then press Ctrl+J to join all individual objects into one object, and can now be exported or converted to Billboards objects using other APP.
     

    Attached Files:

  2. Frederick Alonso

    Frederick Alonso Registered

    Joined:
    May 29, 2020
    Messages:
    408
    Likes Received:
    2,691
    Great you found out :)
     

Share This Page