Halomods Community Portal: Ifafudafi writes about his mod work - Halomods Community Portal

Jump to content

  • 11 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Ifafudafi writes about his mod work

Updates and features on making effects for SPv3

#1 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 26 July 2011 - 06:45 AM

What I'll do for the forseeable furture is post new entires as new replies and link the individual posts here in the OP. Feel free to comment and ask questions.

12/17 (wow it's been a while)
EMP Grenade

6/30
New Explosions

5/17
Gauss Warthog

3/24
New Material Effects


2011 entries:

This post has been edited by Ifafudafi: 17 December 2012 - 11:17 PM


#2 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 26 July 2011 - 09:12 PM

While the bulk of my work does involve .effects, .particles, .decals, and other things that make great particle effects, my job as the VFX artist also includes working with just about everything you can see in the game oustide of modeling, mapping, and texturing. The most noticeable among these are the shield effects; I'll talk about the cyborgs and elites later, but right now I want to get into a neat bit of trickery that has a greater impact on gameplay: The jackal shields.

Posted Image

Vanilla HCE only uses one color for its jackal shields, but for SPv3, we want to denote different jackal ranks (i.e. minor, major, and ultra) with different shield colors (blue, orange, and white.) The most obvious way to do this would be to have completely different models with completely different shield shaders for each rank, but .gbxmodel tags are absolutely HUGE when it comes to filesize; since SPv3 has so much content added in, we cannot accomodate even one duplicate .gbxmodel, much less two, so the job fell on me to try and work out a way to color the shields differently without duplicating massive tags.

The other complication was that the CMT jackal shields are scripted to flash red when damaged, but this served as an inspiration. The shield flash was controlled by switching out layers of .shader_transparent_chicago_extended tags based on functions defined in the .biped. If there were some way to script the functions to change the persistent visibilty of shields, I could use them to control the various colors that appear - but each .biped only allows me to make four functions, and because .shaders are controlled through the model, I have to assign different functions for every shield variant, meaning I have to find a way to preserve the red flash in a single function. After some work, I managed to figure this out - and here's how:

First, since .shaders are assinged through the model (which I can't duplicate), I need to figure out a way to link multiple different shaders to one tag. I decided to build off what had already been done with the red flash and attach yellow and white shaders as extra layers to the basic jackal shield.shader_transparent_chicago_extended tag:

Posted Image

I then make duplicate .bipeds for each rank variant (.bipeds are SO MUCH smaller than .gbxmodels.) In each biped, I assign these input values:

Posted Image

"Recent shield damage" turns on when the shield is hit (for the red flash), "shield stun" turns on if the shield is depleted, and "alive" is on as long as the jackal is alive.

These are the same across all .bipeds; what changes are the functions:

Posted Image

Each .biped's B out, C out, and D out correspond to blue color, yellow color, and white color respectively. The function that controls the color does this:

-If the shield has been recently damaged, pass on a value of 1; otherwise, 0.
-If the shield is off, add a value of 1; otherwise, add nothing.
-If the jackal is alive, multiply the above by 1; otherwise, multiply by 0.
-Invert the result (1 becomes 0, 0 becomes 1.)

If the final value is 1, this shield color draws; if it's 0, it does not. If the jackal's shield is not being shot, its shield is on, and the jackal is alive, the function passes on 0, adds 0 (still 0), multiplies by 1 (still 0), and inverts (now 1.) The value is 1, so the shield will draw.

If the jackal is alive but the shield has been depleted, it will pass on 0 (not being shot), add 1 (now 1), multiply by 1 (1), and invert (now 0). The shield will not draw. If the jackal is not alive, the eventual value will be multiplied by 0, which will always result in the shield not drawing.

To change the colors, I simply "deactivate" all but the desired color function by setting the bounds to 0 and 0 (meaning the function cannot output a value above 0, keeping the color invisible) and the square wave threshold to 1 (snapping all values below 1 to 0, just in case.)

Posted Image

That's the hard part done - now that it looks good, I can add an extra touch: I give the shields small dynamic lights that correspond to their different colors. I can change the functions these are assinged to in the .biped tag itself, making things much easier.

Posted Image

Each .biped also has a second red light which flashes using the same flash function as the shield color. The red light adds a lens flare to emphasize the damage that's being done; have a look at the difference:

Posted Image Posted Image

And with that, we have sexy jackal shields in three color variants. The downside is that the depletion particle effect has to use the same color (since I haven't figured out a way to tie the depletion effect to the shield color, although I'm trying my hardest), but that's a small concession to make.

Hope you guys learned something or just enjoyed the pretty lights. I'll alternate between making more in-depth process analyses like this and just posting minor updates every now and then, but only here on Halomods, so make sure to check back regularly.

This post has been edited by Ifafudafi: 03 August 2011 - 09:55 PM


#3 User is offline   Wholfe 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 17-May 11

Posted 26 July 2011 - 09:18 PM

amazing.

i love how cmt is going about this new project <3 and i definitely learned alot from this.
cant wait for more!

#4 User is offline   Deliman 

  • Member
  • PipPip
  • Group: Members
  • Joined: 08-July 11
  • Locationa cage in yo mammas bedroom

Posted 26 July 2011 - 09:30 PM

I must say, I DO enjoy those pretty lights XD

#5 User is offline   Masterz1337 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 23-May 11

Posted 26 July 2011 - 09:40 PM

Once the jackals are skinned and given normal maps it will look even better as the light will leave shadows across their bodies. :)

#6 User is offline   Smythe 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 26-July 11

Posted 26 July 2011 - 11:53 PM

View PostMasterz1337, on 26 July 2011 - 09:40 PM, said:

Once the jackals are skinned and given normal maps it will look even better as the light will leave shadows across their bodies. :)

