Quake3World.com Forums
     Level Editing & Modeling
        Decals


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




Print view Previous topic | Next topic 
Topic Starter Topic: Decals

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-22-2012 01:29 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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.




Top
                 

surfaceparm nomarks
surfaceparm nomarks
Joined: 10 Aug 2009
Posts: 1005
PostPosted: 05-22-2012 01:38 AM           Profile Send private message  E-mail  Edit post Reply with quote




_________________
Portfolio
Twitter


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-22-2012 01:44 AM           Profile   Send private message  E-mail  Edit post Reply with quote


That is awesome bro. Thanks a lot!




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12305
PostPosted: 05-22-2012 06:05 AM           Profile Send private message  E-mail  Edit post Reply with quote




_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-22-2012 06:43 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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:

Code:
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
   }
}


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.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1747
PostPosted: 05-22-2012 07:18 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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?



_________________
[ CZghost Gaming | Facebook | Twitter | YouTube | Instagram ]
When you are worst off in your life, turn to face the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1747
PostPosted: 05-22-2012 08:49 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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

In-game screenshots:








In the robotrenegade page is written:
Quote:
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.

Dou you can to specify what axis should be in use and how is calculated the distance?



_________________
[ CZghost Gaming | Facebook | Twitter | YouTube | Instagram ]
When you are worst off in your life, turn to face the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12305
PostPosted: 05-22-2012 09:33 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-22-2012 10:28 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Is there some benefit to using a patch instead of a nodraw brush that has one face textured with the decal shader?




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12305
PostPosted: 05-22-2012 11:58 AM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Theftbot
Theftbot
Joined: 07 Oct 2009
Posts: 471
PostPosted: 05-22-2012 12:12 PM           Profile Send private message  E-mail  Edit post Reply with quote


Dont forget to make brush detail if you do




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1747
PostPosted: 05-23-2012 12:20 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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



_________________
[ CZghost Gaming | Facebook | Twitter | YouTube | Instagram ]
When you are worst off in your life, turn to face the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-23-2012 01:24 AM           Profile   Send private message  E-mail  Edit post Reply with quote


CZghost wrote:
Patches are detailed automaticaly?


The short answer is yes.




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1747
PostPosted: 05-23-2012 05:34 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Eraser wrote:
CZghost wrote:
Patches are detailed automaticaly?


The short answer is yes.

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

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?



_________________
[ CZghost Gaming | Facebook | Twitter | YouTube | Instagram ]
When you are worst off in your life, turn to face the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 42633
PostPosted: 05-23-2012 05:54 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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




Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12305
PostPosted: 05-23-2012 06:11 AM           Profile Send private message  E-mail  Edit post Reply with quote




_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1747
PostPosted: 05-23-2012 07:03 AM           Profile   Send private message  E-mail  Edit post Reply with quote


Very thx, it's functionable now... I'll sketch the _decal usage ;)



_________________
[ CZghost Gaming | Facebook | Twitter | YouTube | Instagram ]
When you are worst off in your life, turn to face the sun and all the shadows will fall behind you.” - John Lennon


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