Author Topic: Burn effect issue(SOLVED)  (Read 931 times)

0 Members and 1 Guest are viewing this topic.

Zombie

  • Guest
Burn effect issue(SOLVED)
« on: October 05, 2014, 09:46:57 AM »
SOLVED

As usual as soon as I posted this I remembered about $XYZ.setShaderParm( 7, sys.getTime() );

That solved my issue!

Hey guys,

I've been playing around with a teleport type effect.

The problem I am having is that unless I trigger the material almost instantly, it doesn't work, something to do with the time in the material, but I don't understand how to use it correctly. If I don't use time it doesn't work properly.

this is what it looks look after a 3 second delay from spawning in the level

this is what it looks like if I trigger it manually or wait too long

this is my material

Code: [Select]
textures/wicky02/player_body
{
{ // burning corpse effect
if ( parm7 == 1) // only when dead

// make a burned away alpha test for the normal skin
blend gl_zero, gl_one // don't draw anything

map  textures/wicky02/intro/body_burn.tga // replace this with a monster-specific texture
alphaTest 0.1 + 0.1 * (time * 1)

}
{ // burning corpse effect
if ( parm7 == 1) // only when dead

// draw the fire burn at a negative polygonOffset, so it is behind the other stages
privatePolygonOffset -1 // stage-only polygon offset
        blend add
        blend gl_one, gl_zero

map  textures/wicky02/intro/body_burn.tga // replace this with a monster-specific texture
alphaTest 0.1 * (time * 1)
}
diffusemap   models/characters/player/body.tga
specularmap models/characters/player/body_s.tga
{
blend bumpmap
map  addnormals(models/characters/player/body_local.tga, heightmap(models/characters/player/body_h.tga, 5 ) )
      }
}

I tried searching in all the script files, but don't know how to fix this.

I trigger the static_mesh using a target_setshader and it works for other objects that aren't use a burn effect.

Thanks for any help anyone can offer.
« Last Edit: October 05, 2014, 10:21:10 AM by Zombie »

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 914
  • Karma: +43/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Burn effect issue(SOLVED)
« Reply #1 on: October 05, 2014, 12:58:49 PM »
I forget exactly where and what (I have the code on my machine somewhere) but there is a glitch with stock D3 and particle/fade times.  It's fixed in D3XP.  I'll look it up tonight/in the morning.  It was how I got my flamethrower to work properly. 

Zombie

  • Guest
Re: Burn effect issue(SOLVED)
« Reply #2 on: October 05, 2014, 01:35:44 PM »
I forget exactly where and what (I have the code on my machine somewhere) but there is a glitch with stock D3 and particle/fade times.  It's fixed in D3XP.  I'll look it up tonight/in the morning.  It was how I got my flamethrower to work properly.

Yeah I know about those issues, delays and durations are kind of broken in the fx files. Fade times work perfectly though for me.

But my issue wasn't with particles.