Very very nice :D

#7 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 30 July 2011 - 08:15 PM

A smaller update today, more of a look-at-this and less of an in-depth analysis - I've got a short vid detailing the latest iteration of the Brute Shot particles. Sorry about the out-of-sync audio (fuck Fraps) and sorry about the fact that I can't speak clearly (this is why I write scripts for the vidocs), but it shouldn't interfere with your enjoyment, and if it does, you can always mute the audio.

You'll probably want to open it on YT so you can up the res and make out the finer details.



#8 User is offline   D4rfnader 

  • Member
  • PipPip
  • Group: Members
  • Joined: 27-July 11

Posted 30 July 2011 - 08:40 PM

Cool, it looks kind of like the impact's explosion particle's disappearance happens too quickly though.

#9 User is offline   Smythe 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 26-July 11

Posted 31 July 2011 - 01:56 AM

Are you going to have a different sound for the secondary fire and explosion?
Also, the muzzle flash for the secondary fire kinda loses the idea of Heavy and Mechanical until the last frame of the flash, it looks too round and controlled at the start, maybe by adding in some noise or uneven distribution to the first part of the effect you can give that feel of
"Yeah, it's better technology, but the gun is still not efficient enough to create something that controlled."

#10 User is offline   MythicUltra 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 28-July 11

Posted 31 July 2011 - 02:59 AM

View PostD4rfnader, on 30 July 2011 - 08:40 PM, said:

Cool, it looks kind of like the impact's explosion particle's disappearance happens too quickly though.


Yeah I concur. Even though the Brute shot explosions aren't as powerful as frag or plasma grenades, they should last slightly longer -- but probably shouldn't last as long as the old explosion if we could find a compromise between your intent and the audience's preference. You might add more sparks thrown out and blue/yellow hued-tinted chemical "swirl" effects like the concussion rifle's red/orange/purple(?) explosions.

Also, I hope you can give the fuel rod gun a complete makeover.

This post has been edited by MythicUltra: 31 July 2011 - 03:01 AM


#11 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 31 July 2011 - 07:20 AM

View PostSmythe, on 31 July 2011 - 01:56 AM, said:

Are you going to have a different sound for the secondary fire and explosion?
Of course.
Also, the muzzle flash for the secondary fire kinda loses the idea of Heavy and Mechanical until the last frame of the flash, it looks too round and controlled at the start, maybe by adding in some noise or uneven distribution to the first part of the effect you can give that feel of
"Yeah, it's better technology, but the gun is still not efficient enough to create something that controlled."
Part of it might be the speed at which the electric bolts disappear, as those are supposed to indicate a lack of control; I'll probably have those last a little longer.



