Loading screen

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Loading screen

Post 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
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

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

Post by phalanx »

I don't know anything about shaders, but you could try writing 'clampMap' as 'clampmap'..
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

Post 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.
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

That's it! Another tut on its way.....
Live to map, not map to live.
-mohaa_rox, .map
moderator
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Hmm...

Post 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
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post 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
   }
}
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post 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.
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

A jpg file is also smaller in size and may not appear funny. Try it. :wink:
Live to map, not map to live.
-mohaa_rox, .map
moderator
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Hm?

Post 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
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Never use .jpg in shaders, always use .tga. Regardless of file format :?
Image
Innkeeper
Colonel
Posts: 475
Joined: Mon Nov 25, 2002 10:13 pm
Location: NC, USA (about 7.5 klicks from the capital dome)
Contact:

Post by Innkeeper »

I use .jpg in shaders and have never had a problem with it. Hmmm...
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post 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.
Live to map, not map to live.
-mohaa_rox, .map
moderator
TheStorm
Captain
Posts: 233
Joined: Mon Oct 07, 2002 7:45 am
Location: Gavle, Sweden
Contact:

Post 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)
TMT admin, visit www.modtheater.com
HITP Lead Mapper
Member of Electronic Arts MOHteam
Slyk
Lieutenant Colonel
Posts: 361
Joined: Sun Jul 14, 2002 12:42 am
Location: Elizabethtown, PA

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