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

    • 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...