Page 1 of 1
Loading screen
Posted: Fri Jan 31, 2003 8:58 pm
by Rookie One.pl
Well, I have a problem with loading screen. I have correct loading_warehouse.urc file in ui directory (my map's path is obj/warehouse) with 'whouse' texture for the photo in the middle of the screen. I have a separate shader which is called whouse.shader for this photo:
Code: Select all
whouse
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
map $whiteimage
}
{
clampMap textures/warehouse/whouse.tga
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}
And a TGA image with dimensions of 512x512. When I run the map, I can only see a white box instead of the photo. Why? Does anybody know how to make it work?
Rookie One
Posted: Fri Jan 31, 2003 9:31 pm
by Innkeeper
Alot of the time the line "blendfunc gl_one_minus_src_alpha gl_src_alpha" because your image may not have an alpha layer. Try commenting it out to see what effect it has.
Posted: Fri Jan 31, 2003 11:20 pm
by phalanx
I don't know anything about shaders, but you could try writing 'clampMap' as 'clampmap'..
Posted: Sat Feb 01, 2003 12:20 am
by Slyk
I had the same problem, here's what I did. Edit the .shader file below.......
MP_TractorWorks_DM
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
map textures/mohmenu/dmloading/MP_TractorWorks_DM.tga
}
{
clampMap textures/mohmenu/dmloading/MP_TractorWorks_DM.tga
blendfunc gl_one_minus_src_alpha gl_src_alpha
}
}
Notice that I had to put in a seconday file path. Don't know how or why, but it worked.
Posted: Sat Feb 01, 2003 3:19 am
by mohaa_rox
That's it! Another tut on its way.....
Hmm...
Posted: Sat Feb 01, 2003 4:25 pm
by Rookie One.pl
I'll try commenting out that blendfunc_something, but I don't think it will help, I thought it's caused by the lack of the alpha channel, but when I added it, the photo still wasn't visible (the alpha channel correct, I'm sure, I did in PSP: mask -> new -> show all and then mask -> save to alpha channel and then saved the file and replaced the old one with it)

But I think one of your methods will work 8)
Rookie One
Posted: Sat Feb 01, 2003 10:38 pm
by Innkeeper
Use a jpeg, its a lot eaiser. this is the shader from the snow tutorial.
Code: Select all
snow
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
clampMap textures/mohmenu/dmloading/snow.jpg
}
}
Posted: Sat Feb 01, 2003 10:42 pm
by Innkeeper
BTW the snow tutorial does not use a background, just the screen shot filling the entire screen. The loading_snow.urc looks like this.
Code: Select all
menu "dm/snow" 640 480 NONE 0
bgcolor 0 0 0 1
borderstyle NONE
bgfill 0 0 0 1
fullscreen 1
//vidmode 3
//fadein 0.5
virtualres 1
postinclude ui/loadingbar.txt
resource
Label
{
name "Default"
rect 0 0 640 480
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.50 0.50 0.50 0.00
shader "snow"
}
resource
Label
{
title "##== Snow ==##"
name "Default"
rect 72 408 496 32
fgcolor 0.00 0.00 0.00 1.00
bgcolor 0.00 0.00 0.00 0.00
borderstyle "NONE"
font facfont-20
}
resource
Label
{
title "##== Snow ==##"
name "Default"
rect 74 406 496 32
fgcolor 1.00 1.00 1.00 1.00
bgcolor 0.00 0.00 0.00 0.00
borderstyle "NONE"
font facfont-20
}
end.
Posted: Sun Feb 02, 2003 4:40 am
by mohaa_rox
A jpg file is also smaller in size and may not appear funny. Try it.

Hm?
Posted: Sun Feb 02, 2003 4:02 pm
by Rookie One.pl
I commented out 'blendfunc gl_one_minus_src_alpha gl_src_alpha' and now it works. I'm not sure about JPGs, I tried it once, but MoHAA didn't show it and in console there was message 'Can't find textures/mohmenu/objloading/whouse.jpg.tga'. I don't know why, but it stuck .tga at the end of the filename.
Rookie One
Posted: Sun Feb 02, 2003 4:08 pm
by jv_map
Never use .jpg in shaders, always use .tga. Regardless of file format

Posted: Sun Feb 02, 2003 4:17 pm
by Innkeeper
I use .jpg in shaders and have never had a problem with it. Hmmm...
Posted: Mon Feb 03, 2003 12:52 am
by mohaa_rox
Maybe it's when you name your file. Maybe you named it something.jpg. Then it was named back to something.jpg.tga. Probably you don't know what I'm talking about, just use some program like PSP, and Photoshop will do. Convert them to .jpg.
Posted: Mon Feb 03, 2003 12:35 pm
by TheStorm
Innkeeper wrote:I use .jpg in shaders and have never had a problem with it. Hmmm...
I would go for not using "jpg" in shaders!! even if it works for you! I've tried it once and it didn't work and all orginal shaders for the game says "tga" even when they are refering to "jpg" files.
I don't know if all of you know this but Mohaa is based on Ritual's Quake III technology! (?berTools for Quake III). Mohaa is very similar to a game called Fakk2. There are some extensive documentation about shaders for Fakk2, most of it applies to Mohaa too! This shader manual is at least more accurate to mohaa then any shader manual for Quake3
Read the shader manual
here
?berTools for Quake III Overview
here
More useful stuff
here (you'll find more info about tiki etc but ofcourse not all applies to Mohaa)
Posted: Mon Feb 03, 2003 2:02 pm
by Slyk
I'm telling ya, just edit this line:
map textures/mohmenu/dmloading/yourmapnamefile.tga
...from my earlier post. I had the same issues, and always use the .tga format. Fixes the issue, of course that is editing the .shader file, not the .urc.