Jump to content
The Dark Mod Forums

Texture Culling


Springheel

Recommended Posts

. Is alphaval a transparency value?

 

Yes.

 

. If I copy and paste a material def in a material file, how does it get to the end user, the player? Do I have to keep a note to make sure that material file is included in my map archive? Won't it conflict with the other material defs? Should I not rather always save as a separate material file with a unique definition - that is, not used in the eventual DM resources?

 

The code references the material only by the name of it, so as long as you change the name of your material, there will be no conflicts. The name is the first line that looks like:

 

"textures/darkmod/metal/flat/shiney_copper"

 

for brush textures, or "tdm_church_pew" for models.

 

You don't have to do anything special to make your material available. As long as it's in a .mtr file in the materials folder, it will be read.

 

You've probably already read this page, but just in case: http://www.thirdfilms.com/darkwiki/index.p...c_Material_File

 

. What does add more colour mean? Increase the colour saturation like when you turn up the colour control on the PC monitor or TV? Or does it mean brighten (ie, in contrast to darken)?

 

I'm not 100% sure. I'm still experimenting with this myself, though it's not just saturation, as especially low values look almost black.

 

. I don't really understand this rgb 0.15 * parm11 or how it's used.

 

It's the part that makes it froblight, that's all I know.

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

... The code references the material only by the name of it, so as long as you change the name of your material, there will be no conflicts. ... You don't have to do anything special to make your material available. As long as it's in a .mtr file in the materials folder, it will be read.

 

Sorry to keep harping on about this but I want to be absolutely sure I've not misunderstood. Are you saying...

 

1. If I copy and paste and rename a def within my copy of a common file (eg, tdm_metal_flat.mtr) containing other defs and include that in my map archive, the duplicated identical defs will not conflict?

 

or...

 

2. The material definition is read into the map (or a file creating during compile) and not needed by the player? So we don't need to include any matrial defs in our map archive?

Link to comment
Share on other sites

The material entries are referenced by name. The filename itself should not matter. So if you want to create your own version of a material, you have to copy it somehwere, and then rename it to something else.

The material is needed by the player, because Doom 3 readsd this at map startup. All materials that you reference in your map or models, or whatever, need to be present whenever the map is loaded. Otherwise you get black entities.

Gerhard

Link to comment
Share on other sites

@Fidcal: The contents of PK4 files will be overriden by the contents in the darkmod/ folder. This means that a material file materials/test.mtr within a PK4 can be overridden by a file of the same name outside of the PK4.

 

I recommend creating an own shader file .mtr and putting all your custom shader definitions in there. Generally, beta mappers should avoid name conflicts with any files of the mod itself.

Link to comment
Share on other sites

Perhaps I am still not explaining myself clearly. I am asking because Springheel in his example, copied and pasted back into the same file then renamed the new def. I will spell it out:

 

I copy a def that is in the file tdm_metal_flat.mtr and paste it back into tdm_metal_flat.mtr.

I modify my new def and rename it.

I save tdm_metal_flat.mtr.

I make a note that I must include it with my map archive.

In tdm_metal_flat.mtr there are other definitions, eg, textures/darkmod/metal/flat/tiling_1d/rough_iron01

I have to include my copy of tdm_metal_flat.mtr in my map archive because it has my new def.

The player thus will have two different copies of tdm_metal_flat.mtr - mine and the DM resource one.

The definition for eg, textures/darkmod/metal/flat/tiling_1d/rough_iron01 which is in both my copy of tdm_metal_flat.mtr and the player's copy of tdm_metal_flat.mtr (which they have in the DM resources) will not conflict?

 

@greebo: You posted just as I was writing this. Seems to me that 'recommend' is not enough. Surely it is critcial for the mapper to make a separate mtr file if it will be overwritten?

Link to comment
Share on other sites

I guess you can put it that way. :)

 

1. Avoid name conflicts of shaders (this is vital, TDM will emit warnings for shaders or entityDefs of the same name)

2. Avoid name conflicts with vanilla TDM files.

 

I think we haven't decided on a clean way of how to enable betamappers to override mod default content (the most critical example is the file tdm_ player_ thief.def - assume you want to override the player's start health), which is something we might have to consider when doing the concepts for the map loader GUI.

 

Generally, if you need to tweak vanilla TDM content, copy and rename that definition and put it into a new custom file which is then included in your mission PK4.

Link to comment
Share on other sites

I want to try a more creamy yellow version of the pale grey tight_large_blocks to see if it goes better with my red brickwork. As described earlier in this thread I copied out the def from the tdm_stone_brick.mtr and pasted it into a text file and saved it as fidcal.mtr in the materials folder. I then edited it as follows and resaved it. The material does appear in DR and I've put it on some stone steps but no change from the original no matter what color values I use. Where have I gone wrong?

 