View PostMythicUltra, on 31 July 2011 - 02:59 AM, said:

Yeah I concur. Even though the Brute shot explosions aren't as powerful as frag or plasma grenades, they should last slightly longer -- but probably shouldn't last as long as the old explosion if we could find a compromise between your intent and the audience's preference. You might add more sparks thrown out and blue/yellow hued-tinted chemical "swirl" effects like the concussion rifle's red/orange/purple(?) explosions.
I've gotten comments on the flash's length from a lot of people and after watching the vid a few extra times I'm inclined to agree. I've already started working on it, but it's a very narrow sweet spot to hit and in this case I'd rather have it be a little too quick than overshoot on the length, as that'd make the explosion seem even weaker.

Also, I hope you can give the fuel rod gun a complete makeover.
In due time.


I'd also like to remind everyone that absolutely all the videos/articles/pics/etc. in this forum and this thread are tentative glimpses of works deep in progress and are not necessarily representative of the final product; everything is always being tweaked, improved, and added to. I can already name a dozen significant additions and changes we've made since announcement (but I won't 'cause that'd ruin it.)

#12 User is offline   Smythe 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 26-July 11

Posted 31 July 2011 - 08:33 AM

Quote

Also, the muzzle flash for the secondary fire kinda loses the idea of Heavy and Mechanical until the last frame of the flash, it looks too round and controlled at the start, maybe by adding in some noise or uneven distribution to the first part of the effect you can give that feel of
"Yeah, it's better technology, but the gun is still not efficient enough to create something that controlled."
Part of it might be the speed at which the electric bolts disappear, as those are supposed to indicate a lack of control; I'll probably have those last a little longer.
I agree that this is part of it, but the first few frames of the muzzle flash are too round to be uncontrolled, it should be more of a "Boomphz" than a "Pzahw" if that makes any sense at all.

This post has been edited by Smythe: 31 July 2011 - 08:33 AM


#13 User is offline   Boba 

  • im a blonde anime girl
  • PipPip
  • Group: CMT Person
  • Joined: 05-May 11
  • LocationArkansas

Posted 01 August 2011 - 07:30 AM

You're a miracle worker with these particles. I still can't get over how good they look.

#14 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 03 August 2011 - 09:32 PM

Another show-off vid, this time highlighting a few new sounds.

This is more about the audio but if you want a closer look you'll probably want to open it up on YT.



#15 User is offline   Faceman2000 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Joined: 01-August 11

Posted 03 August 2011 - 10:36 PM

Out of curiousity, does the Brute Shot's secondary fire render grenades unusable, similiar to the BRG?

Loving the new sounds, by the way. Small details like that really go a long way when it comes to increasing the enjoyability of a level.

This post has been edited by Faceman2000: 04 August 2011 - 03:42 PM


#16 User is offline   Masterz1337 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 23-May 11

Posted 03 August 2011 - 11:35 PM

Nope, it's gained by having the fire button held. We're trying to implement secondary fire modes into most of the weapon's where we have an option to do it.

#17 User is offline   Echo77 

  • Member
  • PipPip
  • Group: Members
  • Joined: 26-July 11
  • LocationInstallation 04

Posted 06 August 2011 - 06:26 AM

View PostMasterz1337, on 03 August 2011 - 11:35 PM, said:

Nope, it's gained by having the fire button held. We're trying to implement secondary fire modes into most of the weapon's where we have an option to do it.


I like the sound of that. What other weapons will have alternate fire modes?

#18 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 06 August 2011 - 04:53 PM

View PostEcho77, on 06 August 2011 - 06:26 AM, said:

I like the sound of that. What other weapons will have alternate fire modes?


That's super-secret; all I can tell you is that there are quite a few additions you probably aren't expecting.

#19 User is offline   Corvette19 

  • Member
  • PipPip
  • Group: Members
  • Joined: 08-May 11

Posted 06 August 2011 - 10:47 PM

This is going to be so awesome. I only wish I could play this on console, I just get into it so much more.

#20 User is offline   Ifafudafi 

  • Advanced Member
  • PipPipPip
  • Group: CMT Person
  • Joined: 05-May 11

Posted 07 August 2011 - 08:12 AM

NOTHING DISPLAYED, EXPLAINED, OR OTHERWISE MENTIONED IN THIS POST IS NECESSARILY REPRESENTATIVE OF CONTENT INCLUDED IN THE FINAL PRODUCT.

A couple of you might remember that the first vidoc I made when I was working on ASCM was about the blood effects. Curiously, blood particles and behavior always seem to be the first things I touch in a game, whether it's improving what's there or adding in something new - take from that what you will (the tendency is probably a major reason why I began to specialize in VFX), but suffice it to say that I've given the violence some extra attention for SPv3.



I'm not done working with the particles yet; I'm wanting to get some more new sprites to replace the stock ones and I haven't tweaked and polished everything to the fullest extent, but I do have the basic behavior in place.

The effect is divided into three major components: The small jet, the liquid squirts, and the fine mist. The jet appears immediately and expands a slight bit; the squirts and a mist cloud spray out in the same direction. The squirts spread out and continue to travel until they hit a solid surface (select particles will create small blood decals), while the mist quickly grows, blurs, and fades into the air. Here's 4 pics demonstrating that in practice (fucking imageshack dicks up animated .gifs):

Spoiler


That's all relatively unchanged from ASCM, save for a few improvements here and there. What's new is the way I've set up projectiles to interact with living targets: Each weapon's .projectile has a certain chance to overpenetrate a target, depending on the projectile's composition, size, and strength. This is done by giving each projectile's potential result unique skip fraction.

Posted Image

For instance, a Plasma Pistol projectile has a skip fraction of 0.8, meaning it only has a 1/5 chance to penetrate a target; a Battle Rifle shot, on the other hand, has a skip fraction of 0.325, giving it about a 2/3 chance to penetrate an enemy. Needler and Spiker shots, since they attach themselves to enemies, will never penetrate.

If the projectile does not pass the skip fraction, the blood effect is smaller; a single blood decal is created below the enemy and the particles only emit from the reflection marker:

Posted Image

Whereas if a projectile penetrates a target, the overall effect is larger, a second decal is placed at the negative incident marker, and two sets of particles draw; one at the reflection marker, and one at the negative incident marker:



For those unfamiliar with the markers - "reflection" and "negative incident" denote different directions a particle's velocity can be oriented relative to the point where the .effect is spawned. I've made simple diagrams to demonstrate this: the green line indicates the projectile's direction before impact, while the red line indicates the direction represented by the marker.

At the reflection marker, the emitted particle's direction is, aptly, the reflection of the projectile's velocity along the impacted surface; if it comes in at 30º, it'll go out at 30º in the opposite direction.

Posted Image

At the negative incident marker, the particle will continue in the exact same direction as the projectile.

Posted Image

The other marker I use is "gravity;" I don't have a diagram, but it simply spawns an effect in the direction of gravity, i.e. down. That's where I place the blood decal for all impacts.

Anyway, you can observe the penetration properties first-hand by comparing the number of bullets fired to the decals made. Have a look here:

(NOT NECESSARILY REPRESENTATIVE OF ACTUAL GAMEPLAY BALANCE)

12 Assault Rifle shots were fired into this unshielded Elite.

Posted Image

About 7 decals were created, lining nicely up along with the AR bullet's penetration skip fraction of 0.4 (3/5 chance to penetrate).

42 SMG shots were fired into this Brute.

Posted Image

Only about 4 decals (one on right, two on left, one below) were created, fitting in with the SMG bullet's skip fraction of 0.9 (1/10 chance to penetrate).

7 Carbine shots were fired into this unshielded Cyborg.

Posted Image

About 5 decals were created, which slots neatly into the projectile's skip fraction of 0.2 (4/5 chance to penetrate).


There are a couple of other things in other places; there're new AOE effect for melee, splatter, grenade, etc. (this means no Elite bloodfountains; sorry, kids), and the Sniper Rifle has some unique effects (ASCM vets will remember), but that covers the bulk of the system. Once again, I hope you guys learned from and/or enjoyed reading the post. Tell other people about it; the more interest there is in the thread, the more comfortable I'll be with making larger and more in-depth posts!

Share this topic:


  • 11 Pages +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users