Jump to content
The Dark Mod Forums

Texture alignment


Recommended Posts

Pick the texture with the MMB (this copies the reference into your ShaderClipboard). Then Shift- or Ctrl-MMB the target items.

 

See also here: http://www.thirdfilms.com/darkwiki/index.p..._in_DarkRadiant

 

You also get a context help in the lower left corner while holding down the modifier keys.

Link to comment
Share on other sites

Either I'm to dumb or something doesn't work. I click on the brush that I want it to alignt it with, and press MMB. Then I unselect this one, and select the other brush and click CTRL-MMB but nothing happens. I also tried shift-MMB and without selecting all kind of combinations but I don't get it. Is there a DR for dummies somewhere?

Gerhard

Link to comment
Share on other sites

You don't need to select anything to copy and paste shaders.

 

A possible problem would be that your mouse driver is not propagating the middle mouse button correctly to GTK (or GTK doesn't get it right). If you MMB onto a textured face, does the status bar change in any way? Usually the copied shader name is displayed in the lower right of the window in the status bar.

 

If not, you might want to check your mouse settings if the MMB is assigned to something else.

Link to comment
Share on other sites

I just tried it, and it worked. The reason why I thought it doesn't work is because it doesn't do what Doomedit does. The brushes that I tried already had the same texture, but they are not aligned. What I mean is this. Create a normal room in Doomedit and put some textures on each wall. Now they are not propely aligned. Then select one of the brushes, and MMB on the other brushes. You can see that they get aligned perfectly now. Even though they are 90 degree to each other, they still present a single smooth transition of the texture across the brushedges. DR is not doing that. It jsut copies the selected texture onto the new brush, but it doesn't align it. So at the moment I can see the edges because the textures don't meet properly there. If the brush is aligned with the other brush, then the edge is seemles, but not if the brushes are angled.

 

If you want I can provide some screenshots tomorrow. Not sure if I explained it good enough. :)

Gerhard

Link to comment
Share on other sites

Umm, how do you do anything without a MMB? Slightly retorical as I'm not doing much more than checking objects in editor right now. But the 'button' in my mouse wheel doesn't work for anything that says MMB, I figured it would.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Do I get this right that you don't have a middle mouse button? If this is the case, you'd have to edit the input.xml file to define other combinations for the texture commands.

 

If the MMB is there but does not do anything in DarkRadiant, it's probably a mouse driver issue. If you happen to use the SetPoint software from Logitech (like me) you might have to assign a specific profile for the DarkRadiant.exe.

Link to comment
Share on other sites

Does this function actually align brush faces which are curved diagonally or does it simply copy and paste the values of one texture into the other? I wonder because I used copy texture and values a lot, but it doesn't work on faces which are at or above a specific degree [appears to be around 15 degrees] because they aren't aligned properly. I can't get it to work either btw.

Link to comment
Share on other sites

Brush faces can't be curved, they are planes. ;)

 

If you copy a texture from one brush face to another, DarkRadiant tries to apply the source texture projection matrix. For co-planar surfaces this means that the result is perfectly seamless. If there is an angle between the source and target plane, things might get more complicated and the algorithm may fail, but I tested it yesterday and it seemed to work with 90° walls as well (same result as in DoomEdit). Do you have any screenshots regarding this problem?

Link to comment
Share on other sites

Maybe I missremember it, but I can't try it right now. I take a look at it when I get home. I looked in another map of mine, done with Doomedit, and there is only one 90° wall that is aligned as I remember it. Not sure if this is so because I only did it with that one wall, or if I missremember the effect.

Gerhard

Link to comment
Share on other sites

Brush faces can't be curved, they are planes. ;)

 

If you copy a texture from one brush face to another, DarkRadiant tries to apply the source texture projection matrix. For co-planar surfaces this means that the result is perfectly seamless. If there is an angle between the source and target plane, things might get more complicated and the algorithm may fail, but I tested it yesterday and it seemed to work with 90° walls as well (same result as in DoomEdit). Do you have any screenshots regarding this problem?

 

I'm using copy and paste shader from the shortcut key menu, is this the same command that this thread is about? Here's a pic of the problem I often encounter:

untitledqg0.th.png

Link to comment
Share on other sites

Hm, I guess it won't get any better than that with the current algorithm.

 

I'll add a feature request to the bugtracker and see if I can find a way to easily solve that situation. The surfaces are probably meeting at too large of an angle, which requires special treatment, I reckon.

 

