Search Unity

Realistic effects pack [Asset Store]

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

  1. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello,
    You have this distortion particles in meteor prefab?


    Also, try to increase distortion float in shader.
     
  2. konsnos

    konsnos

    Joined:
    Feb 13, 2012
    Posts:
    93
    Nope, mine is quite different

     
  3. konsnos

    konsnos

    Joined:
    Feb 13, 2012
    Posts:
    93
    Oops, my bad. It seems that I had an older version of the package ( one which was about 20 MB smaller :p ). My apologies for the false alarm :(
     
  4. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    652
    Applying the alpha:fade and the #pragma target 3.0#pragma glsl items to all the distortion shaders did fix all the issues I had with the effects.
     
  5. Ironwolf21

    Ironwolf21

    Joined:
    Aug 15, 2014
    Posts:
    6
    Hi Kripto,

    I am having an issue with the distortion shader when using camera with a viewport y = 0.6. The render texture is cropped, causing the distortion particles to be black. I included a screenshot of showing the problem.

    I am not sure how to adjust the distortion shader code to compensate for the scale and offset. Any help would be great.

    btw your effects are awesome, I bought all 3 packs so far.

     
  6. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hi,
    Try to increase "scale" settings in script "distortionMobile" (1 instead of 0.5f).
     
  7. Ironwolf21

    Ironwolf21

    Joined:
    Aug 15, 2014
    Posts:
    6
    sorry changing the scale to 1 didn't help.
     
  8. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I not have this bug.



    Did you check how it works on your mobile? In the editor, when using forward mode, the image is not correct. Use deffered renderer for pc build without dx11 setting.
    Editor seems to use the settings for pc build, despite the fact that the chosen platform is android.
     
    Last edited: Mar 26, 2015
  9. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    488
    I just purchased Version 3 today and I am having a problem. I am using the PhotonShot prefab. After I instantiate an instances of this and it is deactivated. The game view scene stops updating with the Main Camera Image, the Weapon Camera continues to update, but the view is not clearing so it just gets all smudged.. I am using Unity5.

    The problems, starts with a bit of freezing and the screen doesn't refresh, Then clears a bit. But finally gets to a point when it stops completely.

    Note: I am firing PhotonShot from the gun. So it is instantiated within the clipping plane of the weapon camera. The weapon camera, is ignoring the layer that PhotonShot is on.

    I have 2 cameras:

    (1) Main Camera. Settings for this are in the 1st image below..
    After using PhotonShot, this stops updating in the GameView. The preview window for the camera, will still display correctly.

    (2) Weapon Camera. Settings for this can be seen at right of 2nd image below.
    After using PhotonShot, this continues to update, but as you can see in the image, the gun is smudged because the Main Camera view is not clearing the image each frame. I ignore the layer for PhotonShot.

    If I disable the Weapon Camera and use PhotonShot, everything works great.

    Looks like PhotonShot is somehow messing up my Weapon Camera.

    After the screen is messed up, If I disable the Weapon Camera in the hierarchy, the Main Camera works correclty, but if I re-enable the Weapon Camera, the problem hasn't gone away (without using PhotonShot again).

    Please help.

    Main Camera Settings
    2015-03-26_22-14-23.jpg

    Weapon Camera Settings and Game view with smudging
    2015-03-26_22-03-55.jpg
     
    Last edited: Mar 26, 2015
  10. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I do not quite understand the problem. But I'll try to help you.
    Try instead deactivate, delete and create it again. As well try to disable all scripts (inside prefab), except projectileCollisionBehavior and EffectSetting.
    PhotonShot effect should not affect the camera. I do not understand why this is happening. If the error persists, record the video with the problem.
     
  11. Ironwolf21

    Ironwolf21

    Joined:
    Aug 15, 2014
    Posts:
    6
    Thanks kripto, setting the render path to deferred without dx11 fixes the issue. I also deployed to iPhone and it works with iOS player settings set to deferred lighting.

    However I am getting a warning every frame when I enable deferred lighting and run in the editor on mac. It goes away if the set the graphics emulation to no emulation. I'm not having any performance issues on iPhone so it could be limited to running in the unity editor. Thanks again for your help.

     
  12. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    It is just a warning when using emulation and deffered render. Simply remove the emulation. To build for mobile I clean rendertarget. Therefore, the message does not make sense.
     
  13. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    488
    Thx for getting back to me Kripto289. I will do a video tonight, I have to go to work now. But I did some more investigation this morning. I found that either PhotonShot->Trail->Trail or PhotonShot->Trail->Distortion will cause the problem. If either of these are enabled then I get the problem.

    I also tried deleting and re-creating the Weapon Camera, as per your suggestion. As soon as the new camera was created the problem came back.

    I haven't tested Muzzle objects yet.
     
  14. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Try to use standart glass shader of unity? Maybe, its bag with GrabPass of unity5.
     
  15. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    488
    I did some more testing and narrowed it down to the distortion shader. Once this plays, the problem I described above happens.

    But, oddly, when the distortion shader is active again, everything returns to normal, temporarily until it stops again.

    This is why I was getting the stuttering. I would fire my gun, the distortion would play, then stop, and I would get the problem. I fire the gun again, and the distortion would activate on impact, and the problem would stop temporarily, until the distortion stopped playing again, then the screen would freeze.

    If I change the shader on the distortion effects, the problem goes away.

    The distortion shader is: Effects/Distortion/ParticlesCutOut

    When I look at this in the inspector it has an error. See image below. I am noob with shaders, so I don't if this anything to be concerned about.

    We went out tonight, so I still haven't had a chance to do a video. I'll do one in the morning.

    upload_2015-3-28_1-2-54.png
     

    Attached Files:

    Last edited: Mar 27, 2015
  16. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I wrote earlier that for unity5 you need to add (in shaders distortion)
    #pragma target 3.0
    #pragma glsl
    And replace #pragma surf .... alpha on #pragma surf .... alpha: fade
    This should help.
     
  17. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    488
    Sorry, that fix is mentioned several times :oops:

    Unfortunately I applied the fix, but it hasn't worked. See video below.

    I have no clue on shader code so I hope I applied these fixes properly.

    In DistortionParticlesCutout there is no, #pragma surf... If I copy this line from other shaders, it throw's errors. So this is what the code looks like now. I assume I then hit the compile button in the inspector, and it is done?

    Code (CSharp):
    1. CGPROGRAM
    2. #pragma vertex vert
    3. #pragma fragment frag
    4. #pragma fragmentoption ARB_precision_hint_fastest
    5. #pragma multi_compile_particles
    6. #pragma target 3.0
    7. #pragma glsl
    8. #include "UnityCG.cginc"
    In the other distortion shaders, I added the "alpha: fade" and the target+glsl lines.

    Code (CSharp):
    1. #pragma surface surf Lambert alpha:fade vertex:vert
    2. #pragma target 3.0
    3. #pragma glsl
    4.  

     

    Attached Files:

    Last edited: Mar 27, 2015
  18. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    With shaders you have done everything right. I forgot to say that alpha: fade need to add if there is a line #pragma surf ... alpha.
    I watched the video and i can't solve this problem. Write to me on Skype "scar289", i will try to solve it.
     
  19. alejobrainz

    alejobrainz

    Joined:
    Sep 10, 2005
    Posts:
    250
    Hello. I'm having issues with Meteor effect being rotated. No matter if I rotate the target, the effect is still wrong. Ive tried turning on or off the IsHomingMove variable but the result is the same... Please advice.

    Screen Shot 2015-03-28 at 11.14.11 AM.png

    Screen Shot 2015-03-28 at 11.13.34 AM.png
     
  20. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello,
    I just created a horizontal plane and made it the target. Explosion exactly horizontal. Are you sure you chose the quad as the target, not a character?
    In the next update I will try to alter the effect of the use of projectors.
     
  21. alejobrainz

    alejobrainz

    Joined:
    Sep 10, 2005
    Posts:
    250
    I did. I also excluded all collisions so that it never triggers until reaching the position of the target. I'll try again on an empty scene.
     
  22. alejobrainz

    alejobrainz

    Joined:
    Sep 10, 2005
    Posts:
    250
    I just emailed you a very simple scene demonstrating the issue. I'm on Unity 5 by the way.

    Thanks!
     
  23. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    488
    I posted a problem above with a scene that has 2 cameras and using Realistic effects with the distortion shader. In my case the 2nd camera is a weapons camera. This is used so the gun does not pass through walls (as you would configure in most FPS games).

    When using an effect that has a grabpass, like the distortion shader, it looks like the texture buffer is not cleared on the weapons camera and so the screen appears to freeze.

    I found this problem was discussed in this thread:
    http://forum.unity3d.com/threads/grabpass-problems-when-using-multiple-cameras.167676/

    The thread has a few solutions. The one that worked for me was changing the weapons camera to forward rendering.

    @kripto289 was very helpful. He spent an hour with me on skype trying to fix this. Thx kripto289. He gave me a few good clues that led me to the above thread.

    I thought I would post the solution here, in case anyone else comes across this problem. The Realistic effects are fantastic and I am relieved I came across a fix so that I can now use them in my game.

    Here is a video that shows the problem:
     
  24. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    652
    Hi Kripto,

    When using the Unity 5 standard cutout shader in combination with your effect shaders some artifacts are displayed.
    Shader Issue marked.jpg
    The leaves of the trees are applying the standard cutout shader while I did already alter your shaders to use the alfa:fade, pragma 3 etc fixes.

    Something else I can do to get this fixed?
     
  25. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I rewrote all the shaders using alpha. A few days later I'll post an update to all three packs.
    If you need to update now, write me an email "kripto289@gmail.com" or skype "scar289" and I will send you a new version
     
    SureSight likes this.
  26. kaidow

    kaidow

    Joined:
    May 1, 2013
    Posts:
    1


    Hi Kripto,

    I bought your awosome work.(Actually, my team bought 'v3')

    I tested in Unity 5, this. And our programmer fix a code like your advise
    "
    #pragma target 3.0
    #pragma glsl
    #pragma surface surf Lambert alpha:fade vertex:vert
    "

    I saw effect which has 'distortion' shader; DistortionParticlesCutout.shader is seems to like 'Gray smoke' in mobile version.(IgnitedEffectMoble, FireShieldMobile, FireTornadoMobile, etc.)

    But the other version does work perfect.

    I don't know why didn't see distort effect in mobile version.

    I wish hear solution of this problem.

    Thanks to read this.
     

    Attached Files:

  27. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I have already sent to the asset store review new versions of packages.
    But if you do not want to wait, send me an email, I can send you a new version.
     
  28. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    kripto289 i have a question, when i Instantiate a rocket from version 2 at the end of my rocket launcher i have the settings of the rocket set to UseMoveVector but it alway goes in the world co-ordinates I would like it to go in the local co-ordinates, MoveVector X of the weapon not the world, how would I do this?

    Thanks.

    EDIT

    As a workaround I replaced line 112 in the ProjectileCollisionBehaviour script with ..
    forwardDirection = tRoot.position + -transform.root.forward * effectSettings.MoveDistance;
    and that works for now.
     
    Last edited: Apr 27, 2015
  29. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Well, I will check the problem and fix it in the next update. Thank you :)
     
    Griffo likes this.
  30. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    330
    Hi!

    Does these work with Unity 5 free version?
     
  31. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Unity5 free does not have functional limitations. Therefore, all the effects work correctly.
     
  32. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    330
    Ok, just had to be sure. Just bought the asset. :)
     
  33. Megalithic

    Megalithic

    Joined:
    Apr 21, 2014
    Posts:
    61
    Hey Kripto,

    Great Assets and outstanding visuals. I downloaded the demo android apk that you provided. I would like to know how you achieved that level smoothness in your build for android. No matter how many times I tried to build my sample game with a prefab that would be used to shoot like a gun I just can't seem to get that FPS or smoothness. It would be great if you tell me how to set it up or how I could start from scratch.

    I used the Distortion script, used HDR and mobile prefabs but still its very laggy.

    Need help. Hope to hear from you soon.

    Thanks

    edit : I am using poolmanager to preload the prefabs and then spawn them. before spawning them I create a Target then assign it to the prefab so that it can go to the assigned Target.
    Is there any other work around it? I tried to edit "EffectsSettings.cs" but I am a noob and using playmaker for programming purposes.
     
    Last edited: May 9, 2015
  34. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello,
    I used these settings.
    dfgdfg.png

    For mobile, you must add the script "DistortionMobile" (he added in a mobile demo scene).
    Try to compile a scene named "EffectsDemoFreeAndMobile" and settings above.

    Also, you can set "UseMoveVector" on true and use MoveVector instead of target.
     
    Last edited: May 9, 2015
  35. Megalithic

    Megalithic

    Joined:
    Apr 21, 2014
    Posts:
    61
    Nope I still cant figure out whats wrong man. Regardless of what I use. Move vector or following your settings for compilation doesn't help either. I tried compiling your effectdemofreeandmobile scene and played on my mobile. it works perfectly. But when I compile my own project following your settings or mine it doesn't help.

    These are the following assets that I am using. Poolmanager, Playmaker and your asset. I am using poolmanager to spawn your mobile prefab and playmaker to handle virtual scripting.

    I dont know what to do man. What is the difference between yours and mine?
     
  36. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Write to me on skype "scar289".
     
  37. Megalithic

    Megalithic

    Joined:
    Apr 21, 2014
    Posts:
    61
    Hey man, Just added you on skype. send me a message letting me know when you are free! We will need to talk then.

    Thanks!
     
  38. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    kripto289 How can I resize one of the particle prefabs?

    I tried
    Particle Scaler that I've used a lot of times on other particles and has alway done the job but it seems to have no effect on yours!

    Thanks.
     
  39. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Hello,
    I tried use particle scaler and he worked correctly. Try to add particle scaler script to all particles effect inside of prefab?
     
  40. Griffo

    Griffo

    Joined:
    Jul 5, 2011
    Posts:
    664
    OK .. thanks ..
     
  41. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,032
    @ Kripto289,

    Are your 3 packs Unity 5.x ready?
     
  42. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    On unity5 worked all effects of all packs (exception energetic network of pack 2, because unity5 not have cloth renderer)
     
  43. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,032
    Thanks Kripto
     
  44. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,881
    Any plans related to updating this cloth effect for U5?
     
  45. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    Unity5 and physx not have cloth renderer with dinamic collision anymore.
     
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,881
    I guess the idea is that the U5 cloth component will only react to one or more sphere or capsule colliders that are registered with the cloth. So there can still be some sort of covering effect, though not the same as the old one.

    Basically, instead of firing the net at any collider, you can only fire a net at the specific spheres and/or capsules you've selected as your target. It will ignore all other colliders.
     
  47. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I thought about it. But there will be many problems. For example, in the demo stage, rectangular wall-target. Or other object, such as a stone, stairs, etc.
    How should I react to these objects?
     
  48. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,881
    I think the easiest course of action is to make a "Unity 5 version" of the effect where the net lands on a soldier that is enclosed by a sphere or capsule collider.

    Another way might be to fake cloth by creating a net of sphere colliders that are joined with hinge joints.
     
  49. kriket

    kriket

    Joined:
    Aug 28, 2014
    Posts:
    33
    My mobile game will be built using unity 4.6 free instead of unity5 cos u5 has performance issues on android. Each level/scene will have 20k polys/40k tris at max. Nearly all of these polys form a humanoid with 25 bones. Can I add your effects to the scene and still be at a decent fps?


    trying target iphone 4s and above
     
  50. kripto289

    kripto289

    Joined:
    Feb 21, 2013
    Posts:
    303
    I have already replied to you on Skype, but I will answer for the rest.
    Unity5 faster because it has a series of optimizations physics, mekanim, multi-threading, etc.
    Distortion work only on unity4 pro or unity5 free and pro.
    Overall, my effects without distortions fast enough (30-60fps) even on very old phones (mali400 / adreno 205 and 1 cpu core 800).
    But with distortions the FPS is reduced by about 10-30%.
     
    kriket likes this.