Decals for Q3A - Rust, ... ?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Decals for Q3A - Rust, ... ?

Post by AEon »

When I worked on a Q4 map there were many decals you could "splash" on all your walls to make the map look more "rusted" and "used". The shader, Sock initially created for rotating weapon pads, using the polygonoffset command, lets you place your decals right on the floors, but that should also work for walls?

Code: Select all

textures/aecantw2/aewp_gl
{
	qer_editorimage textures/aecantw2/aewp_gl.tga
	surfaceparm nodamage
	surfaceparm nolightmap
	surfaceparm nonsolid
	surfaceparm nomarks
	surfaceparm trans
	polygonoffset
	q3map_backsplash 0 0	// Avoid point source lighting on face
	q3map_surfacelight 400
	q3map_lightsubdivide 64	// Finer subdevision
	{
		clampmap textures/aecantw2/aewp_gl.tga
		blendfunc add
		rgbGen Vertex
		tcMod rotate 45
	}
}
Question: Is there an archive of decals for Q3 with rust or green (vegetation intruding buildings) smears?
User avatar
Hipshot
Posts: 1533
Joined: Sun Jan 20, 2002 8:00 am

Re: Decals for Q3A - Rust, ... ?

Post by Hipshot »

Works for every surface... people should use it more, for weapon spawners, trims, etc.
There's no archive of these kinds textures specifically for Q3 AFAIK, but probably for many other games.
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

If there were no copyright issues, I'd simply use the Q4 decals, but alas there are. I might have to look at the Q4 textures, and try to recreate some of them... hmmm... one of the q3dmp11 (fKd's) textures has such rust smears, maybe one can "edit away" the rest of the texture...
phantasmagoria
Posts: 8523
Joined: Wed Oct 22, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by phantasmagoria »

As long as it's not for profit, I don't think id would make a big deal about you using a texture from one of their games in another for a community project, especially if you give them credit in the .txt
[size=85]
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

Ages ago, we had at least one of the id folks here in the forum, and the theme was always, stay away from using content from one id game in another one. Sure I could do it, and chances are almost zero for this to be an issue, but who needs that kind of trouble ;)
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

I've been toying around with decals, but never really got the kind of effect working that I was looking for.

For instance, I want to make a corner trim like so:
Image

The overlayed/polygonoffset patch would be transparant/alpha shaded (alpha channel as indicated). I would use that, if I could:
a) get it to work right with the lightmap (I never managed to figure out how to only make the lightmap stage apply to the opaque parts of the trim, and not darken all of it)
b) get it to work in fog/water -- played quite a bit with the "sort" keyword, but never got the right kind of results.

So maybe I've been doing something wrong? Maybe such decals should only be simple multiply or additive blends?
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

As was mentioned, such decals, as Tabun mentions would have a huge potential for saving tris. A solution for their use be quite interesting. Which makes me wonder why decals are primarily an idTech4 (Doom III, :q4:) thing, and were not used more in :q3:?
dONKEY
Posts: 566
Joined: Mon Oct 15, 2001 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by dONKEY »

I've used decals loads...I'm pretty sure hipshot has too. Myth made me a lovely little set of blood splats and erosion features. Shallow helped with the shader, which uses a negative blend (so the decal image is placed on a white background then inverted), this way you can blend the decal image with and keep the dark colour.
The only problem I have come across is projecting _decal entities across uneven model (mesh) surfaces, it works but sometimes it's a bit random and takes some tweaking.
The other benefit to decals that I've messed with a little is that where as the alphamod blending approach to texture blending fails when someone switches to vertex mode, using decals to blend textures (QW style) doesn't.
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: Decals for Q3A - Rust, ... ?

Post by fKd »

i would really like it if someone made a decal tex set... any takers?
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

I don't mind chucking in a few for a good set. As with all my textures: if someone wants to use them, they're free to -- as long as they properly credit in the relevant .txt files.

I've whipped up some quick tests for my current project, and it's easy enough to make stuff like this:

Image

Image

Multiply/filter blended decals are easily done and the results are very neat. Like I said, the big problem is alpha-channel transparancy & lightmaps.
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Decals for Q3A - Rust, ... ?

Post by obsidian »

Here are a couple:

Code: Select all

// Edge Fleural
textures/obsidian_decals/fleuraledge
{
	noPicMip
	polygonOffset
	surfaceparm nonsolid
	{
		map textures/obsidian_decals/fleuraledge.tga
		blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR	//inverse multiply (fog)
	}
}

// Rounds - vents, drains and pipe ends (float)
textures/obsidian_decals/rounds
{
	noPicMip
	surfaceparm nomarks
	surfaceparm nonsolid
	surfaceparm trans
	qer_alphaFunc gequal 0.5
	{
		map textures/obsidian_decals/rounds.tga
		alphaFunc GE128
		depthWrite
	}
	{
		map $lightmap
		blendFunc filter
		depthFunc equal
	}
}
The first one is an inverse multiplicative blend with the RGB of the image inverted. This makes it fog friendly. Otherwise you can use a normal multiplicative blend if you have no fog/water. This method also works well with weapon marks and player shadows. Only disappointment is that it is multiplicative, so it creates a darker effect that only works well for stains but not so well for overlays (like Tabun's bricks above).

The second one is a decal with various round alpha channel bits for plastering on walls near pipes and such. These I leave on a patch or brush that floats 0.25 units above the below surface (can't remember why I didn't use polygon offset, I think it had to do with making them work with player shadows or something so they needed to be physically lifted above the floor). It's non-marking to make it weapon marks friendly. Works with fog.

Tip: Decal entities are fun!
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: Decals for Q3A - Rust, ... ?

Post by jal_ »

Tabun wrote:I've been toying around with decals, but never really got the kind of effect working that I was looking for.

For instance, I want to make a corner trim like so:
Image

The overlayed/polygonoffset patch would be transparant/alpha shaded (alpha channel as indicated). I would use that, if I could:
a) get it to work right with the lightmap (I never managed to figure out how to only make the lightmap stage apply to the opaque parts of the trim, and not darken all of it)
b) get it to work in fog/water -- played quite a bit with the "sort" keyword, but never got the right kind of results.

So maybe I've been doing something wrong? Maybe such decals should only be simple multiply or additive blends?
For this effect it ends up being better to do the corner trim brushes which are 1 unit outside of the wall and export them as a model. Then place the model and forcemeta it, but let it non-solid. I've done this effect with both decals and models in wdm4, and the second method is better at the end because decals are always offsetted 1 unit alongside the wall normal, but, for looking good, the 2 decals in the corner should touch each other too.

I'll look for some pics to illustrate it better, cause my explanation sux. :/

EDIT: Pics. The first one uses horizontal decals. See how the surface below the decal can be seen on the corner (it's even worse if both horizontal and vertical faces use decals). The second pic uses horizontal and vertical faces which were 1 unit outside of their respective surfaces and exported to a model as a quick way to make them nonsolid.

Image

Image
DTS
Posts: 2879
Joined: Thu Jul 13, 2000 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by DTS »

AEon wrote:As was mentioned, such decals, as Tabun mentions would have a huge potential for saving tris. A solution for their use be quite interesting. Which makes me wonder why decals are primarily an idTech4 (Doom III, :q4:) thing, and were not used more in :q3:?
Well, aren't blood splatters and marks-on-walls decals? And they dissappear after a while cause of the performance hit.
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

@DTS: I don't think that's the only reason the weapon marks decals disappear over time, since it's also pretty ugly to be walking in a map completely covered in black blobs. Also, using up one box of plasma cells easily creates more decals than you're likely to use in any map. :) Polies are saved by using decals, because there's no need to cut up brushes for them (and no TJunc's are created).

@jal_: That decal effect doesn't look very good to me (and I don't think it's just the Tron-style that does that ;)).

Also, a side note regarding previously supplied shaders: If you get this ugly effect:
Image
The shader is missing surfaceparm nomarks. I just copied and pasted Obsidian's reverse-multiplied decal shader (which works very well indeed), but it still needs that line, or you'll probably get problems with weapon marks.
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
neoplan
Posts: 125
Joined: Thu Jun 05, 2008 9:47 pm

Re: Decals for Q3A - Rust, ... ?

Post by neoplan »

Is it possible to keep the weaponmarks without getting this effekt?
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

You only get that effect by having the weapon marks effectively doubled or overlapping. As long as there's a normal, solid, non-nomarks surface behind the decal, you'll get normal weapon marks (even if the decal has surfaceparm nomarks).
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

As per Aeon's request, here is a small batch of my home-made decals (most of which used in tabq1dm5): tab_decals_a.zip
Shaders need editing, but it's all pretty straightforward. This set uses Obsidian's reversed multiply shader.

Edit: license-free material, use freely -- but please give credit where due.
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

Tabun,
very cool... looking into those. Please read your PM from me, if you will :)

Note to self: Add the link to our forum resources.
fKd
Posts: 2478
Joined: Sat Jun 03, 2006 2:54 am
Location: Wellington
Contact:

Re: Decals for Q3A - Rust, ... ?

Post by fKd »

good stuff sir, very handy indeed!
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

I had a short exchange with Tabun about adding his decals to AEcell, but we both agree now that it would be much better to create some central archive for as many decals as possible.
  • Maybe "we" in the forum, could contact all the mappers who had created decals in their maps, to put all those into one large theme sorted decal archive (called e.g. q3w_decal). This is pretty much the same idea, as the huge skybox archive created over at lvlworld.
I noted in testing many maps, a while back, you will always find a few decals in each map.

Tabun,
  • since you created this set of decals, could you explain to us artistic laymen, what too look out for when creating the decals. They seem to work with "alpha transparency", and also seem to be colored. I had thought they would be strictly gray-scale textures, with various degrees of transparency, that are then "added" or "color merged" (for lack of a technical term) with the texture they are placed on?

    I am asking, because I'll try to create a few decals for AEcell, and some tips would help avoid the more obvious mistakes, hopefully.
