Quake3World.com Forums
     Level Editing & Modeling
        Decals for Q3A - Rust, ... ?


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Decals for Q3A - Rust, ... ?

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 09-27-2009 05:07 AM           Profile Send private message  E-mail  Edit post Reply with quote


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:
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?




Top
                 

This is not Æon!
This is not Æon!
Joined: 20 Jan 2002
Posts: 2161
PostPosted: 09-27-2009 05:13 AM           Profile Send private message  E-mail  Edit post Reply with quote


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


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 09-27-2009 05:46 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Bück Dich
Bück Dich
Joined: 21 Oct 2003
Posts: 6076
PostPosted: 09-27-2009 06:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


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]


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 09-27-2009 08:20 AM           Profile Send private message  E-mail  Edit post Reply with quote


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 ;)




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 09-27-2009 02:37 PM           Profile Send private message  E-mail  Edit post Reply with quote


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?



_________________
www.tabun.nl


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 09-27-2009 11:50 PM           Profile Send private message  E-mail  Edit post Reply with quote


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:?




Top
                 

The Afflicted
The Afflicted
Joined: 14 Oct 2001
Posts: 562
PostPosted: 09-28-2009 05:11 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Immortal
Immortal
Joined: 02 Jun 2006
Posts: 2462
PostPosted: 09-28-2009 05:49 AM           Profile Send private message  E-mail  Edit post Reply with quote


i would really like it if someone made a decal tex set... any takers?




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 09-28-2009 07:41 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
www.tabun.nl


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12280
PostPosted: 09-28-2009 07:54 AM           Profile Send private message  E-mail  Edit post Reply with quote


Here are a couple:

Code:
// 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!



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Mercenary
Mercenary
Joined: 24 Mar 2008
Posts: 223
PostPosted: 09-29-2009 07:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


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




Top
                 

Elite
Elite
Joined: 12 Jul 2000
Posts: 11553
PostPosted: 10-04-2009 02:26 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-04-2009 04:49 PM           Profile Send private message  E-mail  Edit post Reply with quote


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



_________________
www.tabun.nl


Top
                 

Commander
Commander
Joined: 05 Jun 2008
Posts: 124
PostPosted: 10-13-2009 05:43 AM           Profile Send private message  E-mail  Edit post Reply with quote


Is it possible to keep the weaponmarks without getting this effekt?




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-13-2009 06:32 AM           Profile Send private message  E-mail  Edit post Reply with quote


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



_________________
www.tabun.nl


Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-17-2009 08:28 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
www.tabun.nl


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-17-2009 08:42 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Immortal
Immortal
Joined: 02 Jun 2006
Posts: 2462
PostPosted: 10-17-2009 02:19 PM           Profile Send private message  E-mail  Edit post Reply with quote


good stuff sir, very handy indeed!




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-18-2009 01:34 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

The Illuminated
The Illuminated
Joined: 08 Sep 2000
Posts: 1085
PostPosted: 10-18-2009 05:03 AM           Profile Send private message  E-mail  Edit post Reply with quote


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 :(



_________________
Well he was evil, but he did build alot of roads. - Gogglor
My Website & Twitter


Last edited by sock on 10-18-2009 07:13 AM, edited 1 time in total.

Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-18-2009 06:25 AM           Profile Send private message  E-mail  Edit post Reply with quote


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:


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. ;])



_________________
www.tabun.nl


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-18-2009 07:32 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Eh?
Eh?
Joined: 25 Mar 2001
Posts: 32049
PostPosted: 10-18-2009 07:39 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-18-2009 08:30 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
www.tabun.nl


Top
                 

The Illuminated
The Illuminated
Joined: 08 Sep 2000
Posts: 1085
PostPosted: 10-18-2009 12:13 PM           Profile Send private message  E-mail  Edit post Reply with quote


@Aeon, the blue tint to most of the decal textures is because they have been inverted. It got me puzzled for a while as well because I could not understand where the colour was being stored. (red blood splats are blue with white background)

@Tabun, sorry about the nick mixup, I was not paying attention, should of used quote function. I will go out tomorrow and try to get some new photo source images. It seems the source images Ive got are not that good. It certainly cool to see how you have done it, thanks for sharing. :up:



_________________
Well he was evil, but he did build alot of roads. - Gogglor
My Website & Twitter


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12280
PostPosted: 10-18-2009 05:20 PM           Profile Send private message  E-mail  Edit post Reply with quote


AEon wrote:
What I wonder about is the last texture, the final decal... it is blueish... now how does that look in-game?


obsidian wrote:
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.


AEon doesn't pay me any attention. Not feeling the love here. :tear:



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-18-2009 11:28 PM           Profile Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
AEon doesn't pay me any attention. Not feeling the love here. :tear:

Waves :)... your original post was about two weeks old, and I had simply forgotten about the info, alas.




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12280
PostPosted: 10-19-2009 07:22 AM           Profile Send private message  E-mail  Edit post Reply with quote


So it's a date? (Oh, what to wear!?!?)



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-24-2009 01:24 PM           Profile Send private message  E-mail  Edit post Reply with quote


This tutorial should help separate the useful decal parts in real-world images:


(This for the folks that don't use PS that often, but want to look into the decal matter)




Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 10-25-2009 08:18 AM           Profile Send private message  E-mail  Edit post Reply with quote


I recently noted that some folks use simple patch meshes to place their decals on, that surprised me a bit, because I usually use a brush with all faces covered with nodraw and the final face with the decal.

Is there some penalty involved when using the nodraw/brush variant?

I am aware that patches allow for better texture alignment control in relation to stretching and other deformations, whereas a brush face will very quickly make a proper alignment impossible.




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 10-25-2009 08:36 AM           Profile Send private message  E-mail  Edit post Reply with quote


I have no special reason to use patches for my decals so far -- not doing any weird shaping, so there's no advantage in that. I guess I just automatically took the road that didn't involve having two brushes overlap..



_________________
www.tabun.nl


Top
                 

Boink!
Boink!
Joined: 19 Apr 2003
Posts: 4493
PostPosted: 11-17-2009 09:23 AM           Profile Send private message  E-mail  Edit post Reply with quote


Tabun wrote:
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.

Will be using your decals in AEdm7... might have to recolor some of them though... once they are in the map I'll post a few shots.

I had the distinct deja vu of having used decals in this map before, and indeed that was for the Quake IV version :owned:




Top
                 

Mercenary
Mercenary
Joined: 24 Mar 2008
Posts: 223
PostPosted: 11-19-2009 11:27 PM           Profile Send private message  E-mail  Edit post Reply with quote


Tabun wrote:
@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 ;)).


There's nothing wrong with the decal itself. It's just wrong to use a decal to make a corner, and that's what the shot shows.




Top
                 

Warrior
Warrior
Joined: 07 Aug 2009
Posts: 76
PostPosted: 11-20-2009 07:08 AM           Profile Send private message  E-mail  Edit post Reply with quote


Hmm, the whole plan of having a lot of people join in and contribute to a huge decal library never really got off to a good start, has it? ... ;]



_________________
www.tabun.nl


Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group