Quake3World.com Forums
     Level Editing & Modeling
        More that one shader at a time on a bot?


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




Print view Previous topic | Next topic 
Topic Starter Topic: More that one shader at a time on a bot?

It starts. I win. The end!
It starts. I win. The end!
Joined: 16 Feb 2005
Posts: 528
PostPosted: 03-14-2005 09:00 PM           Profile Send private message  E-mail  Edit post Reply with quote


Can more than one shader be applied to a bot?

For example could the hologirl2 shader like on "angel" found in

models/mapobjects/bitch/hologirl2

be applied on a bot along with the tinfx2 shader like on "Razor/ID" found in

textures/effects/tinfx2

and both effects show at the same time?

That way the bot looks shiny and like they have waves of energy flowing down them.

If so then I would like to post or send someone my coding so they can look at it and tell me where I am going wrong.

Thanks!



_________________
Uh, well....good luck with that. :shrug:

Image


Top
                 

Elite
Elite
Joined: 29 Apr 2002
Posts: 6222
PostPosted: 03-14-2005 11:55 PM           Profile Send private message  E-mail  Edit post Reply with quote


yes, it can. it'll just stack up like normal.

post what coding you have got here and we'll be able to tell you how it's done promptly :) but basically they just add on top of eachother like normal shaders




Top
                 

It starts. I win. The end!
It starts. I win. The end!
Joined: 16 Feb 2005
Posts: 528
PostPosted: 03-15-2005 07:30 AM           Profile Send private message  E-mail  Edit post Reply with quote


Ok, here ya' go! It's a heck of a long list.

First I created my own shader immages: hologirl2(original)
hologirl20
hologirl21
hologirl22
hologirl23
tinfx2d(original)
tinfx20d
tinfx21d
tinfx22d
tinfx23d
tinfx24d
kc_fogcloud3(original)
kc_fogcloudyel3
kc_fogcloudyel3b
kc_fogcloudyel3r
and placed them into their proper folders.


These are my scripts for the shaders I want on deity:

