Search Unity

Realistic effects pack [Asset Store]

Discussion in 'Assets and Asset Store' started by kripto289, Apr 1, 2014.

  1. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Attached are 3 patch files for:
    1. ignoring some colliders in ProjectileCollisionBehaviour-based effects (Icicles)
    2. following ground and better step/wall behaviour in MoveOnGround-based effects (IceSpikes)
    3. both
     

    Attached Files:

  2. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Um, there isn't a ProjectileCollisionBehaviour in IceSpikes. Did you mean that I should make that change and add one? I would expect it and MoveOnGround would fight over transform.position in that case. I could see much of the code from PCB would be needed in something that does what I need (if using with rays rather than Colliders).

    I've probably mis-understood / missed something. Sorry.
     
  3. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Resolved my IceSpikes hitting needs (I believe). I'll outline the approach. Feel free to contact me for more.

    Created an IceSpikesCollisionHelper that does Physics.RaycastAll() from a calculated position based on Minimum of Spikes' ParticleSystem's startLifetime & the GO's lifetime multiplied by the EffectSettings.MoveSpeed. This feeds callback to new callback in this ISCH Component which I specifically register for this type of weapon. I do this each frame since I want players that run onto the spikes after they're there to be damaged.

    Seems good so far (integration tested). Only limitation is that probably needs improving for the homing behaviour (i.e. my initial approach uses simple position extrapolation which will break if it turns corners -- the ray is swept over the outside of the turn!).

    HTH
     
  4. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Oh, also created a MeteorHelper that moves the effect down to the floor if it hits a player (or non-floor object) since it looks wrong to have the cool flaming crater effect atop a player's head ... then floating in mid-air after they move!

    Again, contact for more.
     
    hopeful likes this.
  5. root8888

    root8888

    Joined:
    Jul 25, 2013
    Posts:
    26
    Has anyone tried using these assets in Unity 5 beta? When I try to build for WebGL, I'm getting the error:

    Assets/Realistic Effects Pack/Scripts/Share/LiquidMatAnimation.cs(10,11): error CS0246: The type or namespace name `ProceduralMaterial' could not be found. Are you missing a using directive or an assembly reference?
     
  6. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    In the latest patch I stopped using procedural materials and only use animated textures. Update the pack to the latest version.
     
  7. TDH_DrThirteen

    TDH_DrThirteen

    Joined:
    Jul 3, 2014
    Posts:
    42
    I have a problem with object pooling.
    After I used an effect once and then reuse it, the particle system creates two shots.
    So it is still one gameobject but it looks like two cause two shots are created by the particle system.

    Any idea how I can avoid that?
     
  8. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    What is the name of the effect?
    Try increasing the "deactivateTimeDelay".
     
  9. DocLogic

    DocLogic

    Joined:
    Jan 15, 2013
    Posts:
    69
    Hey, hoping to buy this sweet looking asset.

    This was mentioned in one of the reviews:

    "The more major issue for me is that you can't parent the effects once you've instantiated them. The scripts look for transform.root to get some some information from a script. So, if you want the effect to move with some other object, it can't happen automatically simply by parenting the effect."

    Has this been fixed yet?
     
  10. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Yes, I fix this problem.
     
    DocLogic likes this.
  11. DocLogic

    DocLogic

    Joined:
    Jan 15, 2013
    Posts:
    69
    Thank you, sold!
     
  12. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
  13. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,882
    Yeah, I was just watching the video for that. Clicked it as soon as I saw it appear in the store.

    The ice effects are AWESOME. :)
     
  14. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Yes, was released pack :)
    Now distortions are very fast on mobile. (Soon i will update the distortions for 1 and 2 pack.)
     
    hopeful likes this.
  15. Richardm1985

    Richardm1985

    Joined:
    Dec 22, 2014
    Posts:
    73
    Hey Kripto,

    If I am using a visual scripting asset (plygame), how would I integrate it with the effects? My problem seems to be the "target" setting.

    Here is the code to see what my character has selected:


    Targetable target = Player.Instance.selectedTarget;
    if (target != null)
    {
    if (target.TargetableType() == Targetable.Type.Character)
    {
    /* an NPC is selected. can of course cast it */
    CharacterControllerBase chara = target as CharacterControllerBase;
    // or since this is most likely an NPC
    NPCController npc = target as NPCController;
    // and use these to get to the npc actor componet
    }
    if (target.TargetableType() == Targetable.Type.Item) { /* an Item is selected */ }
    if (target.TargetableType() == Targetable.Type.Object) { /* an InteractObject is selected */ }
    if (target.TargetableType() == Targetable.Type.Unknown) { /* should not happen */ }
    }
     
  16. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Ya!
    Wow! Simply wow!
    @kripto289
    So glad I bought this. I deliberated for ages over buying this since I'd been let down by most other particle packs but this one really does deliver... And deliver some more as it is updated! You know what, in gonna go paste this as a review (I'm not really a reviewer but this deserves).

    Any chance to include any of my patches / etc? (you know it's a pain maintaining ones own tweaks when original updates)
     
  17. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello,
    I do not understand your code and what you want.
    If you want to instantiate effect that will fly in the direction of the object, it is sufficient to write

    var effectInstance = Instantiate (effect, startPosition, new Quaternion ()) as GameObject;
    var effectSettings = effectInstance.GetComponent <EffectSettings> ();
    effectSettings.Target = target.gameObject;

    Or if you want the projectile flew out of your arms in a straight line

    var effectInstance = Instantiate (effect, startPosition, new Quaternion ()) as GameObject;
    var effectSettings = effectInstance.GetComponent <EffectSettings> ();
    var go = new GameObject ();
    go.transform.position = Camera.main.transform.forward + Camera.main.transform.position;
    effectSettings.Target = go;

    Hello,
    At the moment I do not plan to change current the scripts in future updates, so you can include your patch without risk.
    I've tried to implement your patch, but I do not quite understand some of the lines of code, so I decided not to overwrite anything yet.
     
    Arkade likes this.
  18. luizcarlosfx

    luizcarlosfx

    Joined:
    May 28, 2013
    Posts:
    15
    Same here. I'd like to use it with 2d colliders and rigidbodies. Your effects are really amazing. It would be awesome to use it in my 2.5D game
     
  19. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Script "projecticle collision behaviour" flight operates using physx.raycast, so for 2d games need to rewrite this script.
    Since I have never worked with 2D games, so I have not included 2d script behaviour.
     
  20. Greenwar

    Greenwar

    Joined:
    Oct 11, 2014
    Posts:
    43
    How come distortions won't work on an orthographic camera? Unity limitation or the way the shaders has been written?
     
  21. Arkade

    Arkade

    Joined:
    Oct 11, 2012
    Posts:
    570
    Sorry if my patches are unclear. Can I do anything to help clarify? Maybe a Skype call?
     
  22. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Distortions work in orthographic projection, if you increase the value of the distortion in the 10-100 more.


    In the old version of the shader, you must replace the line "_BumpAmt (" Distortion ", Range (0, 128)) = 10"
    on "_BumpAmt (" Distortion ", Float) = 10" and increase the value of e.g. 50 times.
    Contact me on Skype "scar289"
     
  23. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    @Kripto289

    Your next challenge :p



     
  24. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    105
    What would be great if you added some cool blood effects like explosions, slashes etc...there some in the store, but they're not very good
     
  25. DynastyoftheMagi

    DynastyoftheMagi

    Joined:
    Jan 13, 2015
    Posts:
    10
    Hello

    My VFX consult is having problems with the reality packs. I am including his issue below;

    Thank you.


    When using the effects in the package could change the rgb values indefinetley throughout using them. Then
    while moving prefabs with the effects the rgb value would not change. If it was changed on 1 effect it
    stayed with that effect for all of the effects. So if i prefabed a particle red and made a new particle
    and prefab'd it blue the original would change to blue. It is maintaining some sort of top heiarchy
    system which wasn't there before. One second its working next it just stops. I tried reimporting
    the packages and creating a new one and it fixed it then it stopped working again. This happened with all 3
    realistic effects packs.
     
  26. TDH_DrThirteen

    TDH_DrThirteen

    Joined:
    Jul 3, 2014
    Posts:
    42
    I just bought the 3rd pack and it seems like the slime shaders are missing, because the slime ball is pink.
    Any way to change that?
     
    Last edited: Feb 26, 2015
  27. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Just set the shader "Effects/SlimeCutOut". It's bug with import 1/2 and 3 pack. I'll fix it in next pach.
     
  28. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    953
    Just upgraded to Unity 5 and it seems some of your shaders in pack 1 and 2 are turning pink.
    Any ideea how to fix this?

    pinkshader.jpg
     
    Adrian42 and SureSight like this.
  29. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    In Unity5 need to fix some distortion shaders with errors. For example "DistortionParticlesCutout"
    Need to insert these lines
    "#pragma target 3.0
    #pragma glsl "
    after the line" #pragma surface surf .... ".
     
  30. SureSight

    SureSight

    Joined:
    Aug 2, 2013
    Posts:
    61
    I just downloaded the official Unity 5.0 today and the problem still exists.
    There are also new versions of the Standard Assets image effects in Unity 5 and some scripts that need to adhere to the new scripting standards.
    Do you have a better idea of when this might be fixed?
     
  31. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    953
    Thanks for fast reply, i tried but it did not solve the problem.
    Now the sprites are white instead of pink and it seems the transparency is ignored.
     
  32. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    This is bug of Unity 5.
    Now the alpha channel is ignored when using emission. Even standard transperent shader does not work correctly.


    Just remove old folders "assets/standart asset" and "assets/editor/image effects", after reimport new image effects and use this settings:

     
    SureSight likes this.
  33. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    953
    Thank you. I guess i will not move yet to Unity 5. Btw, I have a need for a special fx/shader, can we talk in private?
     
  34. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    My email is "kripto289@gmail.com"
     
  35. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    652
    Hi Kripto289, did you already file a bug report regarding the alpha being ignored? As my game is using your effects heavely it looks very crapy when running it on Unity 5.
     
  36. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Yes, I have already sent a bug report.
     
  37. scarpelius

    scarpelius

    Joined:
    Aug 19, 2007
    Posts:
    953
    Thanks @kripto289 here is a shield covering an entire village, made with his help.
    This guy is truly awesome.

     
  38. knowpixels

    knowpixels

    Joined:
    Oct 6, 2013
    Posts:
    4
    Great FX Kripto289, though I have the same problem using them in my project as palaxe.
    I'm using win7 64, Unity 4.6.3.
    When I make a new project I do not get the error.
    In my current project I get :
    /EffectSettings.cs(20,29): error CS0066: `EffectSettings.EffectDeactivated': event must be of a delegate type
    When I try and run it says compile errors must be fixed.
    I was just wondering what package caused the conflict in palaxe 's case
    And what was the fix?
    Btw I added you on skype.

     
  39. dark_tonic

    dark_tonic

    Joined:
    Mar 23, 2011
    Posts:
    114
    Waiting on the U5 fix, as well. Killer effects, though, dude, great work.
     
    SureSight likes this.
  40. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Bug with alpha channel In unity5 can fix this way.
    Need change line "#pragma surface surf ... alpha" to "#pragma surface surf ... alpha:fade".
     
    hopeful likes this.
  41. nicholas33

    nicholas33

    Joined:
    Mar 5, 2015
    Posts:
    3
    Hi kripto289,
    I got error in android when using Realistic Effects Pack 1:
    GLES20: Effects/WaterFree:
    (Filename: Line: 413)
    GLES20: vprog textures are used, but not supported.
    the WaterShieldMobile works ok in Editor, but not in phone.
    Can you help?
     
  42. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Most likely this error is associated with a version of Unity or texture compression/NPOT size;
    Write to me on skype "scar289", try to solve this problem.
     
  43. olhari

    olhari

    Joined:
    Mar 8, 2015
    Posts:
    5
    Hi, i bought your features, and it's superb. Actually, i am building a TPS, and my script for the bullet spawn and so to spawn the prefabs with a target doesn't work. I put the script in a EmptyObject in front of the gun.

    Code (CSharp):
    1. public class GunScript : MonoBehaviour
    2. {
    3.     public float fireSpeed = 15f;
    4.     public float waitTilNextFire = 0f;
    5.     public GameObject bullet;
    6.     public GameObject bulletSpawn;
    7.  
    8.     // Use this for initialization
    9.     void Start ()
    10.     {
    11.    
    12.     }
    13.  
    14.     // Update is called once per frame
    15.     void Update ()
    16.     {
    17.  
    18.         RaycastHit hit = new RaycastHit ();
    19.         bool foundhit = Physics.Raycast(transform.position, transform.forward, out hit, 10);
    20.  
    21.         if(Input.GetButton("Fire1"))
    22.         {
    23.             if(waitTilNextFire <= 10f)
    24.             {
    25.                 if(bullet)
    26.                 {
    27.                         GameObject effectInstance = Instantiate(bullet, bulletSpawn.transform.position, new Quaternion()) as GameObject;
    28.                         var go = new GameObject();
    29.                         var effectSettings = effectInstance.GetComponent<EffectSettings>();
    30.                         go = hit.transform.gameObject;
    31.                         effectSettings.Target = go;
    32.                         waitTilNextFire = 1f;
    33.                 }
    34.             }
    35.         }
    36.         waitTilNextFire -= Time.deltaTime * fireSpeed;
    37.     }
    38. }
     
  44. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello, try this:
    Code (CSharp):
    1.  
    2.   void Update ()
    3.     {
    4.         if(Input.GetButton("Fire1"))
    5.         {
    6.             if(waitTilNextFire <= 10f)
    7.             {
    8.                 if(bullet)
    9.                 {
    10.                         GameObject effectInstance = Instantiate(bullet, bulletSpawn.transform.position, new Quaternion()) as GameObject;
    11.                         var go = new GameObject();
    12.                         var effectSettings = effectInstance.GetComponent<EffectSettings>();
    13.                         go.transform.position = transform.position + transform.forward;
    14.                         effectInstance.MoveDistance = 10;
    15.                         effectSettings.Target = go;
    16.                         waitTilNextFire = 1f;
    17.                 }
    18.             }
    19.         }
    20.         waitTilNextFire -= Time.deltaTime * fireSpeed;
    21.     }
    22.  
     
    olhari likes this.
  45. olhari

    olhari

    Joined:
    Mar 8, 2015
    Posts:
    5
    Hiiiii !!!! there is a problem with your script ... Can't detect effectInstance.MoveDistance
     
  46. olhari

    olhari

    Joined:
    Mar 8, 2015
    Posts:
    5
    Code (CSharp):
    1. using System.Collections;
    2.  
    3. public class GunScript : MonoBehaviour
    4. {
    5.     public float fireSpeed = 15f;
    6.     public float waitTilNextFire = 0f;
    7.     public GameObject bullet;
    8.     public GameObject bulletSpawn;
    9.  
    10.     // Use this for initialization
    11.     void Start ()
    12.     {
    13.    
    14.     }
    15.  
    16.     // Update is called once per frame
    17.     void Update ()
    18.     {
    19.         if(Input.GetButton("Fire1"))
    20.         {
    21.             if(waitTilNextFire <= 10f)
    22.             {
    23.                 if(bullet)
    24.                 {
    25.                     GameObject effectInstance = Instantiate(bullet, bulletSpawn.transform.position, new Quaternion()) as GameObject;
    26.                     var go = new GameObject();
    27.                     var effectSettings = effectInstance.GetComponent<EffectSettings>();
    28.                     go.transform.position = transform.position + transform.forward;
    29.                     effectSettings.MoveDistance = 20;
    30.                     effectSettings.Target = go;
    31.                     waitTilNextFire = 1f;
    32.                 }
    33.             }
    34.         }
    35.         //Destroy(gameObject,3);
    36.         waitTilNextFire -= Time.deltaTime * fireSpeed;
    37.     }
    38. }
    i think i fixed the problem, but i have another problem .... it initiates 2 prefabs actually , one on the good spot another belove. The seconds keep going further "belove" if i click again.


    And finally, i still have the clones in the hierarchy
     
    Last edited: Mar 8, 2015
  47. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Try Input.GetButtonDown("Fire1")
     
  48. olhari

    olhari

    Joined:
    Mar 8, 2015
    Posts:
    5
    Same problem unfortunatly ^^'
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class GunScript : MonoBehaviour
    5. {
    6.     public GameObject bullet;
    7.     public GameObject bulletSpawn;
    8.  
    9.     // Use this for initialization
    10.     void Start ()
    11.     {
    12.    
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update ()
    17.     {
    18.         if(Input.GetButtonDown("Fire1"))
    19.         {
    20.             GameObject effectInstance = Instantiate(bullet, bulletSpawn.transform.position, new Quaternion()) as GameObject;
    21.             var go = new GameObject();
    22.             var effectSettings = effectInstance.GetComponent<EffectSettings>();
    23.             go.transform.position = transform.position + transform.forward;
    24.             effectSettings.MoveDistance = 10;
    25.             effectSettings.Target = go;
    26.         }
    27.     }
    28. }
     
  49. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I not have problem with script. Always 1 projectile flied when click mouse button. Also you can add this line "go.hideFlags = HideFlags.HideAndDontSave;"
     
  50. konsnos

    konsnos

    Joined:
    Feb 13, 2012
    Posts:
    93
    Hey, @kripto289
    I've bought the Realistic Effects pack v2 and used the Meteor. However there is different behavior than the demo. In your demo the meteor's explosion distorts the view, while in the demo scene of your package that doesn't happen.

    I'm using Unity Pro 4.6.3 . Have I missed something?