Jump to content
The Dark Mod Forums

Shift-mmb Texturing Inverts/mirrors Texture On Patches


Recommended Posts

As reported by SneaksieDave here: http://bugs.angua.at/view.php?id=79

 

I called it 'shift-MMB' texturing because I don't know what else to call it. :)

I couldn't come up with any fine name so far, I use to call it "Paste Natural" (Shift-MMB) in contrast to "Paste Projected" (Ctrl-MMB)

 

In this map are two arch areas. The one where you start has the arches textured with ctrl-MMB from texture picked up from the floor. The second area has the arches textured with shift-MMB from texture picked up from the floor. In both areas, the arch on the left (looking at the pointed edge) has the texture shifted by 80 units so that you can see the repeating effect in the texture.

 

In the ctrl-MMB textured arches, the textures have the same exact orientation. This is of course useful for a uniform look.

 

In the shift-MMB textured arches, the two arches' textures are mirror images of each other. Try as I may, I could not figure out how to reverse it. I tried rotating and mirroring and flipping in complex ways - no luck.

 

If there is a way, please let me know, although then the question would be: is it desirable by default to have it mirrored? The ability to mirror textures would be great, but since one texturing method doesn't do it, and the other does, I assumed it was just a simple math error/bug.

I just tested and could reproduce it on the second patch, so I see what you mean.

 

I have some things to post here, so thanks for reading it in advance :)

 

The Paste Natural thing is probably not the right tool here. It's designed to make the transition of patches and brush faces seamless. Aren't you better off with the "NATURAL" button in the Patch Inspector? For these arches, the transition from the floor to the wall wouldn't have to be seamless, would it?

 

You have only limited influence on how the texture is pasted via Shift-MMB. The rotation or matrix inversion does not have an effect, but the position has. I'll better explain how DarkRadiant is working:

 

The Paste Natural searches for the nearest patch vertices to the originating brush (where you copied your texture from) and "rolls" the texture onto the patch from the nearest to the farthest control vertex. Therefore the rotation of your patch should not have any influence on the texture orientation.

To illustrate:

texturingpatchrotationbt8.th.jpg

I created two patches (both adjacent to a brush face) and rotated one of them. After copying the texture from the "floor" brush and pasting them via Shift-MMB the result looks like shown in the left picture. The texturing is identical, although the right patch has been rotated for 180 degrees (for this reason I showed the control vertices, so it's obvious how they were rotated).

 

The shortest distance is determined like this:

vertexconnectionsvo7.th.jpg

The "Paste" command searches for the shortest distance of any brush winding vertex to any patch vertex. Hence it does matter how far the patch is away from the face corners. In the picture the rightmost patch is being textured using the rightmost face corner as reference point, the left one has a different reference vertex. This is intentional behaviour, because the Paste Natural command has been designed for patch / face transitions, not for the kind of situations I just described here.

 

(I'm not quite happy with this explanation yet, so please tell me if I should explain something in more detail.)

Link to comment
Share on other sites

Aren't you better off with the "NATURAL" button in the Patch Inspector? For these arches, the transition from the floor to the wall wouldn't have to be seamless, would it?

That is one option, however the top of the arch is badly stretched (as in DoomEd) with that method. I was looking for the one to 'follow' the patch best with no stretching at all. Paste natural definitely did what I was looking for, except for the texture inversion. That is the only problem - I don't even mind the hand adjustments to fix the alignment, but I can't, since it's inverted (or, I haven't figured out how yet).

 

The Paste Natural searches for the nearest patch vertices to the originating brush (where you copied your texture from) and "rolls" the texture onto the patch from the nearest to the farthest control vertex.

That's awesome. Well, I guess that explains the inverting. My second arch is the mirror partner of the first, so it gets the same texture 'rolled' up, from the opposite direction...

 

I think I follow your description above, and it makes sense.

 

Now my question would be, can we have a way, or another paste method, to keep the benefits of paste natural, without this resulting consequence? Either:

1. a way which intelligently uses the same points of reference as 'nearest' (how? I dunno :wacko:)

2. an invert texture function/button. I actually spent some time last night wracking my brain thinking, "there ISN'T an invert texture option? anywhere?" and even now, I'm not sure there isn't, and I'm about to open DoomEd and search for it. If there's not, and it's at all possible to implement, there should be. It would be a very welcome addition (I'll submit an entry for it). I know, for a fact, I've done this in other editors. It would have to be DromEd or UnrealEd, as I haven't used any others in recent time. I think it's UnrealEd...

 

I'll track #2. I guess #1 decides the future of entry 79, unless you think of a way or have a desire to further address it. I realize it works as designed, though.

 

Edit: Re: #2 - Ah, I knew I saw it: DoomEd has Flip X, Flip Y. Either of those alone creates a mirror image. Using both together creates a rotation.

Link to comment
Share on other sites

1. a way which intelligently uses the same points of reference as 'nearest' (how? I dunno :wacko:)

This could be a hard nut, because when middle-clicking into the scene, you select a face as a whole (determined by line selection tests). I don't know if would be possible to get the nearest winding vertex of the selected brush face. If it was possible, the vertex could well be stored for later reference, although I fear that this would become a bit wacky if you're unaware of that feature - it may appear that the texturing may be irreproducible because one might never click on the same place.

 

Edit: Re: #2 - Ah, I knew I saw it: DoomEd has Flip X, Flip Y. Either of those alone creates a mirror image. Using both together creates a rotation.

Ok, never used this before, I think it should be possible to do, so I'll assign this to myself. :)

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.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...