Solved How to determine curve road slope ?

Discussion in 'Mod Support' started by DePains, Oct 26, 2018.

  1. DePains

    DePains
    Expand Collapse

    Joined:
    Nov 27, 2017
    Messages:
    105
    Hi,

    Most of my (blender) bezier roads on my map have HUGE (≈70% for some) slopes. So I'd like to make some signs with the slope indicated on them for everyone to be able to drive on them without having to get used to those (so far) ≈ 45 Km of asphalt and 25.6 Km of dirt "rally" road.

    I can estimate slopes trough any brush tool inside the terrain editor in-game (using max/min altitude indicated at the bottom right of the window and dividing by brush size, given that brush size is adequately chosen relatively to road width).

    But that's a gross estimate. Does anyone have a better idea ?
    Thanks !
     
  2. aljowen

    aljowen
    Expand Collapse

    Joined:
    Oct 21, 2012
    Messages:
    1,677
    You could measure from the gradient in blender?

    Since when you click on a node you can then find its xyz coordinates. From that you should be able to calculate the gradient of each slope.

    In fact, it would seem blender can do it for you...
    https://blender.stackexchange.com/q...en-edges-faces-or-change-the-angle-so-th/2334

    You would need to apply your curve modifier before going into edit mode on the road (so that you can select the faces), so make sure to undo that or not save if you are not ready to commit to that.
     
  3. DePains

    DePains
    Expand Collapse

    Joined:
    Nov 27, 2017
    Messages:
    105
    Thanks for the answer aljowen,

    I thought of calculating slope through blender's bezier nodes coordinates. A bit fastidious and worse than the brush method for correctness because of curvature and the fact that node spacing is to large to find a maximum.
    Capturedcran68.png

    As for the stackexchange forum link, that's making blender displaying face/edge angles versus the neighbouring face/edge. I would need the same thing but versus the horizontal/vertical. But I might just extrude a face next to the face I want the angle of and making the new one horizontal... And I'll copy my blend file anyway before turning my roads into mesh. You never know...
     
  4. thomatoes50

    thomatoes50
    Expand Collapse
    BeamNG Team

    Joined:
    Jan 31, 2013
    Messages:
    722
    baking your road mesh to plane, it will give you normals values.
    Then you should be able to calculate the average angle of the slope.
    Still not practical solution :|
     
  5. fufsgfen

    fufsgfen
    Expand Collapse

    Joined:
    Jan 10, 2017
    Messages:
    6,781
    Add pitch UI app, drive car up the slope, put number you like best to sign?

    Usually steepest part is what is put to sign.
     
    • Like Like x 1
    • Agree Agree x 1
  6. DePains

    DePains
    Expand Collapse

    Joined:
    Nov 27, 2017
    Messages:
    105
    Thanks thomatoes50 and fufsgfen,

    Using normal went through my mind too but as you say, not practical.

    But I totally forgot the pitch UI app, which I never used yet. And that is as simple as it is appropriate !
     
    • Like Like x 1
  7. DePains

    DePains
    Expand Collapse

    Joined:
    Nov 27, 2017
    Messages:
    105
    Well : too much slopes, curves and combinations. I would spend weeks just measuring and creating/placing signs.

    I have simplified things : I warn but that's all. The curve signs do the rest.
    Capturedcran92.png
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice