Jump to content
The Dark Mod Forums

Idea: texture auto align tool


Recommended Posts

We talked about this before but never came to a conclusion. 90 degree turns in brushes don't have the proper alignment when you copy and paste the texture plus it's values from any one face onto another.

 

I had an idea for a tool which would take and area of the texture on a face of 5x5 pixels on the edge of a brush, perhaps larger, and take the selected face and look for a set of 5x5 pixels which contain the same RGB values as the chosen 5x5 texture, then it would automatically move the selected face so that the 5x5 which are the same are moved to the edge so that it matches the 5x5 on the chosen face, then it would move it +5 pixels over thus perfectly aligning the texture. If it cannot find the same 5x5 values than it would try a horizontal flip, then a vertical flip in addition, then minus the horizontal flip. With each flip trying to find the same 5x5 RGB values.

 

This would free up a ton of time for mappers trying to align brushes around corners!

Link to comment
Share on other sites

While I get your idea, the method of examining the actual pixels of a texture can't be employed in DarkRadiant, as the image data is just pushed into the graphics driver. The only thing available are the texture coordinates (U/V) which can be compared to each other. This would be more practical anyway.

 

I wrote a similar algorithm for patches ("Stitch Patch Textures"), and I think I can pull this off for brushes too. You can push that request to the tracker, but (you know what I'm going to say) don't expect it very soon.

Link to comment
Share on other sites

  • 7 months later...

This is resolved in source, I improved the algorithm when pasting shaders between brush faces. DarkRadiant tries to seamlessly align the textures of adjacent faces, the only prerequisite is that the windings actually share at least one vertex with each other.

 

This is how it works:

 

Texturing_Brushes.png

 

It also works quite cool with adjacent brushes forming corners (90 degrees):

 

Texturing_Brush_Corners.png

 

Expect it in the next snapshot / release.

Link to comment
Share on other sites

Wow, very cool :wub:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

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

    • Ansome

      Query: when was the last time a zombie in a video game was unnerving or scary to you? I'm chipping away at my anniversary submission and I've been trying to gather opinions on the subject. I'm perfectly capable of lighting them well, changing their sfx, and creating effective ambience, but I'm worried that zombies at their core are just too overdone to be an effective payoff to the tension I'm creating.
      · 0 replies
    • nbohr1more

      The Lieutenant 3 is out! Congrats Frost_Salamander! ( raising awareness )
      · 2 replies
    • OrbWeaver

      Has anyone had any luck with textures from Polyhaven? Their OpenEXR normal maps seem too washed out and give incorrect shading in the engine.
      · 5 replies
    • datiswous

      I tried to upscale the TDM logo video. First try:

      briefing_video.mp4 You can test it ingame by making a copy of the core tdm_gui.mtr and place it in your-tdm-root/materials/ , then edit line 249 of that file into the location where you placed the new briefing.mp4 file.
      What I did was I extracted all the image files, then used Upscayl to upscale the images using General photo (Real-Esrgan) upscale setting and then turn it back into a video.
      I might have to crop it a bit, the logo looks smaller on screen (or maybe it's actually better this way?). My video editor turned it into a 16:9 video, which I think overal looks better than 1:1 video of original.
      · 1 reply
    • nbohr1more

      Trying to be productive on my down-time before Capcom releases Akuma and my son is constantly on my PC playing Street Fighter...
      · 1 reply
×
×
  • Create New...