OldUnreal / UnrealTournamentPatches

Other
1.03k stars 30 forks source link

[UEd] [469d] Brush scaling tool can leave brushes in a bugged/imprecise state #1662

Open dizzy-egg opened 1 week ago

dizzy-egg commented 1 week ago

Apologies if this has already been reported or discussed, but the brush scaling tool in UEd often seems to mess up even simple brushes.

For example if I resize a brush using the Snapped Brush Scaling tool (snap to grid enabled), the resulting brush can have BSP cuts or appear off-grid.

Illustrative example from a brush created without scaling tool:

             Origin   -00032.000000,-00320.000000,-00064.000000
             Normal   -00001.000000,+00000.000000,+00000.000000
             TextureU +00000.000000,+00001.000000,+00000.000000
             TextureV +00000.000000,+00000.000000,-00001.000000
             Vertex   -00032.000000,-00320.000000,-00064.000000
             Vertex   -00032.000000,-00320.000000,+00064.000000
             Vertex   -00032.000000,+00320.000000,+00064.000000
             Vertex   -00032.000000,+00320.000000,-00064.000000

Example from a similar brush created with scaling tool (note the imprecise coordinates):

             Origin   -00319.999969,-00032.000019,-00064.000000
             Normal   -00001.000000,+00000.000000,+00000.000000
             TextureU +00000.000000,+00001.000000,+00000.000000
             TextureV +00000.000000,+00000.000000,-00001.000000
             Vertex   -00319.999969,-00032.000019,-00064.000000
             Vertex   -00319.999969,-00032.000019,+00064.000000
             Vertex   -00319.999969,+00032.000019,+00064.000000
             Vertex   -00319.999969,+00032.000019,-00064.000000
SeriousBuggie commented 1 week ago

That caused by floating-point precision rounding errors. There no solution for that in general numbers. However if you try stay on grid and other conditions is meet, there can be apply some fixes. But this numbers usually not make difference for BSP, if builder do that properly. 469e contain a lot fixes for builder, so possible this difference not affect maps built on 469e. Can't say same for pre-469e.

SeriousBuggie commented 1 week ago

What exactly do you do? Brush scaling (snapped or not) not alter vertex coordinates. Do you make transform permanently after?