You are here: Foswiki>Oasis Web>Diary>2023>2023-02-01 (12 Feb 2023, dwh)Edit Attach
2023-01-31 | 2023-02-01 | 2023-02-12

2023-02-01

TMA-1

Fan's of 2001: A Space Odyssey may recognise TMA-1 as referring to the Tycho Magnetic Anomaly a.k.a. 'The Monolith'.

20230201-DWH-001.jpg
TMA-1

From time to time our terrain creation throws up anomalies and we currently have our own version of TMA-1 near Ladybower Reservoir.

20230201-DWH-002.jpg
1
20230201-DWH-003.jpg
2
20230201-DWH-004.jpg
3
20230201-DWH-005.jpg
4

Triangles (everything is a triangle) that have been classified as 'highway' take their height from the nearest road centre line. The third image shows how we think the top of the monolith is getting it's height from a farm track instead of the road it is actually part of because road centre line is being clipped.

This is one of those fairly obvious bugs that make you question how something has ever worked. Can this really be the first time a road centre line is being clipped in this way? In mitigation, it probably is happening elsewhere but it is not usually noticed because mostly there are not such extremes of elevation and there are plenty of other road centre lines nearby, to erm... take up the slack - as it were.

One thing that really bothers me is that the code makes a big song and dance about clipping the road centre line. It actually goes out of it's way to do it. The second thing that bothers me is that I wrote that code and I have a nagging feeling that there was a very good reason for clipping it.

It's relatively straightforward to comment out the clipping part and see what happens - and that's clearly what I intend to do, but I really don't like the "comment it out and see what happens" approach.

20230201-DWH-006.jpg
Even more impressive in isolation

Pretty conclusive win for the "comment and see what happens" approach:

20230201-DWH-007.jpg
This is now fixed - but what have I broken?

Except it isn't fixed at all. The large anomaly has changed to a small anomaly:

20230202-DWH-001.jpg
Still broken

Time to eliminate things. First, the top view shows that the assignment of materials looks right, which implies that the triangles are being assigned the correct type. What you can see in the 'unlit' image below is a section of highway (dark grey) and what we call KerbH (light grey) - the horizontal part of the kerb. Also visible are two trees (one full and one partial) and two land areas 'trees' (dark green) and what is probably 'unassigned' - which shows as light green here:

20230202-DWH-002.jpg
Material Assignment

This is the lit version:

20230202-DWH-003.jpg
More confusing when lit

The wireframe show how complicated the triangulation is. All those narrow slivers are very worrying with the phrase 'floating point rounding error' ever present:

20230202-DWH-004.jpg
Terrifying

For reference: This is what a highway cross-section should look like. The 'hidden' transition area is only visible in the wireframe:

20230202-DWH-005.jpg20230202-DWH-006.jpg

This is an example of the sort of mess we get into when a highway is near the corner of four AS30s with a significant slope:

20230202-DWH-007.jpg
Boundary problem

The only proper solution to this is to calculate heights across boundaries, i.e. treat the AS30 we are working on as the centre of nine (3 x 3) AS30s.
I Attachment Action Size Date Who Comment
20230201-DWH-001.jpgjpg 20230201-DWH-001.jpg manage 116 K 01 Feb 2023 - 15:20 Main.dwh  
20230201-DWH-002.jpgjpg 20230201-DWH-002.jpg manage 392 K 01 Feb 2023 - 15:35 Main.dwh  
20230201-DWH-003.jpgjpg 20230201-DWH-003.jpg manage 185 K 01 Feb 2023 - 15:35 Main.dwh  
20230201-DWH-004.jpgjpg 20230201-DWH-004.jpg manage 474 K 01 Feb 2023 - 15:41 Main.dwh  
20230201-DWH-005.jpgjpg 20230201-DWH-005.jpg manage 443 K 01 Feb 2023 - 15:35 Main.dwh  
20230201-DWH-006.jpgjpg 20230201-DWH-006.jpg manage 208 K 01 Feb 2023 - 16:16 Main.dwh  
20230201-DWH-007.jpgjpg 20230201-DWH-007.jpg manage 224 K 01 Feb 2023 - 16:20 Main.dwh  
20230202-DWH-001.jpgjpg 20230202-DWH-001.jpg manage 308 K 02 Feb 2023 - 06:19 Main.dwh  
20230202-DWH-002.jpgjpg 20230202-DWH-002.jpg manage 265 K 02 Feb 2023 - 06:22 Main.dwh  
20230202-DWH-003.jpgjpg 20230202-DWH-003.jpg manage 329 K 02 Feb 2023 - 06:29 Main.dwh  
20230202-DWH-004.jpgjpg 20230202-DWH-004.jpg manage 410 K 02 Feb 2023 - 06:36 Main.dwh  
20230202-DWH-005.jpgjpg 20230202-DWH-005.jpg manage 345 K 02 Feb 2023 - 07:06 Main.dwh  
20230202-DWH-006.jpgjpg 20230202-DWH-006.jpg manage 370 K 02 Feb 2023 - 07:06 Main.dwh  
20230202-DWH-007.jpgjpg 20230202-DWH-007.jpg manage 342 K 02 Feb 2023 - 08:23 Main.dwh  
Topic revision: r4 - 12 Feb 2023, dwh
Warning: Can't find topic Oasis.WebLeftBarExample

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback