Page 2 of 3

Posted: Sun Mar 09, 2003 3:09 pm
by EvilEdge
THANK YOU SO MUCH!! YOU ARE A GENIUS!! i got it to work

Posted: Thu Mar 13, 2003 7:02 am
by TheStorm
I can contribute with something else, if you want several pictures shown while loading the map you can make different shader. The below one will animate four pictures (jpg's). It will show each picture for one second.

thestormsloading //This shader are for jpg pictures
{
nomipmaps
nopicmip
cull none
force32bit
surfaceparm nolightmap
{
AnimMap 1 textures/mohmenu/dmloading/thestormload1.tga textures/mohmenu/dmloading/thestormload2.tga textures/mohmenu/dmloading/thestormload3.tga textures/mohmenu/dmloading/thestormload4.tga
}
}

(you should still use "tga" in the shader even if it's for jpg's)

AnimMap can be explained like this:

animMap <frequency> <texture1>.......<textureX>

Frequency: The number of times that the animation cycle will repeat within a one-second-time period. The larger the value, the more repeats within a second. Animations that should last for more than a second need to be expressed in fractional values

Texture1-x: The texturepath/texturename for each animation frame must be explicitly listed. Each frame is displayed for an equal subdivision of the frequency value. I don't know the limit of pictures for this, I have used up to 23 without problem.

I think it's best to use jpg's if you have several picture, they have less size then tga. The above will work with tga to but you have to add the blendfunction and stuff.

Ofcourse you can use this ingame too! to create animations.

Posted: Thu Mar 13, 2003 7:17 am
by 7th Es Cyborg
cool - i like the ingame idea - what texture do you use then for the start of the animation loop on the brush?

Posted: Thu Mar 13, 2003 12:08 pm
by TheStorm
Hmm?? Depends on what name you give it in the shader. It's no different from other textures in mohradiant. You will find it in the texture menu and apply it to a brush side. But ingame it will animate between the pictures you have set up in the shader and at the speed you have set.

You can have a separate image for it in mohradiant!

Example

textures/custom/A_thestorm // This texture will be located in the folder "custom" under textures, the name will be A_thestorm
{
nomipmaps
nopicmip
cull none
force32bit
qer_editorimage textures/hud/Sparks0000.tga // This will be the picture that are show for it in mohradiant
surfaceparm nolightmap
{
animMap 48 textures/hud/Sparks0000.tga textures/hud/Sparks0001.tga textures/hud/Sparks0002.tga textures/hud/Sparks0003.tga textures/hud/Sparks0004.tga textures/hud/Sparks0005.tga textures/hud/Sparks0006.tga textures/hud/Sparks0007.tga textures/hud/Sparks0008.tga textures/hud/Sparks0009.tga textures/hud/Sparks0010.tga textures/hud/Sparks0011.tga textures/hud/Sparks0012.tga textures/hud/Sparks0013.tga textures/hud/Sparks0014.tga textures/hud/Sparks0015.tga textures/hud/Sparks0016.tga textures/hud/Sparks0017.tga textures/hud/Sparks0018.tga textures/hud/Sparks0019.tga textures/hud/Sparks0020.tga textures/hud/Sparks0021.tga textures/hud/Sparks0022.tga textures/hud/Sparks0023.tga // These are the textures that will be animated in game

rgbgen global
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
}
}

Basically you should be able to copy this from the post, paste it in notpad and save it as a shader in the script folder. Then put it on a brush, compile and look at it in game. The sparks textures came with the game (spearhead I think) so try the map in spearhead. I can post a link to a working example when I get home from work.

Posted: Wed Oct 01, 2003 4:48 pm
by Virus
Why dont you guys use the urc editor? .. its visual and you can place stuff where you want by clicking and dragging?

Posted: Thu Oct 09, 2003 7:02 pm
by Voltaire
Where do you find the urc editor?

Voltaire

Posted: Sun Apr 18, 2004 8:08 pm
by Cobra {sfx}
I made some new screens for a stock map for a mod i made - they load up fine on my network yet serverside ya dont see em ... any ideas?

Cobra

Posted: Sun Apr 18, 2004 10:11 pm
by M&M
well,i can test it 4 u on my lan if the file is less than 4 mbs

Posted: Sun Apr 18, 2004 11:45 pm
by Cobra {sfx}
Doh! ive since removed em and continued upgrading the mod so ill need to start again with the pics/screen info shots.

file is around 1 meg, ill get the shots and be in touch m8 thanks for the offer.

Cobra

ps added ya on msn

Posted: Thu May 13, 2004 8:01 am
by unmonitrd
Amazingly I can get the main loading screen pic to work, but can't get the corner scoreboardpic to work.

I've tried several times as both a .tga, .tga with alpha, .jpg, and I've tried different sizes & picture qualities. I'd like to use the same 512x512 pic that is showing on my loading screen. I thought the scoreboardpic was supposed to be the easy part...not requiring shader work or anything.

I have placed the pic in

Code: Select all

textures/mohmenu/dmloading
and in the script I have

Code: Select all

setcvar "g_scoreboardpic" "scorepic"
but in tinkering around I also tried

Code: Select all

setcvar "g_scoreboardpic" "scorepic.tga"
and

Code: Select all

setcvar "g_scoreboardpic" "scorepic.jpg"
depending on what format I made the file.

now I did the work in the .shader & ui to get this to show up in the load screen. Can anyone think of a reason why it would keep from using the pic in the scoreboard?

any help -- much appreciated,
-Unm

name

Posted: Thu May 13, 2004 11:16 am
by tltrude
It only needs the name without the extention. And, no path is needed as long as the image is in the dmloading folder.

setcvar "g_scoreboardpic" "scorepic"

I have never been able to use a jpg for it, but you can use your loading screen tga image. However, the alpha channel of that image might make it look tranparent, depending on how dark it is. The original game scoreboard images are in pak1.pk3, if you want to compare yours to them.

Also, scoreboard pictures are strange because they don't always show up the first time you hit tab. It might help to precache the image in your map's precache script.

cache textures/mohmenu/dmloading/scorepic.tga

Posted: Thu May 13, 2004 12:35 pm
by unmonitrd
Thanks. I'll try comparing to the other scoreboard pics, but I caught this advice in your previous posts & I'm sure I'm just screwing something up along the line here -- maybe if I step away & come back to try the whole thing from scratch.

As long as I've got you here though I figured I'd pass something along. This is my 8th post on this forum, but between you jv, scorpio midget, deadeye arrow, balr, bjarne, jackal and countless others on this forum - I've read thousands of your posts & your ideas (or variations on them) are staples in my maps now. I guess the reason I've posted in the single digits is because between the tuts & your responses, there's very few questions that a search couldn't answer...you guys cover it all it seems! (which is also why I'm pretty sure I'm just doing something wrong in the process here.) I'm a big fan & I would never be as into scripting & mapping without your guidance. I'm sure there's a whole mess of people that I can't remember, but you guys have been a great help.

Thanks
-Unm

Posted: Thu May 13, 2004 4:40 pm
by blue60007
Try making a simple shader for the picture, I think that might help.

I concur, .map is great! :)

