View Issue Details

IDProjectCategoryView StatusLast Update
0002965DarkRadiantMap Editingpublic20.02.2015 06:04
Reporterhypov8 Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionno change required 
OSwindowsOS Version7 x64 
Product Version1.7.0 
Fixed in Version2.0.3 
Summary0002965: clone selected brush making invalid plane
Descriptionif i make a triangle brush with the clipper (x) tool, then try to clone it(space bar) it will not make an exact copy of the brush

when i use copy and paste brush, it wil make it exactly the same

i added mape file to additional info.
1st brush was the origianl cliped one
2nd is the copy and paste version
3rd one is the cloned(spacebar) brush
Steps To Reproduceusing 8 grid, make a retangle brush, 128, 128, 64 high
use cliper tool in side view
place one point at a top vert and then one more on the opisite side vert but at the bottom
clip selection
clone the brush, it will move 8 units in 2 directions, then move the brush back to overlap the first brush
save brushes and open in notepad to see they are different

-57.24333953857422
-57.24337005615234
Additional InformationVersion 2
// entity 0
{
"classname" "worldspawn"
// primitive 0
{
brushDef3
{
( 0 1 0 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 0 -1 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 -1 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( -1 0 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0.4472135901451111 0 0.8944271802902222 -57.24333953857422 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 1
{
brushDef3
{
( 0 1 0 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 0 -1 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 -1 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( -1 0 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0.4472135901451111 0 0.8944271802902222 -57.24333953857422 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "textures/common/caulk" 0 0 0
}
}
// primitive 2
{
brushDef3
{
( 0 1 0 -128 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 0 -1 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0 -1 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( -1 0 0 0 ) ( ( 0.03125 0 0 ) ( 0 0.03125 0 ) ) "_default" 0 0 0
( 0.4472135901451111 0 0.8944271802902222 -57.24337005615234 ) ( ( 0.03125 0 0 ) ( 0 0.03124999813735485 63.99999618530273 ) ) "textures/common/caulk" 0 0 0
}
}
}
TagsNo tags attached.
Attached Files
invalid-plane.png (311,559 bytes)

Activities

greebo

greebo

13.01.2012 17:43

administrator   ~0004241

The inaccuracy you're seeing is due to the translations applied after the actual clone operation (the option to offset cloned objects is activated in the top toolbar, I assume). If you switch off this option, the brush is indeed the same in the .map file.

Moving them back after the offset is just another set of transformations applied to the brush faces, which results in the small inaccuracies. These are caused by the single precision floating point format DR is using since 1.6.0, I think.

Before 1.6.0 we had DR use doubles, but you can still see the behaviour when "nudging" brushes horizontally in version 1.4.0 (the error is in the order of 1e-15 there).
hypov8

hypov8

03.02.2012 14:07

reporter   ~0004292

i can see the same test in doom 3 cause these brushes
any brush i make with an angle aligned to grid is fine untill i move it
i can snap them back to grid after moved and it helps

the problem is that i been trying to move a whole area of a map and its causing faces to go missing etc..
you can notice in darkrad that these angled brushes are no longer in line
dersaidin

dersaidin

04.02.2012 16:28

reporter   ~0004296

I have seen this problem too, particularly when rotating groups of things.

I could reproduce easily:
1) making a some brushes with angled faces
2) group them into a func static
3) copy it and move it away from origin
4) add an extra brush on one of the corners so I can put it back in the same position
5) translate, rotate, translate, rotate, translate, rotate, translate, rotate, move back to original position...

Result:
http://www.dersaidin.net/doom3/darkradiant/precision.map
http://www.dersaidin.net/doom3/darkradiant/precision_transl_rot.patch

This is particularly problematic since good brush construction (imo) frequently requires angled brushes. In practice this results in hairline cracks all over the place.

I think the fix is a snap to grid tool: For each plane find the nearest grid aligned plane and use that instead of a calculated plane. Also want to ensure that vertexes which started at the same coordinates as each other finish at the same coordinates.
hypov8

hypov8

08.04.2012 02:02

reporter   ~0004450

another thing i noticed and it might be related, and you made a comment on, is rotating of entities via toolbar buttons.

if i make a player start, it defaults to angle=90, then hit the Z-Axis Rotate button and i comes up with some weird angle values
2.5044778340088669e-006
-89.999992370605469

could be causing rotated brush entities to get more off the grid
hypov8

hypov8

15.02.2013 05:21

reporter   ~0005064

update
i think the new patch seems to help with this issue, but its still present

0003272: Brush faces can shift over time
http://bugs.thedarkmod.com/view.php?id=3272
greebo

greebo

17.02.2015 17:38

administrator   ~0007423

Is this problem still there?
hypov8

hypov8

18.02.2015 06:11

reporter   ~0007424

Last edited: 18.02.2015 06:12

the issue seems to be gone
i can move and rotate anything and it will look the same as the original brush
ingame i dont see any missing or corrupt brushes either
the map file still changes a little but its not effecting anything

the only time i can get destroyed brushes is if i move them past 50,000 grid units
thats probly the limit of the decimal numbers causing that anyway

greebo

greebo

20.02.2015 06:00

administrator   ~0007427

Yes, single precision floats can only hold a certain amount of significant digits, at coordinates around 50,000 the post-comma values are bound to lose precision. I'm going to close this issue.
greebo

greebo

20.02.2015 06:04

administrator   ~0007428

Seems to be fixed with 2f5ff107b591c167a25a17ca5e791576140efb84

Issue History

Date Modified Username Field Change
06.01.2012 05:57 hypov8 New Issue
07.01.2012 11:32 greebo Status new => acknowledged
13.01.2012 17:43 greebo Note Added: 0004241
13.01.2012 17:43 greebo Status acknowledged => feedback
03.02.2012 14:07 hypov8 Note Added: 0004292
03.02.2012 14:07 hypov8 Status feedback => new
03.02.2012 14:10 hypov8 File Added: invalid-plane.png
04.02.2012 16:28 dersaidin Note Added: 0004296
08.04.2012 02:02 hypov8 Note Added: 0004450
15.02.2013 05:21 hypov8 Note Added: 0005064
17.02.2015 17:38 greebo Note Added: 0007423
17.02.2015 17:38 greebo Status new => feedback
18.02.2015 06:11 hypov8 Note Added: 0007424
18.02.2015 06:11 hypov8 Status feedback => new
18.02.2015 06:12 hypov8 Note Edited: 0007424
18.02.2015 06:12 hypov8 Note Edited: 0007424
20.02.2015 06:00 greebo Note Added: 0007427
20.02.2015 06:04 greebo Note Added: 0007428
20.02.2015 06:04 greebo Status new => closed
20.02.2015 06:04 greebo Assigned To => greebo
20.02.2015 06:04 greebo Resolution open => no change required
20.02.2015 06:04 greebo Fixed in Version => 2.0.3