Jump to content
The Dark Mod Forums

How do "path" material/textures work?


Recommended Posts

For example, textures/darkmod/nature/grass/grass_edge/path/dirt/dirt_001_path defined in

materials/tdm_nature_grass_edge.mtr.

 

First problem, all of these 'path' textures display as the identical black and white alpha image in DR, so it's 100% guesswork as to what they might look like in game.

Next, when I make a patch and apply the above shader it doesn't even display in game. There's no indication whatsoever that I placed a patch with shader in the location.

At one point I copy/pasted a path from I think Bikerdude's Alberic (might be another FM) and it was actually a concatenation of two patches, a dirt_solid_nodraw texture on a patch cloned over a patch that'd been turned into a func_static (which seems to be necessary) with a shaderparm3 with value 0.9, and having a textures/darkmod/nature/grass/grass_edge/path/dirt/dirt_002_dark_path shader.

 

Is there any wiki or whatever that explains what's happening here?

 

eta: definitely shaderparm3 is essential to having the shader show at all. The wiki on shaderparm variables doesn't explain very well - why is it necessary on these paths and not on the decals I've applied, and transparent materials I've made? What should I keep in mind when giving it a value between 0 and 1?

The dirt_001_path is totally wrong for the area. Rats. And with no easy previews, the rats triumphant. Maybe I should make my own shaders for this kind of stuff.

Edited by The Wheezing Geyser
Link to comment
Share on other sites

There are 2 types of path textures:

  • The normal ones are dirt with alpha along the edges so they blend in smoothly with the surroundings. You can just put them on top of the grass to get a path.
  • The ones with the _edge suffix are grass textures with alpha, you put them along the border between dirt and grass to conceal the transition. This can also be used for other things than just paths, i.e. if you have a beach.
The first method is easier. You could combine both methods, but I don't think it's necessary.

 

You need to turn the path patches into func_static and use shaderParm3 to control how strongly visible the path textures are. By default they're invisible, so that's why you didn't see anything.

 

As for what they look like ingame: all path textures are derived from existing dirt or grass textures, you can see which one they're based on by looking at the name.

 

 

This tutorial by Sotha teaches how to use _edge textures:

Roads

Edited by Dragofer
Link to comment
Share on other sites

Thanks dragofer.
Sotha's tutorials are excellent.

I think I will be making my own materials to do this kind of thing.

 

The textures/darkmod/nature/grass/grass_edge/path/dirt/dirt_001_path isn't really an "edge". It's a whole path made of a center and two sides that fade out into alpha.

 

I hope I don't come across as whiny.

 

eta: oops, I see it's only got one "grass" side, and about 90% of it is "center". With no way of seeing this in DR, there's no way of controlling the placement by eye, except to dmap and play it in TDM and remember how out of whack my placement is. But there's really no way to edit it, to know wtf my changes to surface properties are doing, except by ... dmaping and playing again (I have to dmap again because I have to change it back and forth from func_static). Sure, I know it's "grass" and "dirt", somehow placed in the b&w alphamap that I see in the editor, but that doesn't amount to anything.

Edited by The Wheezing Geyser
Link to comment
Share on other sites

eta: oops, I see it's only got one "grass" side, and about 90% of it is "center".

That sounds like the texture isn't properly aligned to the surface. You could use the surface inspector, S, then 'fit' the texture to make a start on it.

Link to comment
Share on other sites

I make my modules to fit my map, I don't make my map to fit modules.
There's no way I want to work with shaders that require I turn the underlying brushes and patches into func_statics just to see them in the game, where I can't even preview what is expected in the DR editor. No way. Not just to make a path through a woods, or a cavern.

Link to comment
Share on other sites

You only need to make the path-bearing patches into func_static, which is what you'd eventually do anyway in the name of optimisation. That the path needs a shaderParm is a nuisance for which I don't see any need, but I see it as a quirk of the editor. By the way: you can resize func_statics without reverting them to worldspawn by pressing tab. Useful if you don't want them to lose spawnargs, like here.

 

 

I make my modules to fit my map, I don't make my map to fit modules.

You're working with modules then? Or is this in the sense of fitting textures to patches?

Link to comment
Share on other sites

dragofer, I've been studying your "river" and have learned much, about how to make an area, use "seed", and I stole your foliage.ase because it's perfect size for... well, just about for general anything. I found out about how to use func_relays, etc., and I've hardly started learning. I hardly have a clue how you do it but you sure do keep things fun. (jeez, you even had a perfect carriage, with horses trotting along,...)

I find it difficult to work with premade model "modules". Inevitably I almost instantly find that I have to make a copy of the model in DR made out of brushes and patches, and sometimes with interchangeable brushes and patches (e.g. part of a wall that's a patch, and that has a brush equivalent to replace it in certain circumstances), and which can be retextured, resized, split and decomposed, at will, so I have a fluid working space. Then I can make my own "corners" since it's part of the underlying geometry. What I learn from the premade models is about dimensions and style, and it seems to me that there's now a certain "DM Classic" style that I want my maps to belong to.

 

Sotha's tutorial on "roads" was a demonstration of how to make a certain modular "road" out of patches and shaders, with these "edge" textures featured as transition shaders. But that isn't exactly the application I have in mind and I was trying to use the shaders inappropriately.

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

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...