• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Fade Filters and Images

Status
Not open for further replies.
Level 16
Joined
Mar 27, 2011
Messages
1,349
So I want to achieve an outcome and I can see two ways of doing it, however I'm not sure either method is possible. So:

1.) Can I somehow make floating text appear through a fade filter? I tried it once with no luck. Anybody know if it's possible in some way?

2.) I noticed the Image function in WC3. Can I use this to display imported images in the game? And if so, can I resize these images to somehow fit the player's screen? (Detect resolution maybe). Couldn't seem to find tutorials associated with the use of these image functions.
 
So I want to achieve an outcome and I can see two ways of doing it, however I'm not sure either method is possible. So:

1.) Can I somehow make floating text appear through a fade filter? I tried it once with no luck. Anybody know if it's possible in some way?

2.) I noticed the Image function in WC3. Can I use this to display imported images in the game? And if so, can I resize these images to somehow fit the player's screen? (Detect resolution maybe). Couldn't seem to find tutorials associated with the use of these image functions.

(1) Why not use game messages? Like in TKoK when you get a quest. All it is is a filter + game text. You can move it around as much as you like via:
JASS:
native DisplayTextToPlayer          takes player toPlayer, real x, real y, string message returns nothing
Just change x an y around. (0, 0) is the default position.

(2) Yes you can display imported images, but it only displays them on the ground. Blizzard didn't give us any functions to put images on the screen (except fade filters). You can always use a full-screen UI and modify the camera when viewing the image (to make it "look" like it is on screen), but as soon as the camera moves, the illusion is lost (obviously). That's why most of those systems will fixate the screen. See:
http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=66955

The method that systems like DGUI use is a billboarded plane with a replaceable texture. Billboarded models face the screen regardless of the direction/angle their seen at (e.g. runes). Then it uses destructables + war club to move them around, and it calculates the proper position for the camera. It is lot of math though. Shadows of Everwood did something similar too for their item display.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
So I want to achieve an outcome and I can see two ways of doing it, however I'm not sure either method is possible. So:

1.) Can I somehow make floating text appear through a fade filter? I tried it once with no luck. Anybody know if it's possible in some way?

2.) I noticed the Image function in WC3. Can I use this to display imported images in the game? And if so, can I resize these images to somehow fit the player's screen? (Detect resolution maybe). Couldn't seem to find tutorials associated with the use of these image functions.

1) IIRC you can't make "dynamic" fade filters, you can only do it via images

2) you can use fade filters for that :D. I can't remember what images are used for, but i know that they can be used for detecting unit shadows
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
(1) Why not use game messages? Like in TKoK when you get a quest. All it is is a filter + game text. You can move it around as much as you like via:

Wow, I didn't think you could move game text messages around. I thought they were stuck on the bottom left of the screen.

Could you please elaborate then? I don't know jass. Where do I insert my text? And are the x and y coordinates in pixels, % of screen (50% possibly being the centre), or are they in game coordinates. Sorry, I don't really know the proper terms. This might be useful for another part of my map.

Okay, back to topic. I actually wanted a credit style of text. E.g. At the end of a movie, the credits "roll up" the screen. This is achievable, but I wanted an image in the background. One question. Will displaying the image in game have different effects on people with different screen resolutions? What I mean is, will people with smaller screens only see half the image and bigger screens see outside of the image parameters?
 
Wow, I didn't think you could move game text messages around. I thought they were stuck on the bottom left of the screen.

Could you please elaborate then? I don't know jass. Where do I insert my text? And are the x and y coordinates in pixels, % of screen (50% possibly being the centre), or are they in game coordinates. Sorry, I don't really know the proper terms. This might be useful for another part of my map.

I don't remember the specifics, but here is an example:
JASS:
call DisplayTextToPlayer(Player(0), 2.0, 1.0, "Hello World!")

Player(0) is where you put the player argument. Players in JASS start at 0, so Player(0) refers to Player 1 (red). Player(1) refers to Player 2 (blue), and so forth. GetTriggerPlayer() refers to the triggering player, and GetOwningPlayer(GetTriggerUnit()) refers to the owner of the triggering unit. If you don't know how to make that argument in JASS, just assign a player variable and then use udg_<Name> instead.

The x and y.. those are coordinates on screen. I don't remember the extents though. If I recall correctly, it is from 0 to about 2. I don't quite remember whether you can have negatives.

The "Hello World" is just the text to display. It must be enclosed in quotes.

Okay, back to topic. I actually wanted a credit style of text. E.g. At the end of a movie, the credits "roll up" the screen. This is achievable, but I wanted an image in the background. One question. Will displaying the image in game have different effects on people with different screen resolutions? What I mean is, will people with smaller screens only see half the image and bigger screens see outside of the image parameters?

Ah I see. Resolution, AFAIK, shouldn't have an impact on that. The field of view should remain the same. As long as your picture fills up the screen on one computer, it should fill up the screen on another. Text may change with resolution though.

In your case, images would be perfect. Just follow that tutorial I linked (giving it an invisible border). Texttags can appear above those images.

If you have any issues implementing it, just let me know.
 
Status
Not open for further replies.
Top