models/players/deity/default
{
{
map textures/sfx/kc_fogcloudyel3.tga
blendFunc GL_ONE GL_ZERO
tcmod scroll 0 1
tcMod turb 0 .25 0 1.6
tcmod scale 4 4
rgbGen identity
}
{
map models/players/deity/default.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}


}
models/players/deity/blue
{
{
map textures/sfx/kc_fogcloudyel3b.tga
blendFunc GL_ONE GL_ZERO
tcmod scroll 0 1
tcMod turb 0 .25 0 1.6
tcmod scale 4 4
rgbGen identity
}
{
map models/players/deity/blue.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}


}
models/players/deity/red
{
{
map textures/sfx/kc_fogcloudyel3r.tga
blendFunc GL_ONE GL_ZERO
tcmod scroll 0 1
tcMod turb 0 .25 0 1.6
tcmod scale 4 4
rgbGen identity
}
{
map models/players/deity/red.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
rgbGen lightingDiffuse
}


}
models/players/deity/default
{
{
map textures/effects/tinfx21d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/deity/default.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/deity/blue
{
{
map textures/effects/tinfx22d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/deity/blue.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/deity/red
{
{
map textures/effects/tinfx23d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/deity/red.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/deity/default
{
cull none

{
map models/players/deity/default.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl210.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/deity/blue
{
cull none

{
map models/players/deity/blue.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl211.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/deity/red
{
cull none

{
map models/players/deity/red.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl212.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/deity/null
{
{
map models/players/deity/null.tga
blendFunc GL_ONE GL_ONE
}

}

Now these are my scripts for the shaders I want on savagephantom:

models/players/savagephantom/default
{
{
map textures/effects/tinfx20d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/default.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/savagephantom/h_default
{
{
map textures/effects/tinfx20d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/h_default.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/savagephantom/blue
{
{
map textures/effects/tinfx22d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/blue.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/savagephantom/h_blue
{
{
map textures/effects/tinfx22d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/h_blue.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/savagephantom/red
{
{
map textures/effects/tinfx23d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/red.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/savagephantom/h_red
{
{
map textures/effects/tinfx23d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/savagephantom/h_red.tga
blendFunc blend
rgbGen lightingdiffuse
}
}

And these are my scripts for the shaders I want on spirit:

models/players/spirit/default
{
{
map textures/effects/tinfx24d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/default.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/default_h
{
{
map textures/effects/tinfx24d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/default_h.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/blue
{
{
map textures/effects/tinfx22d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/blue.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/blue_h
{
{
map textures/effects/tinfx22d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/blue_h.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/red
{
{
map textures/effects/tinfx23d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/red.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/red_h
{
{
map textures/effects/tinfx23d.tga
tcGen environment
rgbGen lightingdiffuse
}
{
map models/players/spirit/red_h.tga
blendFunc blend
rgbGen lightingdiffuse
}
}
models/players/spirit/default_h
{
cull none

{
map models/players/spirit/default_h.tga
depthWrite
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl21.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
rgbGen identity
// rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/spirit/default
{
cull none

{
map models/players/spirit/default.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl21.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/spirit/blue_h
{
cull none

{
map models/players/spirit/blue_h.tga
depthWrite
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl211.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
rgbGen identity
// rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/spirit/blue
{
cull none

{
map models/players/spirit/blue.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl211.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/spirit/red_h
{
cull none

{
map models/players/spirit/red_h.tga
depthWrite
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl212.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
rgbGen identity
// rgbGen vertex
rgbGen lightingDiffuse
}

}
models/players/spirit/red
{
cull none

{
map models/players/spirit/red.tga
alphaFunc GE128
depthWrite
//rgbGen identity
rgbGen lightingDiffuse

}
{

//map textures/effects/envmapcirc3.tga

map models/mapobjects/bitch/hologirl212.tga
tcgen environment
tcMod scroll -6 -.2
tcMod scale 1 1
blendFunc GL_ONE GL_ONE
//rgbGen identity
//rgbGen vertex
rgbGen lightingDiffuse
}

}

Ok, there it is. So far I have been told that:

1. No you can't apply more than one shader at a time. That I will have to create a new shader that combines the shaders I want into one so the game will display each of the shader effects but think it is only applying one shader to the bot.

2. Yes you can apply more than one shader at a time. The shaders will stack one over the other, but I tried that and it wouldn't display any of the shaders I applied. Only after I removed all but one shader would the game display whatever one shader I left applied.

So like I said there are my scripts and I hope someone can either show me where I have a text error or something so that these shaders will be applied to my bots or point me to a good tut that will teach me how to create a new shader that combines the effects of the other shaders I want applied to my bots.

Thanks!



_________________
Uh, well....good luck with that. :shrug:

Image


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 03-15-2005 07:12 PM           Profile Send private message  E-mail  Edit post Reply with quote


Magnus, what are you trying to do exactly?

- Create a shader with multiple stages (several textures layered on top of each other) for some special effect. For example, hologirl scrolling electric effect layered on top of shiny tinfx metal.

- Apply 2 separate shaders to different parts of a playermodel's body.

In the first scenario, you have to create a shader with different texture stages.

In the second scenario, you have to import the model into a 3D Modeling application, then reassign and UVW-wrap the shaders to the surface of the model.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

It starts. I win. The end!
It starts. I win. The end!
Joined: 16 Feb 2005
Posts: 528
PostPosted: 03-15-2005 11:11 PM           Profile Send private message  E-mail  Edit post Reply with quote


Quote:
For example, hologirl scrolling electric effect layered on top of shiny tinfx metal.


Exactly.

You know how the "angel" bot seems to have parts of her body that are transparent and she has that hologirl scrolling electric effect but the rest of her is regular dull brownish gray metal?

Well that is what I want to do with mt "spirit" bot. I basicly want a "angel" bot with shiny tinfx metal parts instead of the dull brownish gray metal parts and I want her in the shape of the "major" or maybe "hunter" bots.

In my other two bots "diety" and "savagephantom" I figured out what the problem was. It seems that some shaders are applied just below the skin and others are applied just on top of the skin.
I was trying to apply two shaders on top of the skin at the same time. The game was sort of z fighting over which shader to display. This caused neither of the shaders to display. As soon as I would remove one of the shaders the one that I left was applied and was displaying on the bot. I have their shader effects working the way I want them to now.
Well....there is one problem left with the "savagephantom" bot.
I put some icons on his skin when I created it in photoshop, but when I applied the shiny tinfx metal effect it covered up the icons I put on him. How do I get those icons to show through the shiny tinfx metal effect?

As far as the "spirit" bot goes for now I can either have the shiny tinfx metal or the hologirl scrolling electric effect and I have no idea how to get that transparent look like on the "angel" bot.

Thanks again.



_________________
Uh, well....good luck with that. :shrug:

Image


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 03-16-2005 07:14 AM           Profile Send private message  E-mail  Edit post Reply with quote


Something in the lines of this (just an example, may/may not be what you want, but should give you an idea of how multipass shaders work):

Code:
models/players/spirit/sfxmultistage
{
   //first stage (layer) displays tinfx
   {
      map models/players/spirit/tinfx21d.tga
      tcGen environment
      rgbGen lightingDiffuse
   }

   //second stage displays hologirl on top of tinfx
   {
      map models/players/spirit/hologirl20.tga
      tcMod scroll -6.0 -0.2
      blendFunc add
      rgbGen lightingDiffuse
   }
}


See the shader manual for more details (see my signature).



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

The Borked One
The Borked One
Joined: 23 Mar 2004
Posts: 4708
PostPosted: 05-24-2005 02:40 PM           Profile Send private message  E-mail  Edit post Reply with quote


Magnus - Get 'er working yet, any screens anything?




Top
                 

Mentor
Mentor
Joined: 12 Mar 2005
Posts: 3958
PostPosted: 05-24-2005 06:18 PM           Profile Send private message  E-mail  Edit post Reply with quote


He told me a few days ago he'd uploaded them to polycount but I haven't seen them yet.




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


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.