KillBait / AutoDrive_Course_Editor

A java based course editor for the AutoDrive mod, works with both the FS19 + FS22 versions of the mod
73 stars 13 forks source link

Nodes Height #15

Open Mayk-CLP opened 2 years ago

Mayk-CLP commented 2 years ago

Hi.

If I select "Fix Node Hight" or do a new connecting between to existing nodes they are sometimes too high.

KillBait commented 2 years ago

Can you elaborate a bit further on "too high"?, are they so high you cannot access them? or just higher than the other nodes?

The only heightmap data the editor has access to is not very accurate, so it can never place them 100% accurate (if it does, that is a happy coincidence).

BattleHook commented 2 years ago

I noticed this too, but the nodes still work and are accesable. If you want to have them at exact ground level you have to LMB-select in the editor in-game. Other issue though is nodes on viaduct and bridges. These nodes end up under the pavement. A possible solution is maybe to be able to select a node and give it the same height as another selected node? like aligning horizontal/vertical, but then in the "height-plane" ?

KillBait commented 2 years ago

The node placement height isn't ideal, but it's the best i can do given the heightmap data, i am still looking for another way to make the height more accurate, with some luck, that might improve.

A vertical alignment is doable, it shouldn't pose much of an issue.

Mayk-CLP commented 2 years ago

I have the same issue with nodes under Bridges. I think you are right that the Hight Map is not good enough to make a difference between some Grass and the Street level.

Dzi4d3k commented 2 years ago

Maybe assumption that neighboring points height shouldn't differ more than let say 1 meter would be enough?

BattleHook commented 2 years ago

@KillBait
"Added a menu item 'Fix Nodes Height', it will scan all nodes and fix the height to the correct values (if a heightmap was loaded) "

Some suggestions to improve : Maybe only perform "Fix Nodes Height" on selected nodes instead of on all nodes ? Maybe give nodes with exact integer value a different symbol (e.g. triangle instead of round) ?

KillBait commented 2 years ago

Maybe assumption that neighbouring points height shouldn't differ more than let say 1 meter would be enough?

My current thought is exactly this, but 1 meter is quite a lot, maybe a half meter is a good compromise.

Maybe only perform "Fix Nodes Height" on selected nodes instead of on all nodes ?

This has already changed and will be in the next version, it will only adjust a node if its height is hugely different from the heightmap location (something like 10 meters), running all nodes was just overkill in hindsight.

Maybe give nodes with exact integer value a different symbol (e.g. triangle instead of round) ?

If no heightmap is loaded and a new node is placed, it will default the Y to -1, is easy to change the node look to point those out,

the current list i have is.

(1) Add a height alignment like @BattleHook suggested. (2) Add a manual dialog box to edit the nodes location ( either menu or button ) (3) making any connection to a blank node inherit the starting nodes height (if it's valid).

Feel free to suggest anything else.

BattleHook commented 2 years ago

@KillBait I think that if those 3 items in your list get incorporated it is a huge improvement and I would be glad to see these incorporated.

Dzi4d3k commented 2 years ago

My current thought is exactly this, but 1 meter is quite a lot, maybe a half meter is a good compromise.

In first place I was going to suggest 0,5m, but I wonder what is longest distance between waypoints, and how it look on sloppy but straight road. Note that in FS it's common that slopes are than 10%, which IRL is already much, so if distance between waypoints will be more than 10m then with max neighboring height = 1m it will be not possible to do 10% slope. However it will be possible to create more waypoints and cope with higher slopes.

KillBait commented 2 years ago

It's been my observation that the max spacing AD puts between nodes is ~12 meters when your going in a straight line, a curved route obviously reduces the spacing.

One thought just came to me, as connection nodes can auto generate in-between nodes, how would averaging the difference between the start and end nodes work. for example, start node A has a y level 50, end node B has a y level 70, if 3 nodes are generated in-between, should the y levels be A=50, auto1=55, auto2=60, auto3=65, B=70. This sounds like a not terrible solution seeing as heightmap info might not always be available.

Dzi4d3k commented 2 years ago

start node A has a y level 50, end node B has a y level 70, if 3 nodes are generated in-between, should the y levels be A=50, auto1=55, auto2=60, auto3=65, B=70.

I would agree, cause I highly doubt that there will any bumps between waypoints, for example like on motocross track ;D

alex2ruote commented 2 years ago

This solution was my first thought too, but I wasn't sure about what's doable. This editor is truly a fantastic tool compared to the early versions and the only real bug left is this, but it's sadly a big one. If the height problem is fixed, one could just place enough key waypoints ingame and then finish the work with the editor much faster than driving around for hours.

KillBait commented 2 years ago

(1) Add a height alignment like @BattleHook suggested. (2) Add a manual dialog box to edit the nodes location ( either menu or button ) (3) making any connection to a blank node inherit the starting nodes height (if it's valid).

i just finished adding all 3 of these, initial testing seems ok, just need to try them a bit longer to see if they break

KillBait commented 2 years ago

I have pushed the commit and a .jar file to the beta branch, feel free to test it, there shouldn't be anything config breaking in it, but i recommend you use backup configs just in case

alex2ruote commented 2 years ago

Nice work, KillBait. The height alignment works pretty good. The only thing that would make it better would be the ability to select two points instead of one to close distant gaps where the two points differ in height. For short distances and flat terrain it's already a big help though.

Height Alignment