shader

Posted: Thu May 13, 2004 5:28 pm
by tltrude
Good point blue60007, if you're going to use "scorepic" it needs a shader. It can be in the same shader file as the loading screen shader.

Posted: Thu May 13, 2004 5:33 pm
by unmonitrd
blue60007 wrote:Try making a simple shader for the picture, I think that might help.
I figured it out on my own but I think u hit it right on the head! To use 2 different pictures I needed to make 2 shaders in the mapname.shader file in the scripts directory. I'm not real familiar with the terminology for load screens (I do mostly scripting), but that's what you're talking about right?

In case anyone else runs into the same problem, here's the contents of the 2 shaders in my .shader in the scripts folder.

Code: Select all

load_screen
{
   nomipmaps
   nopicmip
   cull none
   force32bit
   surfaceparm nolightmap
   {
	map $whiteimage
   }
   {
     clampMap textures/mohmenu/dmloading/load_screen.tga
     blendfunc gl_one_minus_src_alpha gl_src_alpha
   }
}

scoreboard_screen
{
   nomipmaps
   nopicmip
   cull none
   force32bit
   surfaceparm nolightmap
   {
	map $whiteimage
   }
   {
     clampMap textures/mohmenu/dmloading/scoreboard_screen.tga
     blendfunc gl_one_minus_src_alpha gl_src_alpha
   }
}
Thanks again, couldn't have done it without .map!!!
-Unm