Aller au contenu

Photo

Scripting Visual Camera Effects


  • Veuillez vous connecter pour rĂ©pondre
10 réponses à ce sujet

#1
Bibdy

Bibdy
  • Members
  • 1 455 messages
I'd like to make a trigger which spawns some demony bad-guys on top of the player, but I'd like there to be a fade-effect during the fight (which dissipates at the end), or at the very least a screen-flash so that it isn't blatantly obvious that these creatures appear out of nowhere.

What's the command to script in a visual effect which applies to the camera?

I can't think of any in-game examples which change it on the fly to reverse-engineer myself. I'm pretty sure all Fade effects in the game are attached in the Level's buffer effects, or are used in cutscenes.

As a last-resort I could probably use a cutscene to do the transition and do a screen-flash that way, but I want it to be a quick "What the hell, ARGH!" moment.

#2
Toryss

Toryss
  • Members
  • 41 messages
You could also make a smokescreen type visual effect that will cover your enemy as he spawns.

#3
Bibdy

Bibdy
  • Members
  • 1 455 messages
Well, I can make the Fade beasts pop out of the ground. That's not too difficult. I'd just like there to be a sudden effect on the screen when the player walks over a trigger.



Going through various scripts, it doesn't seem to be possible at the moment. Only camera effect I've found so far is a screen shake.

#4
Bibdy

Bibdy
  • Members
  • 1 455 messages
Well I did find the SetFogConditionsCustom command, which lets me ramp up the fog density and cap to make it kind of spooky, but still, a quick screen flash would be awesome.

#5
Craig Graff

Craig Graff
  • Members
  • 608 messages
You can also play with any of the frame buffer effects which are attached to the area's layout. da_HSVMatrix and da_bloom are standard in all areas of the main campaign, but there is also da_fade and some others which are accessible through FB_SetEffectResource and FB_SetEffectEnabled. Look at pre100_atmosphere_h.nss for context.

#6
Bibdy

Bibdy
  • Members
  • 1 455 messages
Ooh neato. Thanks for the tip.

#7
Bibdy

Bibdy
  • Members
  • 1 455 messages
Hahar! Thanks, Craig. Those settings worked like a charm.



For those that are curious, there's essentially 2 ways to manipulate the fade-effect in-game, either by changing the blur strength (0 being no blur, -3.5 being the blur you typically see - using FB_SetEffectResource), or by enabling/disabling the thing entirely (using FB_SetEffectEnabled to TRUE/FALSE), but both require the da_fade buffer effect to be enabled in the level to begin with.



Fortunately, in my case, I'm making my own levels so I have that power :)



Still looking for a bright flash effect for a transition, though. Things look kind of weird with all this fire and fade effect immediately appearing.



I could probably manipulate the Bloom effect to pull it off using a similar command as above, but I'd need a way to make it slowly transition over a full second, rather than immediately blind the guy then disappear.

#8
Craig Graff

Craig Graff
  • Members
  • 608 messages
I'd suggest mostly manipulating the da_HSVMatrix, actually. Unfortunately, quickly repeated calls of FB_SetEffectEnabled can be a bit performance heavy, but you could try and see what your results are.

Otherwise, I'd suggest trying things like initially lowering the ATM_PARAM_FB_HSV_SATURATION value and raising the ATM_PARAM_FB_HSV_CONTRAST. Then transition the fog color quickly to a dense bright color using something like ATM_Fade (either add in the appropriate 2da lines or just modify the function to accept arrays of custom parameters). Do another round of FB_SetEffectEnabled with different values (possibly playing with the bloom at bit more), then transition into your final fog color a little bit more slowly and do a final round of FB_SetEffectEnabled about halfway through the final fog transition. Play with the values at the various stages to see what works for you.

#9
Bibdy

Bibdy
  • Members
  • 1 455 messages
Argh, too many buffer effects! Is it possible to enable a buffer effect without it being attached to the level? I honestly didn't try.



At the moment I have 3 attached to my level: da_bloom, da_fade and I'm messing around with da_dof (depth of field) to try and make a cool looking, blurred distant vista like your Austin folks used in ME2.



I guess I can replace da_bloom with da_hsvmatrix and mess with it that way.

#10
Bibdy

Bibdy
  • Members
  • 1 455 messages
So yeah, it has to be a part of the level's 3 main buffer effects in order to be editted via script. Guess I can skip on the da_dof. It looks kinda weird, anyway.

#11
FergusM

FergusM
  • Members
  • 460 messages
I'm having a little difficulty with this. I looked at the prelude script and the constants used seemed to just be straight up "da_hsvmatrix" and so on. So I tried this:

FB_SetEffectResource("da_fade","BlurStrength",100.0);

but I'm not seeing any change in-game.

EDIT: Nevermind! I forgot I was calling it in a preloadexit event; too early to be seen. Switching it to postloadexit fixed it.

Modifié par FergusM, 06 mars 2010 - 01:04 .