• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[General] Fade Filter bug?

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
So I am making a cinematic for the current cinematic contest.

I was using HDR as described here: Fake HDR Lighting in Warcraft 3

It seems flicker in some scenarios, and sometimes turning off completely for a few seconds before jumping back on randomly.
In some scenarios it works without issues however and I have not managed to figure out why yet.

To my knowledge, other than using another fade filter it should never be canceled, right?
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
Could you provide a code from a map where it works "perfect" so we can make a comparison?

I have to say that if you do:
Maps 1,2,3 have Z, X, C and it works
Maps 4,5,6 have Z, X, D and it does not work
You'd figure it out on your own...

PS: I was going to go "indentation ffs" and then I saw the txt in ()s ;)
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Actually, I think I just found the error.

So, I have structured my cinematic into scenes in order to test individual scenes on demand.
On init I apply the HDR filter over 6 seconds, and after 3 seconds it jumps to a scene of choice.

If that scene happens to apply a new filter it will cause bugs. (since there is still 3 seconds of fading in on the first one)

I will confirm it in a few minutes.

edit: nope, that was not it.

edit: Somehow it mostly fixed itself, so far I only have one scene where it does not work properly.
JASS:
integer counter = Scene.current.counter
if counter == 1
cam = gg_cam_Camera_011
cam.apply(0)
cam = gg_cam_Camera_012
cam.apply(15)
cinema.fadeIn(2, Filter.day) // filter is applied here
gg_snd_H06Arthas04.start()
arthas.talk("Arthas Menethil")
else if counter == 2
// Turns off somewhere between here
gg_unit_Hart_0057.walk(gg_rct_Region_019.getCenter())
gg_snd_H06Arthas06.start()
arthas.talk("Arthas Menethil")
else if counter == 3
// And here
AddSpecialEffectTarget(exclamationMark, gg_unit_Huth_0058, "overhead").timed(1)
gg_snd_H06Uther07.start()
uther.talk("Uther")

So at this point I assume it is something else happening in the background, but I got no clue of what to look for in that case.
 
Last edited:
Level 12
Joined
Mar 24, 2011
Messages
1,082
Disclaimer: I've never touched Wurst & my Jass is rusty as the Titanic. Bear with me, or should I go away? :)

Code:
cam.apply(0)
cinema.fadeIn(int, struct)
are those natives or you have written those yourself?

If it is a native, the cam.apply(0) looks the most suspicious...

Code:
gg_snd_H06Arthas04.start(void)
arthas.talk(string)
Those definitely look like data structs that you have written, and the "counter" gets incremented somewhere inside?
What happens in there? Anything interesting?
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,183
Both are written by me. Thing is, I use them in every scene - no exceptions. The other 13 scenes are working fine.

cam.apply(0) just means it gets applied over 0 seconds aka instantly.
Like in GUI
  • Camera - Apply Camera 001 <gen> for Player 1 (Red) over 0.00 seconds
Nope. gg_snd_H06Arthas04 is the sound variable generated from the sound editor
arthas is just an integer, in wurst we have extension functions. It's the same as talk(arthas)
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
What happens if you put this
Code:
cam = gg_cam_Camera_XYZ
cam.apply(0)
On where both these stand ?:
Code:
// Turns off somewhere between here
// And here
What about re-applying a filter on the same places? //Edit this actually does not make much sense... for a sec I thought that you are applying a different filter :|

PS: I am not liking the 0 here
Code:
cam.apply(0)
you never know if the dev meant it as infinite or none or instant or null if you don't open the code or API and see wtf is happening inside.
 
Last edited:
Status
Not open for further replies.
Top