View Issue Details

IDProjectCategoryView StatusLast Update
0005547DarkRadiantGUIpublic08.10.2021 07:59
ReporterDragofer Assigned Togreebo  
PrioritynormalSeveritynormalReproducibilityN/A
Status resolvedResolutionfixed 
Product Version2.11.0 
Target Version2.14.0Fixed in Version2.14.0 
Summary0005547: Bring texture coordinates closer to 0,0
DescriptionTexture coordinates tend to have large offsets from the origin, which has effects such as these:
- UV islands are separated by huge distances in relation to their size, making it difficult to align them with each other with the Texture Tool since they first have to be dragged into each other's vicinities
- opening the Texture Tool can take extremely long if one has multiple brushes selected, to the point that it looks like DR has crashed, because the initial view is zoomed out so far

It'd be good if UV islands were closer to 0,0 and to each other, i.e. by making texture tools like "Natural" place all the UV islands of a brush adjacent to each other.
Maybe the Texture Tool could also "normalise" the UV islands, such that they're all placed in the tiles around 0,0 (even if behind the scenes the coordinates still have huge offsets).
Steps To ReproduceI've attached 2 images for illustration:
- the first image shows what one sees when opening the Texture Tool with 1 simple brush selected. It was textured with "Natural" at scale 0.5, but all the UV islands are far away from each other in relation to their size. My expected output would be something resembling a box net.
- the second image shows what one sees when opening the Texture Tool with 4 simple brushes selected, which took ages. At this zoom level it's too laggy to work with.
TagsNo tags attached.

Relationships

parent of 0005773 resolvedgreebo Improve Texture Locked brush transformations 

Activities

Dragofer

Dragofer

24.02.2021 20:12

developer  

texture_coordinates.jpg (674,618 bytes)
texture_coordinates_2.jpg (53,048 bytes)   
texture_coordinates_2.jpg (53,048 bytes)   
greebo

greebo

06.10.2021 19:39

administrator   ~0014415

Note to self: the huge gaps between the face UV islands are usually caused by moving/rotating the brushes with texture lock enabled. So if there's something to be improved, it's probably this algorithm. Looking at how it's implemented, I think I can simplify the routines by using the newly introduced Face::setTexDefFromPoints() method.

Related Changesets

DarkRadiant: master 0fa0bb5f

2021-10-04 17:10:45

greebo

Details Diff
0005547: Add unit test checking face texture normalisation Affected Issues
0005547
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master 7c61c840

2021-10-04 17:48:41

greebo

Details Diff
0005547: New implementation for Face::normaliseTexture(). This is now shifting the bounds origin towards the UV space origin, translating by the integer parts of the bounds center. The TextureNormaliser has been written to support multiple selected objects which are translated by the same distance. Affected Issues
0005547
mod - radiantcore/brush/Face.cpp Diff File
mod - radiantcore/selection/algorithm/Texturing.cpp Diff File
mod - radiantcore/selection/algorithm/Texturing.h Diff File
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master ce0a9dfd

2021-10-05 17:46:56

greebo

Details Diff
0005547: Add preliminary unit test for IPatch::normaliseTexture() Affected Issues
0005547
mod - test/TextureManipulation.cpp Diff File
mod - test/resources/tdm/maps/simple_brushes.map Diff File

DarkRadiant: master 2eb9926a

2021-10-05 18:03:52

greebo

Details Diff
0005547: Use the TextureNormaliser algorithm in Patch::normaliseTexture() Affected Issues
0005547
mod - radiantcore/patch/Patch.cpp Diff File
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master b2efa1c1

2021-10-05 18:31:41

greebo

Details Diff
0005547: Add ability to normalise a set of texture tool items as a whole Affected Issues
0005547
add - install/bitmaps/textool_normalise.png Diff File
mod - install/user.xml Diff File
mod - radiantcore/selection/textool/TextureToolSelectionSystem.cpp Diff File
mod - radiantcore/selection/textool/TextureToolSelectionSystem.h Diff File

DarkRadiant: master 0b23fbc1

2021-10-05 18:51:49

greebo