sock
Posts: 424
Joined: Sat Sep 09, 2000 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by sock »

Yep count me on that request for info on how you created your decals Tabun, they are amazing quality and remind me alot of D3 decals. (in a good way) I certainly would love to create some decals but can't get the right combination of steps to make them look good in photoshop.

EDIT: Bad nick spelling mistake :(
Last edited by sock on Sun Oct 18, 2009 3:13 pm, edited 1 time in total.
Well he was evil, but he did build alot of roads. - Gogglor
My [url=http://www.simonoc.com/]Website[/url] & [url=http://twitter.com/SimsOCallaghan]Twitter[/url]
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

I'm a tinkerer, so I don't have a foolproof, unified way of producing decals and I'm rather happy to see that they are considered pro-material.

It's usually a matter of finding the right source material.
I usually find my best source materials at http://www.cgtextures.com (see the splatter section for nice sources to make bloodstains, esp.)
I'm very happy with the big brown mud-stains, myself. Here's how I made those:

1. Source:
[lvlshot]http://www.tabun.nl/tmp/decal_tut/dec_source.jpg[/lvlshot]

2. Then I do whatever I can to separate the stain from the background or at least make it possible to make a cutout without too much fuss.
Here I used Photoshop's "replace color". Select the lightest color in the background. Or actually, somewhat of an averaged value.. I selected the lightest part in the section right between all the stains. Tinker with the fuzziness until the stains get a nicely distinct outline (here I used 65). I also had some sections of stains selected with that setting, but that's ok. Then, I set the lightness slider all the way to the right (or however far it still looks right -- can sometimes get you jagged lines).
Result (crop):
Image

3. Now comes the hardest work. I use my tablet and a varied set of brushsizes and pressure settings to make the surroundings of the stain white. The replace color trick (and any editing you may have done with brightness values overall) really help to hide brushstrokes as long as you're careful. I also disconnected the various shapes of stain where they could, so I could get more separate textures. This wasn't exactly a perfect source image, so it took a while. Better images leave you with very little noise to edit out.

4. Then comes tweaking. The stains are way too dark to use on most of my textures, so I added an adjustment layer and make the whole image brighter. It usually takes a few tries to get the right brightness (and thus, transparancy) to use on your textures.

5. Finally I add an adjustment layer that inverts everything underneath it. That way I can use obsidian's shader, to make the decal look ok in fog.
Image


Step 4 had me thinking that it's probably a good idea to get some variation in the darkness/brightness of decal images in that q3w_decal library, so they can be used on many different surfaces.

I'm not so happy with my "cracks" decals, but if used right (subtility is key), they can work. What you need to look out for are source images that are already as close to crips outlines as possible-- i.e.: dark crackles on very lightly coloured mud or white plaster, coffee stains on clean creaseless paper, dark rust on bright yellow metal, etc.

What I didn't describe above is how to make tiling "trims" like the leaks in my decal set. But I guess everyone knows how to make tileable textures and stains/rust is particularly easy to work with for that purpose, anyway.

(The name's "Tabun," by the way. ;])
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
AEon
Posts: 1816
Joined: Sun Apr 20, 2003 7:00 am

Re: Decals for Q3A - Rust, ... ?

Post by AEon »

Very interesting info, thanks.

What I wonder about is the last texture, the final decal... it is blueish... now how does that look in-game? Does it matter, or would desaturate on that final texture also yield the same in-game results?

I'm still trying to understand how the shaders affect the "color merging" of decal and background texture.
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Re: Decals for Q3A - Rust, ... ?

Post by o'dium »

Its blue because it doesnt use additive blending ingame, so it darkens the surface vis inverting the colour. Ingame it would look brown.

Its better to do it this way, as if you do it the other way around (So the pic is the default brown colour on black) you would be doing an additive blend, which ADDS TGB data to the surface, i.e. making it brighter, resulting in the decal "glowing" some what. Again best way to see this is to place loads of additive decals over each other and nothing they blend to white, thus getting brighter. The above method glows.

The other method use (Which usually works very nice) is GL_DST_COLOR, GL_SRC_COLOR which would look like the normal decal texture, but on a grey background. This wont actually make the image lighter or darker, so it works nicer for some things.

Each way is fine, and there is no wrong way to do it, you just need to mess with the different blending styles to see which fits best. You want a glowing puddle of slime? Use additive. You want a dark grimey stain? Use destination colour, or minus source colour.
Tabun
Posts: 76
Joined: Fri Aug 07, 2009 4:26 pm

Re: Decals for Q3A - Rust, ... ?

Post by Tabun »

Aye. I might play around more with that gray (src_color/dst_color) blend -- might look better for moss than the filter I'm using now.

Maybe needless to add, but here it is: desaturating the inverted decal would just get you a desaturated (but inverted) result. Gray stains usually look pretty bad and unnatural, so I'd advise against it.
[size=85][url=http://www.tabun.nl]www.tabun.nl[/url][/size]
Post Reply