Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsJedi Outcast and Jedi Academy Editing Forum → Decal Shader
Decal Shader
2004-06-08, 2:27 PM #1
I'm trying to make a new decal-type shader. I saved a new .shader file with this text:
Code:
textures/castle/symbol
{
	qer_editorimage	textures/castle/rad_seal
	polygonOffset
	q3map_nolightmap
    {
        map textures/castle/seal
        alphaFunc GE128
        blendFunc GL_DST_COLOR GL_SRC_COLOR
    }
}

The image I want to project is a grey-on-black .jpg file (textures/castle/seal.jpg). The image in Radiant is the same thing in different colors-textures/castle/rad_seal.jpg).

What am I doing wrong?

------------------
Have you ever been philosophical? It's pretty fun.
Well don't just sit there, REPLY!!!
2004-06-09, 1:27 AM #2
Dunno. Maybe the .jpeg needs to be a .tga

------------------
Snail racing: (500 posts per line)

--------@%

The Massassi JO/JA Single Player contest info
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2004-06-09, 2:34 AM #3
I can only echo Echoman in this matter. Try with a tga. I have one decal working fine with alpha mapped tga. My blend function for it is GL_SRC_ALPHA GL_ONE, though. I have a _glowe stage with a jpeg similar to yours: with a black bacground and blending option GL_ONE GL_ONE.

Works fine. But then again, I know very little about these things, even if I use them a lot! [http://forums.massassi.net/html/smile.gif] I just mess around changing little things as long as it takes, or I ask Gothix. Gothix always knows.

------------------
Frozen by ICARUS
Frozen in the past by ICARUS
2004-06-09, 3:53 AM #4
That sounds about right-in ShaderEd, I get a "Bad Filetype" message. How can I convert that .jpg to a .tga? (I'm using Fireworks 3 BTW)

------------------
Have you ever been philosophical? It's pretty fun.
Well don't just sit there, REPLY!!!
2004-06-09, 4:34 AM #5
I don't know what is Fireworks, but if it can handle alpha channels, then you can do it. Alpha channel is just like an 8 bit layer that defines which parts of the image are transparent and how much. So, if Fireworks can handle an alpha channel and save as tga you are fine, if it can handle transparencies and save as png, you are fine, as well.

I don't know how to modify or create png transparencies, which is the reason I use tgas.

------------------
Frozen by ICARUS
Frozen in the past by ICARUS
2004-06-09, 5:36 AM #6
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Spi Waterwing:
That sounds about right-in ShaderEd, I get a "Bad Filetype" message. How can I convert that .jpg to a .tga? (I'm using Fireworks 3 BTW)

</font>


I don't use ShaderED. Hmm. I use notepad.

------------------
Snail racing: (500 posts per line)

--------@%

The Massassi JO/JA Single Player contest info
SnailIracing:n(500tpostshpereline)pants
-----------------------------@%
2004-06-09, 6:23 AM #7
I edited the shader in Notepad, then I used ShaderEd to see if it worked.

------------------
Have you ever been philosophical? It's pretty fun.
Well don't just sit there, REPLY!!!
2004-06-09, 7:08 AM #8
If you use an alphaFunc, you need an alphachannel. Since you don't, nuke the alphaFunc and replace GL_DST_COLOR GL_SRC_COLOR with GL_ONE GL_ONE. No longer need for a TGA that way, as well.
2004-06-09, 7:35 AM #9
notepad works best.. and you dont need to make a tga file, sometimes the jpg files over-write tga files.. and all of your jpg files become one big tga shader file.. So in short, if you shader jpg files, they become a tga file on thier own.. Thats if you put tga on your textures as opposed to jpg. Still include all files in the pk3 thou.. and make sure your shaderlist has the shader you made in there.

------------------
-- [url="mailto:Jatso_jk1@hotmail.com"]mailto:Jatso_jk1@hotmail.com[/url]Jatso_jk1@hotmail.com</A>--The Bounty Hunters Arc Forum--Firehound Inc.--
-- Jatso_jk1@hotmail.com--The Bounty Hunters Arc Forum--Firehound Inc.--
2004-06-09, 7:47 AM #10
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SilentSavur:
sometimes the jpg files over-write tga files..</font>
The JA engine searches inb JPG -> PNG -> TGA order, to be exact.
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SilentSavur:
and all of your jpg files become one big tga shader file.. </font>

Absolutely not.
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SilentSavur:
So in short, if you shader jpg files, they become a tga file on thier own.. Thats if you put tga on your textures as opposed to jpg.</font>

Hahahaha.. that's the best fairytale I've heard today. Thanks. [http://forums.massassi.net/html/smile.gif]
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SilentSavur:
Still include all files in the pk3 thou.</font>

Just the ones you actually use will do fine. To sort out which ones you need; use a clean version of JA, see what's missing (open the console), do a condump and add the required files to your pk3.
Quote:
<font face="Verdana, Arial" size="2">Originally posted by SilentSavur:
and make sure your shaderlist has the shader you made in there.</font>

That.. actually made sense. *twitch*
2004-06-09, 7:59 AM #11
Uh...JO.

------------------
Have you ever been philosophical? It's pretty fun.
Well don't just sit there, REPLY!!!
2004-06-09, 8:36 AM #12
Same solution applies.

↑ Up to the top!