Page 6 of 8

Posted: Sat Apr 09, 2005 1:28 pm
by Rookie One.pl
I do. :)

Actually, all that's needed is a basic knowledge of TIKIs, shaders and a little bit of artistic skills. ;)

Posted: Sat Apr 09, 2005 2:16 pm
by jv_map
The fog isn't too bad I think... though you really need to add another layer to that sand ground texture shader (maybe even same texture but scale it up much... then blend with const alpha) so that it doesn't look so tily.

Posted: Sat Apr 09, 2005 5:36 pm
by wacko
Rookie One wrote:I do.
So what would I have to do 1st, to turn let's say the german worker into a cowboy?
jv_map wrote:...add another layer to that sand ground texture shader (maybe even same texture but scale it up much... then blend with const alpha)...
Ooops, u said so before and u were right. I forgot to do this, but now, I don't know what such a shader would look like. Using the same (stock) savel texture again and blend it? Wouldn't it have to have an alpha channel?

Posted: Sat Apr 09, 2005 5:54 pm
by Rookie One.pl
A micro skinning tutorial:
1. Make a proper directory structure somewhere, eg.:

Code: Select all

c:\cowboy---+
            |
            +---models---+
            |            |
            |            +---player
            +---scripts
            |
            +---textures---+
                           |
                           +---models---+
                                        |
                                        +---wildmaps
2. Extract the TIKI of the player model you want to edit (e.g. models/player/german_worker.tik and models/player/german_worker_fps.tik) to c:\cowboy\models\player.
3. View the TIKIs, track down the shaders and textures for them.
4. Do whatever you like with the textures.
5. Make new shaders for them.
6. Change the TIKI's name and edit it so that it contains the right model and surface definitions.
7. Pack everything into a .pk3.

Posted: Sat Apr 09, 2005 6:53 pm
by jv_map
You can fake an alpha channel with alphagen in the shader :wink: , e.g.

alphaGen const 0.5

creates a constant mid-tone alpha channel :)

Posted: Sat Apr 09, 2005 11:14 pm
by wacko
@jv thanks a lot. So I made a shader

Code: Select all

textures/savel/saveltest
{
	qer_editorimage textures/algiers/savel_1.tga
	qer_keyword rock
	qer_keyword wall
	surfaceparm sand
	surfaceparm trans
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/algiers/grndset_2af.tga
		tcMod scale 0.7 0.7
	}
	{
		map textures/algiers/savel_1.tga
		alphagen const 0.5
		blendfunc blend
	}
}
Is this it? Or is there a better way?

Posted: Sat Apr 09, 2005 11:29 pm
by wacko
Rookie One.pl {sfx} wrote:A micro skinning tutorial
hehe, thanks! Maybe a bit too micro for my microbrains, but I'll try my best. :D

Posted: Sun Apr 10, 2005 1:12 am
by lizardkid
not sure if this was what jv was helping with but an overlay texture might be good to break any monotony.

just a basic texture like any other, only difference is it has a lot of holes and such and is used exclusively as a notsolid brush, like adding quick rips and holes in walls without making a new texture ;)

Posted: Sun Apr 10, 2005 7:28 am
by jv_map
Yes that's about what I had in mind Wacko :)

Only atm you are rendering 2 opaque maps over each other (1st and 2nd stage) so you'll see the first stage (lightmap). Hence bring the lightmap down and blend it.

Code: Select all

textures/savel/saveltest
{
   qer_editorimage textures/algiers/savel_1.tga
   qer_keyword rock
   qer_keyword wall
   surfaceparm sand
   surfaceparm trans
   {
      map textures/algiers/grndset_2af.tga
      tcMod scale 0.7 0.7
   }
   {
      map textures/algiers/savel_1.tga
      alphagen const 0.5
      blendfunc blend
   }
   {
      map $lightmap
      rgbGen identity
      blendfunc filter
   }
}
Scale of the large texture can probably be much larger (smaller number) than 0.7 too 8-)

Posted: Sun Apr 10, 2005 8:51 am
by wacko
jv_map wrote:Only atm you are rendering 2 opaque maps over each other (1st and 2nd stage) so you'll see the first stage (lightmap). Hence bring the lightmap down and blend it.
I tried both in a test map next to each other and I can't see any difference ingame. Did I miss something?
jv_map wrote:Scale of the large texture can probably be much larger (smaller number) than 0.7 too 8-)
Mmm, I tried some other values and 0.7 looked best imho, around 0.2 looks kind of washed out... Is there a way to rotate one of the stages (not making it rotate :wink: ) to reduce the tiling even more? Couldn't find anything in the Shader Manual :?

Posted: Sun Apr 10, 2005 9:18 am
by jv_map
Wacko wrote:I tried both in a test map next to each other and I can't see any difference ingame. Did I miss something?
Uhm... did you light the map? ;)
Wacko wrote:Is there a way to rotate one of the stages (not making it rotate :wink: ) to reduce the tiling even more? Couldn't find anything in the Shader Manual :?
tcMod transform can do it... but it's a little tricky to use :? experiment a bit I'd say :wink:

Posted: Sun Apr 10, 2005 9:32 am
by wacko
jv_map wrote:Uhm... did you light the map? ;)
:oops: Well, I did light the map, but there was nothing that could cast a shadow, so that's why there was no difference. :wink: Ok then, thanks a lot for ur help.
I'll start playing around with tcMod transform now :D

Posted: Sun Apr 10, 2005 10:45 am
by wacko
I'm done with playing around :lol:

Code: Select all

S' = s * m00 + t * m10 + t0
T' = t * m01 + s * m11 + t1
This is for use by programmers.
:shock: This strongly makes me remember that I am NO programmer :lol: What is s? what is t? what is my name?
Calling it "a little tricky to use"... Imagining to change parameters, compile, start mohaa to check - again and again for the next 2 years... no thnx :wink:

Posted: Sun Apr 10, 2005 10:58 am
by jv_map
You don't have to compile again... :shock: ... vid_restart will do :)

Posted: Sun Apr 10, 2005 1:10 pm
by wacko
jv_map wrote:You don't have to compile again... :shock: ... vid_restart will do :)
Hell yes, u're right (again :roll: ). This way (and having two pcs) it wasn't that hard though I had no idea of what I did all the time :P .
After doing quite a lot of shaders that do need a recompile, I didn't dare to believe this is possible :wink: