Jump to content
The Dark Mod Forums

(POLL) Normalised texel-scale when applying new textures?


(POLL) Normalised texel-scale when applying new textures?  

10 members have voted

  1. 1. Textures should be applied...

    • ...using previous texture-size
      4
    • ...using universal texel-scale
      6


Recommended Posts

After some, let's say, 'lack of clarity' on the Bugtracker, I thought it might be productive to bring a poll to all the mappers here, to try to reach a consensus on the matter.  I left out the pretty obvious choice of "these should all be options" because I really want to know what each mapper actually wants the default behaviour to be.  Ideally, it would be optional.

...

To explain exactly what this means:-

tsR-nnormal.jpg
This is how DarkRadiant post-2.20 (up until now) behaves, and for me personally, needing to press CTRL+N every time (unless the textures have the exact same sizes).  This would correspond to option 1.

tsR-normal.jpg
This was the behaviour prior to 2.20, which is also for QERadiant, Q3Radiant, Doom3/Quake4, GtkRadiant, NetRadiant, etc.  This would correspond to option 2.

 

Bugtracker issue: https://bugs.thedarkmod.com/view.php?id=5633

 

Edited by LDAsh
Link to comment
Share on other sites

Although I am not a mapper, I voted for option 1, as it is consistent with the way models are handled.

For models, each vertex stores uv coordinates for a texture. The uv coordinates are normalized to the texture, which means that the upper left corner of the texture is (0,0) and the lower right corner is (1,1), which is independent of the underlying texture resolution. This ensures that using a higher resolution version of the same texture will still look right.

Having this methodology also applied to brushes makes sense to me.

However, as already pointed out, I am not a mapper, and if this type of processing hinders the workflow of mappers, I guess an option should be implemented that enables users of DR to swap between these texture scaling methods.

Link to comment
Share on other sites

Hmm, so it's kinda like tile vs. clamp behavior for brushes?

When I make my tiling textures, I always have a certain pixel density in mind,  e.g. a 1024 px texture would cover a 128x128 DU plane, so my default texture scale in surface inspector is 0,125 (1:8). Would I like it to be used as default most of the time? Yeah, I guess so. Note that I work almost exclusively with my own assets, and I do have means to be fairly consistent with pixel density. Not sure how that relates to mapping with TDM stock textures and materials, which come in all different sizes.

That said, I don't think this will make me use the Natural option in Surface Inspector that less often. For example, as I line up different wall and floor brushes, I have to select them and use this option to align the tiling. I know that when you are creating brushes e.g. side by side, DR maintains the "continuity" of the tiling between them, but often I clone a brush from elsewhere and move it, so it has a different tiling anyway. So all in all I'd say that this isn't such a big deal in practice.

Edited by peter_spy
Link to comment
Share on other sites

If I'm understanding correctly, you're asking for DR to always apply a new texture with a scale derived from the new texture's image size, whereas currently it keeps the scale of the previous texture applied to the same face, which might be a different size?

This seems fairly reasonable to me, after all there is no particular reason why a previous texture should be considered an authority on the proper scale. But perhaps mappers sometimes like to carefully align a texture then experiment with several other textures (which might have different resolutions) without losing their alignment settings?

Perhaps the previous behaviour should be kept if the Texture Lock button is pressed, whereas the scale can be reset when new textures are applied with Texture Lock disabled?

Link to comment
Share on other sites

Perhaps I'll try to make this more clear with another example.

 

1. This is a 256x256 DU brush with 2048x2048 px texture applied using 0,125 scale. The texture tiles once as it should.

Clipboard01.thumb.jpg.bded6fe93ce5e12ec4f8df32a9be0d80.jpg

 

2. Here I selected the brush and then selected gen_dark_rusted01 from the texture browser. This material uses 512px textures. As you can see, it also tiles once.

Clipboard02.thumb.jpg.36dbbf37a2d36cc4e109e91f208d8959.jpg

 

3. When I select the brush and click Natural, this happens:

Clipboard03.thumb.jpg.716651e0c03e58c6089c89588320a5f4.jpg

I think that LDash argues that this^ should be a default behavior when applying another material, and not what happened in the 2nd image. I'd expect that kind of consistency too, as I set this option in DR preferences:

Clipboard04.jpg.3c83656f0ce77d0bc17b819510b617e3.jpg

But again, I think more mappers should speak up.

Link to comment
Share on other sites

It can get irritating that there are differences in resolutions of texture images, making switching between them require rescaling afterwards. This is especially apparent with sliptip's high-resolution wall textures, where a scale of 0.125 looks natural, while for most other walls it's best around 0.500.

  • Like 1