Details Diff
0005547: Recalculate the texture tool view after normalisation Affected Issues
0005547
mod - install/user.xml Diff File
mod - radiant/textool/TexTool.cpp Diff File
mod - radiant/textool/TexTool.h Diff File
mod - radiantcore/selection/textool/TextureToolSelectionSystem.cpp Diff File

DarkRadiant: master c5218c4c

2021-10-06 19:16:09

greebo

Details Diff
0005547: Refactor Patch::scaleTextureNaturally() Affected Issues
0005547
mod - radiantcore/patch/Patch.cpp Diff File

DarkRadiant: master 9e6bed85

2021-10-07 16:21:33

greebo

Details Diff
0005547: Add test translating a brush with texture lock enabled Affected Issues
0005547
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master e6db9d56

2021-10-07 17:01:15

greebo

Details Diff
0005547: Add test rotating a brush with texture lock enabled Affected Issues
0005547
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master b8b74b76

2021-10-08 04:49:56

greebo

Details Diff
0005547: Don't run the calculations if no transform type is set Affected Issues
0005547
mod - radiantcore/brush/BrushNode.cpp Diff File

DarkRadiant: master 569653d1

2021-10-08 05:00:52

greebo

Details Diff
0005547: New implementation of the face translation code with texture lock enabled. The new vertices after transformation are not yet known, but in this special case we can base our calculations on the old winding and apply the translation to each of the winding vertices. This way we can predict where the new vertices will be and calculate the texture projection in Face::translate().
Move algorithm to calculate the texture matrix from vertices to TextureProjection.
Affected Issues
0005547
mod - radiantcore/brush/Face.cpp Diff File
mod - radiantcore/brush/TextureProjection.cpp Diff File
mod - radiantcore/brush/TextureProjection.h Diff File
mod - test/TextureManipulation.cpp Diff File

DarkRadiant: master 8ae96ba8

2021-10-08 07:31:34

greebo

Details Diff
0005547: New implementation of the face transformation code with texture lock enabled. Affected Issues
0005547
mod - radiantcore/brush/Face.cpp Diff File
mod - radiantcore/brush/Face.h Diff File

DarkRadiant: master 5ffbf044

2021-10-08 07:42:37

greebo

Details Diff
0005547: Refactor BrushNode::evaluateTransform() to save calculating the transformation matrix if it's not going to be used. Affected Issues
0005547
mod - radiantcore/brush/BrushNode.cpp Diff File

DarkRadiant: master 241201d2

2021-10-08 07:48:35

greebo

Details Diff
0005547: Remove old texture lock algorithms and now unused helper methods in texturelib.h Affected Issues
0005547
mod - libs/texturelib.h Diff File
mod - radiantcore/brush/TextureProjection.cpp Diff File
mod - radiantcore/brush/TextureProjection.h Diff File

Issue History

Date Modified Username Field Change
24.02.2021 20:12 Dragofer New Issue
24.02.2021 20:12 Dragofer File Added: texture_coordinates.jpg
24.02.2021 20:12 Dragofer File Added: texture_coordinates_2.jpg
24.02.2021 20:15 Dragofer Description Updated
04.10.2021 17:10 greebo Status new => confirmed
05.10.2021 18:52 greebo Assigned To => greebo
05.10.2021 18:52 greebo Status confirmed => assigned
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master 0fa0bb5f
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master 7c61c840
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master ce0a9dfd
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master 2eb9926a
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master b2efa1c1
05.10.2021 18:52 greebo Changeset attached => DarkRadiant master 0b23fbc1
06.10.2021 19:39 greebo Note Added: 0014415
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master c5218c4c
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master 9e6bed85
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master e6db9d56
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master b8b74b76
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master 569653d1
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master 8ae96ba8
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master 5ffbf044
08.10.2021 07:49 greebo Changeset attached => DarkRadiant master 241201d2
08.10.2021 07:50 greebo Target Version => 2.14.0
08.10.2021 07:53 greebo Relationship added related to 0005773
08.10.2021 07:59 greebo Relationship replaced parent of 0005773
08.10.2021 07:59 greebo Status assigned => resolved
08.10.2021 07:59 greebo Resolution open => fixed
08.10.2021 07:59 greebo Fixed in Version => 2.14.0