View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005633 | DarkRadiant | Map Editing | public | 03.06.2021 05:28 | 02.04.2022 05:56 |
Reporter | LDAsh | Assigned To | greebo | ||
Priority | normal | Severity | normal | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 2.3.0 | ||||
Target Version | 2.14.0 | Fixed in Version | 2.14.0 | ||
Summary | 0005633: Apply textures to surfaces using "normalized" scaling. | ||||
Description | DarkRadiant used to abide by the "default texture scale" set in preferences, when applying textures to surfaces. Currently, textures seem to apply to surfaces based on the texel scale of the previous texture, such as a 2K texture being applied to a surface that previously had a 32X32 caulk texture using the 32X32 texel scale, instead of the "default texture scale". | ||||
Additional Information | https://forums.thedarkmod.com/index.php?/topic/20996-poll-normalised-texel-scale-when-applying-new-textures/ | ||||
Tags | No tags attached. | ||||
Can you give me a more elaborate example of how you want it to behave? I can currently see the following behaviour: - Drag out a brush, apply textures/common/caulk (128x128 TGA texture) - Open Surface Inspector, Fit Texture to 1x1 - Click on another texture (using a larger image) in the Texture or Media Browser, it will apply that one to the brush - The new texture is already fit to the faces, 1x1, like the caulk texture |
|
A new texture selection/application should (in my opinion, and historically default) retain the texel scale of the previously used texture, not the entire texture size. For example, if previously a 256x256 texture is applied to a 64x64 surface, that would be a 4x4 texel scale. Currently, a new texture will retain the size but the not the texel scale, so if a new texure is 1024x1024 and applied to a 64x64 surface, then it would be only partially visible, since the texel scale is still 4x4, instead of 16x16. This seems more intuitive and efficient, even if it's optional and not even the default. | |
I can imagine that there would be some disagreement about what the default behaviour should be - I can see arguments for both behaviours, so I guess this should be controlled by a setting somewhere. When you say "apply", what operation are you referring to? As there are many ways to set a shader on an object (and some of the MMB operations are specifically designed to adjust the target object to match up with the original projection). |
|
Here's a GIF to demonstrate, with the original behaviour on the left and (since version 2.5.0?) how it was changed, and not even deprecated:- https://www.violae.net/temp/DR221vDR250_texelscale.gif The best way to fully understand is to use <2.2.1 side-by-side, or NetRadiant. |
|
You are interested in what happens when you apply the material through the Texture/Media Browser, I assume? I'm asking as there are many ways to assign a material to a target, and all of them can work slightly differently. |
|
Perhaps except for when copying and pasting a texture within Radiant, I can't imagine why it wouldn't follow a "texel-scale rule" for everything, and that's why in "Preferences > Primitives > Default Texture Scale" is even an option, I suppose. | |
you can change it quickly with the surface inspector, this is the scale I use for high res textures to match well with them default scale: 0.250 = 512X512 default scale: 0.125 = 1024X1024 default scale: 0.0625 = 2048x2048 it's a very good idea if it can do it automatically like it will detect the texture scale and automatically calculate the scale for it. |
|
That may be useful, but, that's still not what I was talking about, and refer back to the GIF I posted:- https://www.violae.net/temp/DR221vDR250_texelscale.gif The fact that textures are different resolutions 99.9% of the time means because they are physically bigger, cover larger brushes and take more screen real-estate. That's why the default behaviour should be that all textures are applied based on the "texel scale" of what was applied before it, with the very first (caulk on an "_empty"?) abiding by the "Default Texture Scale" setting in preferences. You can see in that GIF, on the right-hand side example, the long hazard-stripe texture is not only applied much smaller than it ever would be, it's also becomes square instead of rectangular in proportion. This is obviously wrong. I'm not saying to change the default behaviour, but, at least the old proper method could be an option? There is a difference between texel scale and texture scale. Texel scale is how big a pixel of a texture appears in the 3D world, and this, since the dawn of 3D games, has always had a consistency. Quake 2 was about 1, Quake 3 about 2x2 (0.5), Doom3 about 2x2 to 4x4 (0.25), and HL2 up to 8x8 (0.125). The very first QERadiant I used back in the late 90s did things this way. Now we sometimes get into the 16x16 (0.0625) range for things like door textures, and that's a very fine texellation! But usually there's a baseline consistency and that is still 0.125 for us and probably 0.25 for the TDM mappers. |
|
As I've been testing the latest build, I decided to change the priority and severity of this. Every time I apply a new texture, I need to press CTRL+N each time. Not something worth getting used to, because this is a DR-only thing. | |
While I understand that this is bugging you and it's important for you, setting the priority and the severity of the bugtracker entry will not getting it finished earlier. That's not how it works, the devs are deciding on their own what's important and what they want to work on, it's a hobby after all. For me, it feels more like trying to rub it into my face, shouting "FIX THIS, NOW!". No hard feelings, just saying. :) |
|
I didn't say anything like that or even want to imply, especially not screaming at you in all caps... !? Anyway, I decided to make a poll in the forum about this, NOT as some weird passive-aggressive attempt at being underhanded or whatever thingy, but SIMPLY to draw a consensus, for clarification. I swear, that's all it is. |
|
I noticed this issue for ages and would also like to see it fixed when possible. I thought it was a deliberate feature at first, I understand it might in fact be a bug. It's no major breakage but can become an annoyance. To fully illustrate what's happening here: The X and Y scale of a surface should remain the same if you only edit the texture on that surface. Currently when setting a texture with a different resolution on a brush face, the scale automatically changes based on the difference in resolution between textures. In screenshot 1 I have the texture textures/darkmod/stone/brick/blocks_brown set on the selected face, at a scale of 0.25 x 0.25. In screenshot 2 I change this texture to textures/darkmod/stone/brick/blocks_sandstone01. I did not edit the scale though: The vertical scale became 0.5 on its own. |
|
@LDAsh If you have a chance I'd ask you to check out the snapshot build at https://github.com/codereader/DarkRadiant/actions/runs/1320874193 (you have to be logged in). I adjusted the Face material assignment routine to preserve the texel scale of the previously assigned material. | |
I had a look and I'm personally extremely happy with the behaviour now! :D I couldn't find an option for this, so some others might complain about it now (can't make everybody happy) but this feels like the good old days again. Thanks a million, Mr.Greebo. Great work, as always. |
|
Nice, thanks | |
DarkRadiant: master ced8ed41 08.10.2021 14:02 Details Diff |
0005633: Add IFace::getTexelScale() to read the calculated texture pixel density of faces. Add corresponding unit test. |
Affected Issues 0005633 |
|
mod - include/ibrush.h | Diff File | ||
mod - radiantcore/brush/Face.cpp | Diff File | ||
mod - radiantcore/brush/Face.h | Diff File | ||
mod - test/TextureManipulation.cpp | Diff File | ||
mod - test/algorithm/Primitives.h | Diff File | ||
DarkRadiant: master 3f2e0386 08.10.2021 14:24 Details Diff |
0005633: Set up unit test checking texture scale preservation when swapping textures on a face |
Affected Issues 0005633 |
|
mod - test/TextureManipulation.cpp | Diff File | ||
DarkRadiant: master f156a5b7 08.10.2021 15:12 Details Diff |
0005633: Add scale adjustment to Face::setShader(), to preserve the scale of the previous material |
Affected Issues 0005633 |
|
mod - radiantcore/brush/Face.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
03.06.2021 05:28 | LDAsh | New Issue | |
03.06.2021 05:51 | greebo | Status | new => acknowledged |
11.06.2021 10:31 | greebo | Status | acknowledged => feedback |
11.06.2021 10:31 | greebo | Note Added: 0014080 | |
12.06.2021 01:55 | LDAsh | Note Added: 0014081 | |
12.06.2021 01:55 | LDAsh | Status | feedback => new |
12.06.2021 03:49 | greebo | Note Added: 0014083 | |
12.06.2021 03:49 | greebo | Status | new => feedback |
12.06.2021 04:01 | LDAsh | Note Added: 0014085 | |
12.06.2021 04:01 | LDAsh | Status | feedback => new |
12.06.2021 04:39 | greebo | Note Added: 0014087 | |
12.06.2021 05:16 | LDAsh | Note Added: 0014090 | |
14.06.2021 14:58 | greebo | Note Edited: 0014087 | |
19.06.2021 07:58 | IZaRTaX | Note Added: 0014116 | |
19.06.2021 07:58 | IZaRTaX | File Added: TX_scale.png | |
19.06.2021 15:12 | LDAsh | Note Added: 0014117 | |
06.07.2021 09:33 | LDAsh | Priority | low => high |
06.07.2021 09:33 | LDAsh | Severity | tweak => major |
06.07.2021 09:35 | LDAsh | Note Added: 0014149 | |
06.07.2021 15:53 | greebo | Note Added: 0014150 | |
06.07.2021 15:53 | greebo | Priority | high => normal |
06.07.2021 15:53 | greebo | Severity | major => normal |
08.07.2021 06:53 | LDAsh | Note Added: 0014151 | |
26.07.2021 18:30 | greebo | Additional Information Updated | |
05.08.2021 13:49 | MirceaKitsune | Note Added: 0014239 | |
05.08.2021 13:49 | MirceaKitsune | File Added: Screenshot_20210805_163850.png | |
05.08.2021 13:49 | MirceaKitsune | File Added: Screenshot_20210805_164032.png | |
08.10.2021 12:34 | greebo | Product Version | => 2.3.0 |
08.10.2021 12:34 | greebo | Assigned To | => greebo |
08.10.2021 12:34 | greebo | Status | new => assigned |
08.10.2021 15:15 | greebo | Changeset attached | => DarkRadiant master ced8ed41 |
08.10.2021 15:15 | greebo | Changeset attached | => DarkRadiant master 3f2e0386 |
08.10.2021 15:15 | greebo | Changeset attached | => DarkRadiant master f156a5b7 |
08.10.2021 15:15 | greebo | Target Version | => 2.14.0 |
08.10.2021 15:15 | greebo | Status | assigned => resolved |
08.10.2021 15:15 | greebo | Resolution | open => fixed |
08.10.2021 15:15 | greebo | Fixed in Version | => 2.14.0 |
08.10.2021 18:17 | greebo | Note Added: 0014418 | |
09.10.2021 12:06 | LDAsh | Note Added: 0014420 | |
09.10.2021 16:05 | greebo | Note Added: 0014421 | |
02.04.2022 05:56 | greebo | Status | resolved => closed |