Link to comment
Share on other sites

28 minutes ago, peter_spy said:

3. When I select the brush and click Natural, this happens:

It's also worth mentioning that when you switch from this^ 512px material with 0,125 scale applied back to 2048px, this happens:

Clipboard05.jpg.08a074506b109fd9396d1f8387bc2778.jpg

So DR is really inconsistent when it comes to switching between materials with different texture sizes, within the same texture scale.

Link to comment
Share on other sites

Does TDM "suffer" an inconsistency with texture sizes, and this is what has driven DR to handle the default behaviour of apply textures so differently from ALL other Radiants?

 

Also, only votes from this community?...  I know where 2 of the votes came from and one of them was mine.

(*apparently my mapper-buddy whom I asked to vote here, 'accidentally' voted for option 1, heheh)

Link to comment
Share on other sites

  • 3 weeks later...

First of all, I'd like to make sure we're talking about the same thing here... which if so is something I actually wanted to bring up for a while: When you change the texture on a surface in DarkRadiant, its scale setting is modified based on the resolution. For instance: If the previous texture was 1024x1024 and you set the scale of your face to 0.25 x 0.25, changing the texture to one that's 2048 x 2048 will automatically modify that scale to 0.125 x 0.125.

This is something that has been annoying me for a long time: It's an effect I actually do NOT want! Don't get me wrong: I can see why it exists, it helps to keep pixel resolution of a surface the same which is actually neat and handy. But I for one prefer to set the scale manually and keep it at a fixed value as I change textures... typically 0.25 or 0.125. An option to disable automatic scale conversion when changing material resolution would be appreciated so I don't have to reset the scale whenever replacing textures.

I don't want to see this conversion removed nor necessarily disabled by default (I'd have a vote on that one). But please add a setting (maybe a toolbar button) to disable it when not needed and the mapper wants to keep the scale the same while cycling through textures.

Link to comment
Share on other sites

For those who talk about "being consistent with other 3D software out there", you have completely missed the point.  There's a reason why people don't make maps with Blender or Maya or Max, and why these software end up having plugins to make environments that always orientate around how textures are applied to surfaces.  Also, why DarkRadiant is the only Radiant that has decided to go down this path, even if to compare with Hammer/WorldCraft or QuArK.

Like I said on the Bugtracker - "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." (and) "...since the dawn of 3D games, has always had a consistency."

If the "Default Texture Scale" setting in 'Preferences' isn't supposed to mean anything, then why would it even be there anymore?  Why was it ever there in the first place?

Link to comment
Share on other sites

I haven't seen a single person mention "being consistent with other 3D software out there" so I'm not sure what that is referring to. Also, I'm not sure why you keep mentioning what other Radiant versions do, since DarkRadiant diverged from the GtkRadiant codebase over 15 years ago, and comparing DR behaviour with other Radiant-derived software has never been part of the development process.

Most likely the current behaviour arises simply as a consequence of how the code is written, is not the result of any specific design decision, and has not been changed because nobody has raised it as an issue until now.

Link to comment
Share on other sites

I can confirm that this was not an active design decision, at least not on my behalf. The texturing code has undergone so many refactorings that the behaviour was bound to diverge at some point from the original GtkRadiant behaviour. Nobody brought it up until this point, so it makes sense for this thread to appear.

Also I'd like to state that I'm not defending either default behaviour when applying textures to surfaces. I personally don't care too much since I'm copy/pasting texture projections around all the time using the middle mouse button. I don't switch to a different material and expect them to be perfect, there's always some workflow to be done after changing it before I'm happy with it.

As already stated on the bugtracker entry, I just need to know what exactly should change since there are a few ways of applying textures to objects, and all of them work slightly different. And I kinda saw it coming that there might be a different understanding of people on how it should work by default.

It's not an either-or discussion where one camp has to win to have their one and only correct way implemented in DR, I don't see why it shouldn't be possible to have the texture scale adjusted according to a preference setting or similar. Let's see some suggestions on what specific behaviour should change in DR and whether it should be a preference setting or not. Then I have an easier time figuring out how I can change the implementation.

2 hours ago, LDAsh said:

If the "Default Texture Scale" setting in 'Preferences' isn't supposed to mean anything, then why would it even be there anymore?  Why was it ever there in the first place?

Not sure if it helps, but If I recall correctly what the code is doing, the value in the "Default Texture Scale" field is the scale that is used when "Normalise Texture" is clicked. People dial it up or down and then click the button to have that "default" scale applied. Maybe it even is used when new brushes are drag-created, but I'd have to check up on that. It is definitely not interpreted as some sort of "Default Texture Density", "Texel Scale" or something like that.

  • Like 1