//Cream version of pale grey tight_large_blocks.....
textures/darkmod/stone/brick/tight_large_blocks_cream
{
stone

qer_editorimage textures/darkmod/stone/brick/tight_large_blocks


{diffusemap
	 map textures/darkmod/stone/brick/tight_large_blocks
	 color .7, .7, .1, 1 //color <redval>, <greenval>, <blueval>, <alphaval>
}


bumpmap		 textures/darkmod/stone/brick/tight_large_blocks_local
etc. etc.....

Link to comment
Share on other sites

Thanks greebo. I concentrated so hard on on part I omitted the word 'blend'.

 

Testing so far the values seem to be a subtraction so always darker than the original.

 

Can't see changes in DR but only in Doom. But don't need to dmap once done just map will do but it needs doom reloading EVERY time so a LOT of reloading needed. Anyone know the bit you add to the desktop doom shortcut to run a map? Searched the net in vain. I tried +map name but I'm doing something wrong as I just get doom. That is, this is my shortcut for a windowed dark mod where 853.map is the name of my map in maps/h folder...

 

G:\doom3\Doom3.exe "+set fs_game darkmod +set r_fullscreen 0 +seta com_allowConsole 1 +map h/853"

 

All I get is doom - not even dark mod.

Link to comment
Share on other sites

Can't see changes in DR but only in Doom. But don't need to dmap once done just map will do but it needs doom reloading EVERY time so a LOT of reloading needed.

 

As long as you don't add any new models, textures, sounds, etc. to doom, or modify defs or materials, you don't need to reload. If you change properties on entities, you don't even need to dmap. For example, if you only change the colour of a light, neither reloading nor dmap is needed. If you add new brushes, or resize them then you must dmap but not reloading. Not sure if you need to dmap if you move brushes around, but I think yes. If you move models around, you also need to dmap.

 

I usually keep D3 running in the background and only reload the map after changing it.

 

The parameter you were looking for is:

+map <mapname>

Gerhard

Link to comment
Share on other sites

Select the surface with the new texture and type reloadSurface in the console (could be reloadsurfaces).

Link to comment
Share on other sites

Fidcal: just words red, green or blue , f.e. red 0.7 etc... But color combines them all in one line as parametres - also good solution.

 

Can't see changes in DR but only in Doom. But don't need to dmap once done just map will do but it needs doom reloading EVERY time so a LOT of reloading needed.

You mean reloading entire map to test a change in material declaration? Jeez no! Type in console: reloaddecls for any txt files modified (materials, defs etc.), reloadimages for changed textures or reloadmodels for changedmodels. Doom is not a Dromed! ;) Actually type only reload and press TAB to see other possibilities :)

 

 

Select the surface with the new texture and type reloadSurface in the console (could be reloadsurfaces).

Could you elaborate on this one a little bit more please? Doom crashed after I typed reloadsurface... :(

Link to comment
Share on other sites

Testing so far the values seem to be a subtraction so always darker than the original.

Note that the values are multiplied with the pixel values on the texture. Hence multiplying a colour channel with 1 doesn't change anything:

rgb 1

Link to comment
Share on other sites

Testing so far the values seem to be a subtraction so always darker than the original.

 

 

Anything less than one will subtract, and more than one will add, theoretically.

 

Could you elaborate on this one a little bit more please? Doom crashed after I typed reloadsurface...

 

I read one place that it is supposed to reload the materials and images of the surface or model selected. However, THIS page says it works on whatever your crosshairs would be pointing at, which fits more the behaviour I've experienced. I've never had a crash.

 

http://www.modwiki.net/wiki/ReloadSurface_(console_command)

 

Didn't know about reloaddecls, though, that's useful. :)

Link to comment
Share on other sites

The shortcut problem was I didn't need the quote marks. I could have sworn Windows liked quote marks if there were spaces in the arguments. Anyway, I might not need it now but useful to have.

 

Pinkdot: thanks - reloaddecls works a treat and changes it before your very eyes without a reload! I've added it to my 'favourite console commands' file.

 

Yes, it seems the original texture is multiplied by the 'color' values but only up to 1, 1, 1 so it must always be darker. 1.5, 1.5, 1.5 is exactly the same as 1, 1, 1. To get the same brightness for cream as for the original I would theoretically need to increase red and green and decrease blue but the original can never be increased so all I can do is decrease the blue. 1, .95, .85 is about as close as I can get. It's better than pure pale grey though I think in this situation. Is it a good idea when creating new textures to make them slightly brighter than wanted then putting a default color .9, .9, .9 in the material declaration?

 

Crosshairs? I don't got no crosshairs! :laugh: BTW I don't even have any weapons anymore do they now have to be defined by the mapper somehow?

Link to comment
Share on other sites

While we're talking about material shaders, can anyone decipher this for me?

 

Colored

 

The colored keyword multiples all channels of the associated map by the corresponding shader parameters gathered from the entity which this material shader is applied.

Link to comment
Share on other sites

Is it a good idea when creating new textures to make them slightly brighter than wanted then putting a default color .9, .9, .9 in the material declaration?

It will probably have some performance impact since it adds some extra calculations.

 

The only way to brighten something is to add a BLEND ADD stage.

{
blend add
map _white.tga
rgb 0.1  
}

 

Just change the value of RGB or use COLOR (or RED, GREEN, BLUE) to brighten changing the HUE of texture.

 

@Springheel - thanks, I'll try that.

 

BTW: is there somewhere a full list with all console commands explained?

Link to comment
Share on other sites

While we're talking about material shaders, can anyone decipher this for me?

 

Colored

 

The colored keyword multiples all channels of the associated map by the corresponding shader parameters gathered from the entity which this material shader is applied.

 

When you have a brush (or several brushes and patches, whatever you want to build) textured with this, you can convert it to a func_static and add for example

"color" "0.1 0.4 0.6"

in DarkRadiant. This will change the color of the texture as if the same values were applied in the shader.

 

The property can be found under basic => _color, where a color chooser is also available.

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

      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 )
      · 2 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
       
      · 5 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
    • 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
×
×
  • Create New...