edit: http://bugs.angua.at/view.php?id=292

Link to comment
Share on other sites

Strange thing is that I'm pretty sure that I remembered that this worked perfect in DoomEdit, but when I tried it yesterday it worked the same as with your algorithm. Maybe I must create a new map and try it there again. Quite strange though.

Gerhard

Link to comment
Share on other sites

My estimation is that the algorithm is the same in both editors. Some code portions appear to be unchanged since more than 10 years and happen to be both in DoomEdit and DarkRadiant.

Link to comment
Share on other sites

  • 2 months later...
Hm, I guess it won't get any better than that with the current algorithm.

 

I'll add a feature request to the bugtracker and see if I can find a way to easily solve that situation. The surfaces are probably meeting at too large of an angle, which requires special treatment, I reckon.

 

edit: http://bugs.angua.at/view.php?id=292

 

I have a common problem when texturing, and I think it's along the lines of what you discussed here, but wanted to check.

 

The texture modifiers work as expected for me when walls are verticle, but when they are at an angle (when making trim etc) it all goes wrong. For instance; Make a cube but scale the top face by 50% (using the vertices control). Then apply to fit a texture on one face. Copy it to the shader clipboard and try applying it to an adjoining face - things look ugly.

 

Is this the same problem?

 

 

Also, something that would be a useful update is to have a 'fit to horizontal' or 'fit to vertical' button. For example; when applying trims I'm often scaling the texture to fit in a vertical dimension, then copying that scaling factor into the horizontal scaling, so to remove any texture distortion. It's very time consuming to do it by hand, so a button to do it (especially across multiple brushes of differing sizes) would be great! :)

Link to comment
Share on other sites

The texture modifiers work as expected for me when walls are verticle, but when they are at an angle (when making trim etc) it all goes wrong. For instance; Make a cube but scale the top face by 50% (using the vertices control). Then apply to fit a texture on one face. Copy it to the shader clipboard and try applying it to an adjoining face - things look ugly.

 

Is this the same problem?

Yes, I think that's a similar problem. The current algorithm just tries to perform some kind of projection when pasting the shaders, but this fails for surfaces meeting at higher angles. A new algorithm would be needed for this to function, definitely an advanced feature, which would take some time.

 

Also, something that would be a useful update is to have a 'fit to horizontal' or 'fit to vertical' button. For example; when applying trims I'm often scaling the texture to fit in a vertical dimension, then copying that scaling factor into the horizontal scaling, so to remove any texture distortion. It's very time consuming to do it by hand, so a button to do it (especially across multiple brushes of differing sizes) would be great! :)

You mean, you apply a certain scale to one dimension (say, the vertical one) and would like to apply that scale to all other brushes (in both dimensions) too?

 

Would this work? => copy that dimension into the "Default Scale" field in the Surface Inspector and hit "Natural". DarkRadiant should apply this default texture scale to all the selected faces.

Link to comment
Share on other sites

I'll check that tonight greebo, but I think it will have the problem of not 'fitting' the texture to the object. Maybe the fit button can be used first, but I'm not sure the effect it would have on brushes in various locations.

 

Regarding the multiple brushes; what i meant is 1 brush is 24 units high and 512 long, and another is 32 and 512 long. Both could be selected and the shorter one has 24 x 24 applied along it, the other 32 x 32 applied along it.

Link to comment
Share on other sites

I think I get what you mean: you'd like to fit the texture in a vertical direction and "undistort" the texture by adjusting the horizontal scale in the same step?

 

Hm, I'll have to think about whether this is easy to code or not. The current fit code does some matrix calculations which always do the same for each winding with a variable number of edges. One of the "hard" parts is to tell which direction of the face is "vertical" and which is "horizontal" (this is not trivial for DarkRadiant as the face can be arbitrarily oriented). I guess this can be determined by some 2D bounding box, and the principal axis can be taken as vertical or horizontal. Hm, thinking about this: I believe this is not easy to code. :P I'd have to dig into that and see what I can come up with. Please add it to the tracker. :)

Link to comment
Share on other sites

That's exactly what I mean greebo :)

 

Not sure I entirely follow the theory part but, if there's a 'fit and scale along vert' and 'fit and scale along horizontal' does it matter if it's the correct axis or not? You'd soon visibly tell if it was incorrect, and could use the other button to remedy.

 

I suppose the problem is ALL selected brushes need to at least be the same axis... :blush:

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