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

    • 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.
      · 4 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...