Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: Weapon on hit effect too bright/glowy  (Read 3309 times)

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Weapon on hit effect too bright/glowy
« on: August 22, 2012, 09:16:53 AM »

So I'm making a weapon and it's associated .proj file, but I've noticed, that if I increase "length" too much it'll start affecting the effect when it hits a target by making it absurdly bright / large

Is there anyway to tone it down? Unless there's some kinda .proj override am I stuck with this flashy shock and awe?

   "specClass":"projectile",
   "spawnType":"BALLISTIC_AS_BEAM",
   "collisionClass":"RAY",
   "collisionClassByFighter":"RAY_FIGHTER",
   "length":700.0,
   "width":28.0,
   "fadeTime":0.05,
   "fringeColor":[100,100,255,255],
   "coreColor":[255,255,255,255],
   "glowColor":[100,100,255,255],
   "glowRadius":5,
   "textureType":"SMOOTH",  # only needed for BEAM spawnType
   "textureScrollSpeed":-256.0,
   "pixelsPerTexel":1.0   

Meep, that or maybe a poke in the suggestion forum for a explosion override kinda deal to bring it back to reasonable levels? :P
Logged

silentstormpt

  • Admiral
  • *****
  • Posts: 1060
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #1 on: August 22, 2012, 11:01:06 AM »

try adding this:
Code
"hitGlowRadius":50,
or maybe:
Code
"explosionRadius":500, # purely visual
« Last Edit: August 22, 2012, 11:10:44 AM by silentstormpt »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #2 on: August 22, 2012, 11:19:44 AM »

hitGlowRadius is the one you want here. explosionRadius is for missiles.
Logged

FlashFrozen

  • Admiral
  • *****
  • Posts: 988
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #3 on: August 22, 2012, 12:10:25 PM »

Ahhhhh, thanks so much, all these nice to have variables. ;D
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #4 on: September 03, 2012, 03:17:10 AM »

I'm going to post my query in here, as it is in a similar vein.

I have been working through a weapon, and as part of this weapon I want to make a large section of the ship glow (basically a large built in beam weapon).

I can make this part work great, but by doing so I 'hack' the size of the glow .png to make sure it goes where I want it to go - by adding loads of blank space.

The question is: Can I offset the position of the glow sprite, relative to whatever, to stop me making a huge mostly-empty sprite, sized at just the right size for the code to default it in to the right place?

The main problem with this is that, being a beam weapon, a visual glow appears at the fire point to cue the player that the beam is receiving a flux bonus. This glow is apparently (by default) relative to the size of the glow sprite, which ends up being huge, and I get a rather large (unwantedly large) glow. It looks a bit silly.

Could I specify how big this 'overflux' glow is, as an alternative?

EDIT:

Just some pictures to explain what I'm on about:

Spoiler




[close]

because of this distended glow file:

Spoiler
[close]
« Last Edit: September 03, 2012, 10:33:37 AM by mendonca »
Logged


"I'm doing it, I'm making them purple! No one can stop me!"

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24127
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #5 on: September 03, 2012, 10:39:37 AM »

The question is: Can I offset the position of the glow sprite, relative to whatever, to stop me making a huge mostly-empty sprite, sized at just the right size for the code to default it in to the right place?

The main problem with this is that, being a beam weapon, a visual glow appears at the fire point to cue the player that the beam is receiving a flux bonus. This glow is apparently (by default) relative to the size of the glow sprite, which ends up being huge, and I get a rather large (unwantedly large) glow. It looks a bit silly.

As a hacky workaround, you can add "convergeOnPoint":true, to the weapon (assuming it's a single beam, it shouldn't cause trouble). That'll halve the glow size - might not be enough, though.

Added "specialWeaponGlowWidth" and "specialWeaponGlowHeight" for the next release.
Logged

mendonca

  • Global Moderator
  • Admiral
  • *****
  • Posts: 1159
    • View Profile
Re: Weapon on hit effect too bright/glowy
« Reply #6 on: September 03, 2012, 11:09:36 AM »

Cool, that'll help greatly!

Thanks!
Logged


"I'm doing it, I'm making them purple! No one can stop me!"