Decals
Decals
Ok, bit of a newbie question, but what does a decal shader and texture look like again? I want to create a set of decals I can place in my map on existing surfaces to break up the monotony of a large textured face a bit. You know, stuff like stains and blood spatters and such.
Re: Decals
That is awesome bro. Thanks a lot!
Re: Decals
http://q3map2.robotrenegade.com/docs/sh ... ricks.html
[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]
Re: Decals
Just a tip for those wishing to use the decals in cityy's ZIP file. The decal shaders in there will causes your brushes to cast shadows. Just add "surfaceparm trans" to fix that. Also, obsidian suggested adding q3map_bounceScale 0 to prevent the brush from reflecting radiosity light:
There's also some great decal textures over at cgtextures. Note that you'll have to invert the colors and add a black background before you can use them with the supplied shaders though.
Code: Select all
textures/_MAP_/tab_decal_stain_a
{
noPicMip
polygonOffset
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm trans
q3map_bounceScale 0
{
map textures/_MAP_/tab_decal_stain_a.tga
blendFunc GL_ZERO GL_ONE_MINUS_SRC_COLOR
}
}
Re: Decals
Wow, thanks for the decal textures, maybe I'll use it in my next map for MavComp#4...
EDIT: If I use the _decal projection, the range is from _decal patch and info_null entity but as the _decal patch is large or small, the decal will be also projected only in this size or the patch size is unimportant?
EDIT: If I use the _decal projection, the range is from _decal patch and info_null entity but as the _decal patch is large or small, the decal will be also projected only in this size or the patch size is unimportant?
Re: Decals
Tried the _decal projection in my EP testing map for tagret_gravity, doesn't work... I've captured few screenshots from a game and two from editor, how it looks like.
Editor screenshots:


In-game screenshots:
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_01.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_02.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_03.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_04.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_05.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_06.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_07.jpg[/lvlshot]
In the robotrenegade page is written:
Editor screenshots:


In-game screenshots:
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_01.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_02.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_03.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_04.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_05.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_06.jpg[/lvlshot]
[lvlshot]http://dl.dropbox.com/u/76484093/Quake%203/Quake%203%20World%20screenshots/issues/ep_gravitytest/decals_07.jpg[/lvlshot]
In the robotrenegade page is written:
Dou you can to specify what axis should be in use and how is calculated the distance?Make a simple patch mesh (it can be bent, but the quads in Radiant must be rectangular), select it and use the right-click context menu to turn it into a _decal entity. Target an info_null below the _decal entity and compile. Everything between the decal patch and the info_null will have a decal projected onto it.
Re: Decals
If it's just a flat wall, just paste a normal decal patch on it and be done with it.
Decal entities are only if you want to project a decal onto complicated/multiple geometry that would normally be restrictive with a single patch. You have the entire entity/target facing the wrong way, the patch can "float" anywhere it and it targets an info_null that should be placed behind the surface you want it to project onto. The texture will be projected on everything between the patch and the info_null.
There is no distance value, it will literally project on every surface between the patch and target. You specify axis by moving the target/rotating the patch.
Decal entities are only if you want to project a decal onto complicated/multiple geometry that would normally be restrictive with a single patch. You have the entire entity/target facing the wrong way, the patch can "float" anywhere it and it targets an info_null that should be placed behind the surface you want it to project onto. The texture will be projected on everything between the patch and the info_null.
There is no distance value, it will literally project on every surface between the patch and target. You specify axis by moving the target/rotating the patch.
[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]
Re: Decals
Is there some benefit to using a patch instead of a nodraw brush that has one face textured with the decal shader?
Re: Decals
No, that will work too. Patch is maybe easier to move around, identify and filter as a decal.
Some textures (like the blood streaks used in Doom 3) are easier to stretch and bend as a patch.
Some textures (like the blood streaks used in Doom 3) are easier to stretch and bend as a patch.
[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]
Re: Decals
Dont forget to make brush detail if you do
Re: Decals
So I've done it wrong. the target_null may be behind surface to project and distance doesn't matter...
If it's brush, it may be detail. Patches are detailed automaticaly?
I'll try it as I'll get home from school...
If it's brush, it may be detail. Patches are detailed automaticaly?
I'll try it as I'll get home from school...
Re: Decals
The short answer is yes.CZghost wrote:Patches are detailed automaticaly?
Re: Decals
And the long answer? Because when I've tried to add a detail keyword to the decal shaders, it was floating in air and displaing dummy texture. Then I've removed the detail keyword. Shaders now was displaing right textures, but again floating in air...Eraser wrote:The short answer is yes.CZghost wrote:Patches are detailed automaticaly?
So I'm asking, what's wrong? The target_null is now behind the decals and the _decal before the decals... _decal patch have nodraw common texture, is it this wrong? Will the _decal entity display in game when use solid texture?
If it's possible, make me please screenshot from editor and from game with and without tris, how it may look like... I'm using Radiant 1.5
In the robotrenegade page are in-game screenshots, but not the radiant sceens... Does ydnar still develope the q3map2 and make maps?
Re: Decals
- Create a brush.
- Place an info_null entity behind it.
- Place a patch in front of it and give this patch the decal shader you want.
- Turn the patch into a _decal entity
- Have the patch target the info_null entity.
- Compile.
As I understand it, that is what you need. The shader applied to the patch will be projected on the brush between the patch and the info_null entity.
I'm not sure what the difference is between the "detail" surfaceparm and the "trans" surfaceparm. The shader manual says basically the same thing about both of them. I don't think you ever need to use the "detail" surfaceparm as you can make brushes detail in the editor (hit CTRL+M when having a brush selected). I know that the "trans" surfaceparm stops the surface from blocking light, so maybe it does both or perhaps it has no effect on VIS and the shader manual is wrong. Someone should test this.
But I digress. What you need to do is follow the steps I put at the beginning of this post and forget about detail brushes because patches have no effect on the VIS stage of compiling your map so in that sense, patches are similar to detail brushes.
- Place an info_null entity behind it.
- Place a patch in front of it and give this patch the decal shader you want.
- Turn the patch into a _decal entity
- Have the patch target the info_null entity.
- Compile.
As I understand it, that is what you need. The shader applied to the patch will be projected on the brush between the patch and the info_null entity.
I'm not sure what the difference is between the "detail" surfaceparm and the "trans" surfaceparm. The shader manual says basically the same thing about both of them. I don't think you ever need to use the "detail" surfaceparm as you can make brushes detail in the editor (hit CTRL+M when having a brush selected). I know that the "trans" surfaceparm stops the surface from blocking light, so maybe it does both or perhaps it has no effect on VIS and the shader manual is wrong. Someone should test this.
But I digress. What you need to do is follow the steps I put at the beginning of this post and forget about detail brushes because patches have no effect on the VIS stage of compiling your map so in that sense, patches are similar to detail brushes.
Re: Decals
[lvlshot]http://zero.robotrenegade.com/imgdump/decalentity.jpg[/lvlshot]
[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]