Search Unity

ProFlares - Ultimate Lens Flares for Unity3D [RELEASED]

Discussion in 'Assets and Asset Store' started by ProFlares, Nov 3, 2013.

  1. s_guy

    s_guy

    Joined:
    Feb 27, 2013
    Posts:
    102
    You'll have to add your own 2d occlusion test to ProFlareBatch.cs, using a 2d physics check (Physics2D.GetRayIntersection) that mirrors the existent 3d test. This is working well for me.
     
  2. m2motazedi

    m2motazedi

    Joined:
    Jan 18, 2016
    Posts:
    3
    When i use Proflares in my game(Android) all the flare are shaking a little!
    How can i stop them from shaking?
    anyone knows that?
     
  3. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Hi,

    Make sure that your cameras aren't moving after the flares are calculated. First check the script execution, and set ProFlares.cs and ProFlaresBatch.cs to be executed last.

    David.
     
  4. m2motazedi

    m2motazedi

    Joined:
    Jan 18, 2016
    Posts:
    3
    Thank you for your Support :)
     
  5. m2motazedi

    m2motazedi

    Joined:
    Jan 18, 2016
    Posts:
    3
    I tried but it seems it doesn't have anything to do with execution order.
    When camera starts to move, all flares will shake(vibrate).
    I have "Camera Shake" and "Camera Path Animator" but I set all of these to execute before Proflares,as you said, but still nothing changed :|
     
  6. daisySa

    daisySa

    Joined:
    Dec 29, 2011
    Posts:
    341
    proflares.com seems to be down so I can't check the documentation. Will the site be coming back up, or has it been shut down permanently?
     
    Last edited: Jan 30, 2016
  7. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Ok thats strange, ProFlares calculate relative camera positions in the lateUpdate function, so making sure the camera shake is in the Update function might do the trick.

    Other potential problems might be that you moving the proflare batch setup, or the shake script is doing something unexpected. If you have a demo scene that I can replicate the problem I might be able to figure out the issue.

    Thanks for the heads up, I didn't realise it was down. I think I'm going to have to change providers. I will try and get it up again as soon as possible. Apologies for the inconvenience.

    David.

    PS, the setup videos are on youtube if that helps. https://www.youtube.com/channel/UC5I4rAjOT0JvHLVb-G6dSxQ
     
  8. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Hi,

    I bit the bullet and transferred the site over to square space. Here is the temporary URL until the DNS information sorts its self out.

    https://pro-flares.squarespace.com

    Apologies for the inconvenience

    David.
     
    daisySa likes this.
  9. dburden1

    dburden1

    Joined:
    Jan 29, 2015
    Posts:
    19
    Have you considered using CullingGroups to handle the flare occlusion culling?
    I almost never hear people talking about them. I don't think many people know about them (I only recently discovered them myself). But procedurally rendered lens flares seems like the perfect application for CullingGroups, and it might help to make ProFlares' occlusion culling a little less expensive.
    http://docs.unity3d.com/Manual/CullingGroupAPI.html

    We have been grappling with flare performance for a while on PS4. That's not to say ProFlares is unoptimized; it's just that we have next to no CPU headroom available. The PS4 is uniquely GPU-dependent, and ProFlares happens to use the CPU. Since CullingGroups are integrated with the engine and presumably do culling calculations in native code (possibly on a different thread as well), I have a hunch that it would help immensely.
     
  10. pan-master

    pan-master

    Joined:
    Nov 11, 2013
    Posts:
    127
    Does it work with 5.4?
     
  11. resequenced

    resequenced

    Joined:
    Apr 17, 2014
    Posts:
    67
    I'm having the same issue on the PS4. Did you manage to resolve this?
     
  12. edufurla

    edufurla

    Joined:
    Mar 7, 2014
    Posts:
    19
    Hi, at first sorry my English. I just bought ProFlares and this asset looks so far a very good plug in for sandard scenes, but the VR setup is a bit confuse to me.

    I trying configure Proflares to work with gear VR and seems it do not working right.

    If I follow the attached instructions - the ProFlareBatch is create on top of hierarch instead of a child of LeftEyeAnchor. (Nothing happens with LeftEyeAnchor)

    The ProFlareBatch created has CenterEyeAnchor as GameCamera and none as FlareCamera. (Is this right?).

    The ProFlareBatch created is in front of OVR camera and the distance to OVR camera is controlled by Z Position.

    This is diferent from the example attached that has ProFlareBatch as child of LeftEyeAnchor, but this setup do not work too.

    How should be the exact setup and hierarch of each component, thinking my camera will move and the ProFlareBatch will need follow the camera?


    Thank you for your attention.
     
  13. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Does anybody have test Proflares with SteamVR ?
     
  14. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    62
    Just purchased.. Using Unity 5.4 and none of the flares in the demo scenes are showing. Please help :( dont want to have wasted 80$
     
  15. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Best to contact @ProFlares via his support email and / or PM. Forum thread owners don't always get notifications of new posts in their threads.

    Note, though, that Unity 5.4 hasn't been released yet, and it is expected many assets from the store won't work with it yet.

    Try Unity 5.3.4, the latest official release.
     
  16. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    62
    I downgraded to 5.3 to check if it would work as well but no luck. The flares are all missing and are invisible. Im downgrading to 5.2 now to see if it helps, thanks!
     
  17. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    So ... I decided to import ProFlares and run the demo to see what you were talking about, and I guess I gave you only partially good advice. ;)

    The materials for the trees and other objects in the scene are not really part of the ProFlares system. You can change the shaders used with those materials to standard Unity shaders if you're just wanting to run the demo.

    To see and use the flare system, what you want to look at is the ProFlareSetup object in the demo scene, and you want to keep / use the ProFlareShader. The other two shaders with the word "demo" in them aren't needed and can be deleted from your project.

    Once I changed the demo materials to use the standard Unity shaders and deleted the two "demo" shaders (at least one of which was throwing an error, IIRC), I was able to run the demos with no trouble on Unity 5.3.4. The flares were there.

    EDIT: Oh wait, there was also a script error I had to fix, and it might come up for you. If you see a complaint in your console about "EventType does not contain a definition blah blah," what you need to to is modify each location in the scripts the console tells you about with "UnityEngine.EventType" instead of just "EventType." There were about a half dozen of these.
     
    Last edited: May 7, 2016
  18. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    62
    So I downgraded, Upgraded. made new projects etc. Pro Flares works in all my new projects but I cant seem to get it to work with my project that I need it in. Basically I tried changing the ProFlares Textured Flare Shader and Im pretty sure that is the problem, in other projects I am able to change that shader and still SEE the flare texture somehow, but in this one Im pretty sure its the texture for some reason I make a new material apply the texture and still cant see it. And for some reason all these are black https://gyazo.com/428042a39c5247caafe60aeeab09af33
     
  19. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    Beats me. Have you been able to get in touch with David, the ProFlares dev?
     
  20. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    62
  21. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
  22. rafaelmfernandez

    rafaelmfernandez

    Joined:
    Aug 11, 2013
    Posts:
    62
    I was using collab, it forced it to text only, I think I love you haha thanks for the help my man!
     
  23. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,687
    No problem. Everybody needs a helping hand at some point. :)
     
  24. edufurla

    edufurla

    Joined:
    Mar 7, 2014
    Posts:
    19
    I am having the same shaking problem when I publish a project with flares to Android Gear VR.
    In editor all seems ok, no shaking - this problem is only in the published android version.
    Looks like the flares are calculated in a lower frame rate them the rest of the scene. (In the initial Android VR setup I changed the frame rate to 60 fps.)
    I a Playmaker user and do not understand code.
    Any help will be welcome.
     
  25. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    Hi, I have this problem with UFPS and Proflares.
    When I pass by the first person to the third person, the "center point of the flares" is not updated and can not get the occlusion back to the player model.




    How do I fix?
     
  26. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    It looks like UFPS is enabling a different camera for the 3rd person camera. You need to swap the proflarebatch game camera at the same time you change to the 3rd person camera.

    Hope this helps.

    David
     
  27. WILEz1975

    WILEz1975

    Joined:
    Mar 23, 2013
    Posts:
    375
    No, the camera is the same, only shifted. ;)
     
  28. Simod

    Simod

    Joined:
    Jan 29, 2014
    Posts:
    176
    Hello there.

    Thinking to buy this as well. But I have a question before.
    Does it actually support occluding on clothed meshes? I mean the native Unity 5 flare system requires colliders, which are very static and does not suit to skinned meshes or clothed meshes. So will ProFlares work in this case?

    Thanks in advance
     
  29. Vincent_Lo

    Vincent_Lo

    Joined:
    Sep 20, 2013
    Posts:
    3
    Hi,

    Has anyone gotten ProFlares to work with the HTC Vive? I'm having issues getting them to render at all.

    I'm working with Unity 5.4.0.
    The steps I took to get to this point:
    1. Clicked "Create Setup"
    2. Dragged a Mega Atlas into the ProFlareBatch component
    3. Dragged in a Mega Flare

    At this point, I have things working as intended as shown by the image below.
    http://i.imgur.com/NmRM4bK.png

    4. Next, I Dragged in the Camera Rig prefab from the SteamVR folder
    5. Enabled "Virtual Reality Supported" in the Player Settings

    At this point, there is no lens flare on screen when I enter Game mode (press play). I looked all around me. No flare.
    http://i.imgur.com/irZSPiR.png

    I've tried plugging "Camera (Head)" and "Camera (Eye)" into the "Game Camera" property on the ProFlareBatch component. I've even plugged them into "Flare Camera." I've tried all sorts of combinations but nothing worked normally. Sometimes I'd see the flare, but it would be in the wrong spot or it would move strangely as I move the Vive headset's camera around.

    In addition, I know that there is a "VR" option in the ProFlareBatch's Mode property, but the Flares STILL don't show up properly if at all.

    Anyone happen to work with ProFlares on the Vive and get it working??

    Thanks.
     
  30. wdmct

    wdmct

    Joined:
    Jun 12, 2014
    Posts:
    3
    in Unity 5.5 , none of the flares are showing too .

    Please help ~!!
     
  31. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Really hope David will still update this asset, we really can't loose this pure gem !!!
     
  32. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Hi Guys,

    I can confirm that ProFlares does work correctly in 5.5. And all of its core functions are still working fine the only thing isn't working is multi-scene editing as this wasn't part of unity when ProFlares was developed.

    I spoke to wdmct directly, didn't realise that he had also posted here. His problem was linked to an issue that for an unknown reason unity scrambles the data sorted in the atlases something to do with Binary serialisation in the settings. This started happening when people were moving projects from unity 4 to 5. It's a solvable problem when it happens.

    To rebuild the flare atlas drag the JSON file onto the import slot. This recreates the elements in the atlas.
    There is also a chance flares in the scene may have been corrupted. On each flare there is a JSON import/export option so you can export from the project before upgrading. All of the presets already have a JSON file in the ProFlares DIR.

    David.


     
  33. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Hi David,
    Tks for the feedback.
    What about Steam VR support ? From my quick test, i havn't been able to get result.
    Havn't look to Oculus setup, but, as far as i remember, Oculus rig has change since your original VR support and may not work too.
    Some of you guys got a proper oculus setup ? ( or SteamVR ?)
     
  34. Sir-Gatlin

    Sir-Gatlin

    Joined:
    Jan 18, 2013
    Posts:
    28
    A similar VR question. When building with Google VR. Proflares creates 2 cameras but then splits the already split cameras. I see documentation on Oculus support but wasn't sure if it also supports GVR, and if so how. Screenshot_20170227-181856.png
     
  35. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    hi @ProFlares
    does it works with unity 2017??
     
  36. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    I think it's dead and depreciated. Amen.
     
  37. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    :( and did you know some good asset to manage the flares like this?
     
  38. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    I brought this asset 3 years ago. After some time I uncover a lot of issues for out project and others. I was bloomed from the nice little demo unfortunately. We managed the flares by a small script (near distance) and soft edge shader in the 3D environment and some in screen space like sun flares and SE Bloom on top.

    I have no idea if there is another asset that does.
     
    ghiboz likes this.
  39. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
    is this using full screen framebuffer ?
     
  40. lolclol

    lolclol

    Joined:
    Jan 24, 2013
    Posts:
    212
  41. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    So, it doesn't work anymore?
    It is still selling and doesn't say that it's deprecated on the Unity store.
     
  42. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    What would be the correct way to use a ProFlare as a Sun? that matches the directional light sun from the procedural skybox material.
     
  43. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    THANK YOU for the 2019 update!! :)
     
    wetcircuit and hopeful like this.
  44. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Hi All,

    Yes ProFlares has finally been updated, tested in 2017, 2018 and 2019 alpha. Also tested in the Standard, Lightweight and HD render pipelines.

    A couple of new features too.
    • A sun mode - this mimics a directional light. Once enabled position of the flare's transform is ignored, and its positions is calculated from its rotations. I found parenting to a directional light works well.
    • Pixel occlusion - this one is a bit experimental, but allows you to avoid using physics colliders for flare occlusion. Implemented via a 1x1 render to texture. I wouldn't advise using this on more than one or two flares, as performance impact will probably vary with scene complexity.
    • Occlusion speed - now control how long it takes for flares to disappear when occluded.
    • Linear lighting support - change the shader over on your ProFlareBatch.

    I do want to apologies for the shocking length of time this has taken. If you're still here thanks for sticking with me. Any problems please feel free to email me.

    Cheers,
    David.
     
  45. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Some waited so long, flares came back in fashion...
     
    atomicjoe, ProFlares and derkoi like this.
  46. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    143
    Wow, this is very great news! Thank you so much for the update!!
     
    hopeful likes this.
  47. TDArlt

    TDArlt

    Joined:
    May 22, 2013
    Posts:
    23
    Thanks from my/our side as well for making the asset work on the scriptable renderpipeline as well.

    But, one question concerning VR (on PC/Oculus Rift S, in our case):
    It seems like the asset only does 2D flares creating a planar mesh for the flares to happen. Am I doing something wrong or is this a limitation based on how the calculation works here?
    Happening on a 2D-plane is not what I'd call VR-ready, as the z-depth of the single flare elements from the camera perspective is important for the immersion.

    Thanks,
    Chris
     
  48. ProFlares

    ProFlares

    Joined:
    Nov 1, 2013
    Posts:
    154
    Hi Chris,

    ProFlares is built on a 2D plane system to create the lens flare so having volumetric style depth is out of scope. But there is a hidden setting that might be what you want.

    I hid some of the legacy VR settings as I don't have access to the hardware to fully test them.

    To access the you can either set them via script or uncomment line 67 of ProFlareBatchInspector.cs, //base.DrawDefaultInspector();

    The settings are VR_Mode and VR_Depth, This then scales the elements that are offset from the source towards the user.

    I wouldn't push them too far, I've found flares in VR are best kept subtle as they don't really happen in the eyes. But point flares on distant suns or things like street lights works well as an approximation for glare which would be difficult to get with pixel based effect.

    Let me know if this helps at all, I'm open to any ideas you might have towards improving the VR flare experience.

    David.
     
  49. TDArlt

    TDArlt

    Joined:
    May 22, 2013
    Posts:
    23
    Hi David,

    Thank you very much for the detailed overview and assistance. Sounds interesting, I will check it out.

    In our current project, we've now a very simple setup (as you wrote, flares work best when keeping subtle), where it works on 2D for the moment (as it needed to be finished yesterday).

    But I will look into your proposals in the next weeks and probably come back to you, if there are any questions :)

    Thanks,
    Chris
     
  50. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    Do you plan on adding true area occlusion? Using a compute shader to sample to sample visibility for example.