View Issue Details

IDProjectCategoryView StatusLast Update
0004747DarkRadiantMap Editingpublic09.01.2020 19:25
Reporterillwieckz Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityalways
Status closedResolutionfixed 
Platformx86_64OSUbuntuOS Version17.4
Product Version2.3.0 
Target Version2.6.0Fixed in Version2.6.0 
Summary0004747: CSG Make Room operator does not fill the room on 3-edge prism case
DescriptionWhen applying the CSG Make Room operation on a 3-sided prism, the inner faces of the generated brushes are too small. And with other prism, it's just very ugly because brushes are intersecting themselves. In fact current code only works correctly with cubes.
Steps To Reproduce- create a Brush and keep it selected
- menu Brush → Prism
- enter 3 Sides
- apply the CSG Make Room operation

You can now move your camera within the prism to see the room is not closed

Reproduce the step with a number of side greater than 4 and you'll see how the brush are mixing themselves.
Additional InformationGtkRadiant similar operation (named “CSG Hollow Touch”) produces very nice brushes, but their code looks less abstracted an more low level and I don't understand what they do though:

https://github.com/TTimo/GtkRadiant/blob/c968f9c87a4026a35d4fa1dc6b680394f6aea477/radiant/csg.cpp#L45-L84

I guess a possible solution would be to resize after operation the inner face of each side-brush to the original size of the initial face of the initial brush to ensure the inner volume is always closed. If I understand things right, It must be enough to do that resize after transformation just there:

https://github.com/codereader/DarkRadiant/blob/53428a2b446acd537f8173491c9df00533088943/radiant/brush/csg/CSG.cpp#L71-L76

By the way this kind of geometric compute seems to be beyond my knowledge.
TagsNo tags attached.

Activities

illwieckz

illwieckz

05.03.2018 22:25

developer  

20180305-231206-000.darkradiant-csg-make-room.png (268,558 bytes)
illwieckz

illwieckz

05.03.2018 22:25

developer  

illwieckz

illwieckz

05.03.2018 22:26

developer  

csgmakeroom-quake3.map (2,953 bytes)
illwieckz

illwieckz

05.03.2018 22:26

developer  

csgmakeroom-quake4.map (4,186 bytes)
illwieckz

illwieckz

05.03.2018 22:29

developer   ~0010049

Last edited: 13.03.2018 22:02

View 2 revisions

I joined two ready-to-reproduce maps with quake3 and quake4 format: just select a prism and apply “CSG Make Room” operation on it.

I joined 2 screenshots, one showing a correct result after operation on GtkRadiant, one showing wrong result after operation on DarkRadiant.

illwieckz

illwieckz

14.03.2018 19:49

developer   ~0010055

See https://github.com/codereader/DarkRadiant/pull/6 for a PR implementing a better algorithm.
greebo

greebo

15.03.2018 05:52

administrator   ~0010062

Thank you for the fix!

Related Changesets

DarkRadiant: master addb9352

2018-03-15 06:45:44

greebo


Committer: GitHub Details Diff
Merge pull request 0000006 from illwieckz/csgmakeroom

Correct CSG Make Room operation, algorithm by Garux
This fixes 0004747
Affected Issues
0004747
mod - radiant/brush/csg/CSG.cpp Diff File

Issue History

Date Modified Username Field Change
05.03.2018 22:25 illwieckz New Issue
05.03.2018 22:25 illwieckz File Added: 20180305-231206-000.darkradiant-csg-make-room.png
05.03.2018 22:25 illwieckz File Added: 20180305-225557-000.gtkradiant-csg-make-room.png
05.03.2018 22:26 illwieckz File Added: csgmakeroom-quake3.map
05.03.2018 22:26 illwieckz File Added: csgmakeroom-quake4.map
05.03.2018 22:29 illwieckz Note Added: 0010049
13.03.2018 22:02 illwieckz Note Edited: 0010049 View Revisions
14.03.2018 19:49 illwieckz Note Added: 0010055
15.03.2018 05:51 greebo Assigned To => illwieckz
15.03.2018 05:51 greebo Status new => assigned
15.03.2018 05:52 greebo Note Added: 0010062
15.03.2018 05:52 greebo Status assigned => resolved
15.03.2018 05:52 greebo Fixed in Version => 2.6.0
15.03.2018 05:52 greebo Resolution open => fixed
15.03.2018 05:52 greebo Target Version => 2.6.0
28.12.2019 11:00 greebo Status resolved => closed
09.01.2020 19:25 greebo Changeset attached => DarkRadiant master addb9352
09.01.2020 19:25 greebo Assigned To illwieckz => greebo