Link to comment
Share on other sites

Interesting: I was sure this must be a deliberate decision and feature. Wouldn't have thought a bug would cause such an effect on its own.

The question is what shouldn't change: 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.

N0Q1ged.png

j7DpqIY.png

Link to comment
Share on other sites

For me the problem is mainly that when drawing new brushes, the apparent scale of the texture is heavily influenced by the image resolution. To show this, I've shown in the screen below how large a newly drawn brush needs to be to accommodate 1 tile of 2 different textures when I have "Default Scale" set to 0.500 in the Surface Inspector:

Untitled.thumb.jpg.941a28e6b043311db056588308b47766.jpg

The texture on the left is 1024x512 pixels (textures/darkmod/plaster/plaster_leaking), on the right is 2048x1024 pixels (textures/darkmod/sliptip/plaster/plaster_old_stained).

I think both textures should be treated the same regardless of image resolution. Basically I think what I want is a setting that 1 image tile = 128 units, which would result in always drawing wall brushes like on the left. Such a setting could be problematic, however, if

  • the texture is designed for very small objects, such as a piece of paper, which should certainly not be 128 units tall. But the current implementation also gets this completely wrong.
  • the texture isn't a square. With these wall textures it's obvious we want them to be 256x128 units, but what if it's a very long, slim piece of wall trim? That should ideally be something like 128x16 units, not 1024x128 units. Can't really see a way to distinguish between such textures.

 

Generally the problem seems to be only when drawing new brushes. If I replace the texture of the left brush with that of the right brush by right-clicking the material in the Media browser > "Apply to selection" (not with the MMB), then it's a 1:1 replacement that looks correctly scaled.

Link to comment
Share on other sites

Looking through the previous releases and their changelogs, it seems this was a mistake/bug and around the same time as the "texture tool" was implemented, a long time ago.  So yeah, was never intentional.

 

I'd like to (not overcomplicate this any further and) propose a very simple hackity fix - to have an option to "automatically naturalise" new textures that are applied to surfaces, as though DR is hitting CTRL+N each time for me, behind the scenes.  I don't mind if it takes a tiny chug and half a second longer to do, I would already be very happy with this workaround.

 

I wouldn't want to both A> have this eat up any more time and B> possibly break the texture tool feature by insisting on a hearty thorough solution.

 

 

 

Link to comment
Share on other sites

I'm ok with introducing such an option. For me it's important to know what "applying" actually means, since there are so many options to do it.

Am I assuming right that you're referring to a) assigning a texture by clicking a tile in the texture browser and b) assigning it by the Browse button in the Surface Inspector?

Link to comment
Share on other sites

I would say it should apply to everything except for copying and pasting to and from a surface, where the texel-scale is a feature of what it's copying and pasting.  Maybe there's something else I'm missing, but that's my personal opinion.

Link to comment
Share on other sites

If there is to be a new option, I would suggest making it a toggle button in the Surface Inspector similar to the one I recently added for aspect ratio-preserving Fit Texture. There is plenty of room for another such button perhaps next to the existing Natural button.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • STiFU

      We are taking our son on his very first holiday trip to see the sea for the first time. 🙂 Will be back in a week.
      · 0 replies
    • Gilkar

      When I was a young man my father was so ignorant I could hardly stand to have him around. As I grew older I was amazed at how much the old man had learned in such a short time.
      · 1 reply
    • jaxa

      RTX 3090 Super, RTX 3070 Ti 16 GB, RTX 2060 12 GB
      https://wccftech.com/nvidia-launching-rtx-3090-super-rtx-3070-ti-16gb-and-rtx-2060-12gb-by-january-2022/
      · 0 replies
    • duzenko

      CPU benchmark time - compiling DarkRadiant (2nd run)
      i5 8600K 6C/6T@4.4GHz DDR4 2x2133MHz 9MB cache
      Parallel builds: 1. 3:57 Parallel builds: 6 (default). 2:28 r5 1600AF 6C/12T@3.3GHz DDR4 1x2666MHz 16 MB cache, temp folder on HDD
      Parallel builds: 1. 5:05 Parallel builds: 4. 2:47 Parallel builds: 6. 2:55 Parallel builds: 12 (default). 2:57
      · 6 replies
    • nbohr1more

      Status updates are back so it is also a good time to return to contests!
      https://forums.thedarkmod.com/index.php?/topic/21095-christmas-connections-contest-2021
       
      · 0 replies
×
×
  • Create New...