Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

FXLab - Unity Effects (Does NOT require Unity Pro)

Discussion in 'Assets and Asset Store' started by Marrrk, Oct 10, 2013.

  1. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    405
    It works perfectly and looks gorgeous!!
    I feel like it's more expensive than the bloom for example (or more noticeable at lower texture resolutions), but will be perfectly usable for an interactive scuba diving lesson we're working on!
    Thank you again!



    Keep up the great work!
     

    Attached Files:

  2. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    @IanStanbridge: Thanks, but why does the shader display SM4.0? Do you use DX11 mode? Currently DX11 does not work, but I try to change that in some time.

    @nukeD: You can change the BlurSteps parameter, this will decrease quality but give you performance, the default value is 20 BlurSteps, which means that it will sample 60 times the texture (20 * 3). It can be reduced to around BlurSteps*2+1 times (41 at 20 BlurSteps) if I work on the shader a little bit more.

    Try this (backup the old one):
    https://dl.dropboxusercontent.com/u/2446365/FXLabSamples/Chromatic%20Aberration/ChromaticAberration.shader
     
    Last edited: Nov 26, 2013
  3. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    405
    It definitely gave me 5~10 fps boost. Will experiment with the settings later.

    Thank you!
     
  4. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi Marrrk I only set it to Directx 11 mode to see if the errors the compiler was saying were correct. If your shaders don't compile correctly for Directx11 then you should tell Unity not to compile them for Directx or supply a different fallback shader for directx11 to avoid those errors from the compiler. I'm no expert but looking at your compiled shaders it looks like the shader compiler is aborting at the directx 11 stage and not compiling specific shaders for the other platforms it should compile after that such as opengles2 and opengles 3. If you look at one of Unity's own compiled shaders ( even one that isn't designed for mobile ) They still have separate compiled entries for opengles2 and opengles3 not just opengl. Opengl and Opengles are not exactly the same. Opengles2 for example is a subset of opengl shader model 3. Any Opengl shader written for shader model 3 can be compiled to work on an opengles2 device according to the spec but a generic compiled Opengl shader is not guaranteed to work because opengles spec does not contain all of assembler instructions that opengl does. The reason for opengles existence is it is opengl but with all the functions that require too much power consumption to be suitable for a mobile device removed. Opengles is basically a slower but more power efficient version of opengl with the benefit to a shader developer that if a developer makes a shader model 3 opengl shader then the compiler should be able to compile two versions one for opengl and one for opengles2. It's just the same as how Unity compiles for different platforms itself. You write your scripts once in Unity and then you can tell it to compile for different platforms without rewriting them. The code the developer writes is the same but the mac compiled Unity binary won't work on a PC and vice versa even though the hardware itself is very similar.
     
  5. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Thank you IanStanbridge, that clearly helps me a lot. I will look into fixing it as fast as possible. At least the DX11 errors I hope coming with that the ES2 errors will be found too.
     
  6. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
  7. olivier-etienne

    olivier-etienne

    Joined:
    Feb 15, 2013
    Posts:
    13
    Hi Marrrk,
    Standard effect like water and glass and heat cannot really be appreciates like in the first simple demo scene
    or in the Web Demo.
    The new background with heavy mesh make those effect run very slowly and run at 9 frame per second.
    But WebDemo is very smooth.
     
  8. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Wow, totally interested in this. What would the performance cost be using this package as opposed to Pro? Would 2D games using 2DToolkit (and sprites with alpha) be able to utilize this plugin to its fullest? Surprised there's not more interest in this asset!
     
    Last edited: Nov 27, 2013
  9. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    @olivier etienne:
    I can provide simpler sample scenes, but the scenes currently included are very lightweight and simple, the only appear complex but the polycount and drawcalls are ok.

    @Kirbychwan:
    FXLab manually renders other cameras, as long as these camera produce reasonable content it should work, but I didn't test the 2D stuff yet. If it works, you can use almost every shader included in the pack, but several ones don't make sense, like Depth of Field, Water and other 3D effects.

    On a side note: FXLab is in the DailySale today, it was planned for another day, but now it is there :)
     
    Last edited: Nov 27, 2013
  10. Atmey

    Atmey

    Joined:
    Nov 3, 2012
    Posts:
    88
    Bought it a while ago, I love it, too bad I didn't wait for the sale, you guys deserve the little extra.
     
  11. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    @Marrrk

    Ah, I'm using a perspective camera and actual 3D space, so I think that'll still work. :) And that sale seals the deal, just snagged it now.

    It seems amazing already, but do you plan to add additional effects to the package as well? Color Balance, Blur, Noise/Grain etc.

    Edit: or wait, are those already in there?
     
    Last edited: Nov 27, 2013
  12. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Only noise is included, the other you mentioned are not, but could be added easily enough.
     
  13. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    Can you add sepia tone and a retro film look shader?
     
  14. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    I can, but would you describe the retro film look effect please?
     
  15. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    $enter-the-dragon.jpg $Mad-Monkey-Kung-Fu_La.jpg $retro.jpg

    Ok I am making a kung fu game that's heavily inspired by 70's effect would be something in that style
     
    Last edited: Nov 27, 2013
  16. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    That'd be incredibly useful if you could, and I imagined it'd be a pretty common request as well. If you could include color correction, levels and contrast (if possible), that would be fantastic.

    As an aside, that 'retro VHS film' look above is basically slightly blurry, slightly desaturated with varying amounts of contrast. Using the requested color correction/levels/contrast options would be able to replicate them.
     
    Last edited: Nov 27, 2013
  17. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    110
    Any idea why I can't get the shaders to work on my mobil device. The shaders work perfect in Webplayer on my Mac but won't work on my iPhone 5.
     
  18. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi Marrrk just letting you know that those dx11 shaders apear to compile OK and so the shaders are working in directx11. It also looks like they are compiling all versions they should be compatible with. For example there now appears to be a PS4 enty in the compiled shaders. Unfortunately most of them still don't compile opengles2 versions so they only work on onpengles3 mobile devices. Since there are no compiler errors it looks like the compiler thinks there are too many texture channels or data types that are too large for opengles2 to cope with and is telling opengles2 to use the diffuse fallback as a result. It's strange as your version one shaders all worked fine , did you change your shaders to use a higher precission depth texture or anything like that to cause the change ? A few of your simple shaders do work on opengles2 though for example the water simple shader. now works on opengles2 .

    Also your smooth particle shader still has a glitch with opengles3 in that they aren't smooth. It might be a glitch with Unity 4.3 compressing it's depth textures correctly though as it corrected once when I deleted the textures required for the shader and told fxlab to recreate them. The opengles3 emulation also doesn't show the issue either.
     
  19. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
  20. RC15

    RC15

    Joined:
    Apr 19, 2013
    Posts:
    38
    Hi Marrrk,
    I have just bought your asset.
    Could it be possible to have a version for iOS and Android?!

    It doesn't work also on Mac. (Unity 4.3 / OsX 10.9 )
    Do they work only for Windows platform ?
     
    Last edited: Nov 28, 2013
  21. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,373
    Hey Marrrk,

    Just bought your pack. Love the effects. The water is amazing.

    I am wondering if it is possible to get the Light Shafts to originate from a gameobject. I am pretty sure the included Light Shafts shader is not able to do that but would it be possible to get the regular Light Shaft effect in Unity free.
     
  22. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Hello Marrrk, I just bought your asset and I am wondering if you can include the example scene with the sniper exploding barrels? That was primarily the effect I was after and I am trying to figure out how you put it together. Thank you!
     
  23. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Hi there,

    @maglat: is the iPhone 5 a opengles2 device? IanStanbridge mentioned that many shaders dont work on ES2 devices, I am still investigating the issue but without a opengles2 device its hard to tell what the problem may be. Not all shaders should have the issue, only the complexer ones, is this right @IanStanbridge?

    @IanStanbridge: No texture compression or other fancy things will be done (its also not possible at Unity Free to do such things ;)). But you are right, the difference between v1.0 and the current version (v1.1.0) ist that many shaders use more textures now, previousely only 1 texture was used, this has been changed in favor to the new system. I can add a fallback system which only uses 1 single texture (reflection, refraction, depth combined in one texture).

    Regarding the glitch, can you use the DisplayTexture shader (FXLab/Shaders/DisplayTexture.shader) to only output the FXDepthTexture, it should be a LSD nightmare when everything is correct, but I will too look into this issue.

    @hippocoder:
    ReadPixels+Apply, thats correct and without using some plugin magic the only way in Unity Free, lucky enough I was able to improve the performance with the help of one trick and one technique so that it can be used in realtime (in most cases).+

    @RC15: it should theoretically work with Mac, I will have it tested again, last time I did that it worked, I have not yet tested it with Unity 4.3. Android and iOS should work too, with some limitations, see IanStanbridges post :)

    @Baldinoboy: Its possible, I write it onto my PP shader list, the current LightShafts shader does not work with it, thats correct.

    @eridani: The sniper scene has been updated to use the new FXLab version, but not yet uploaded, I will do it as fast as possible and will update the startpost to reflect that.

    Greetings, Mark
     
  24. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
  25. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Hi there,

    could you describe what problems appear when using the provided samples scenes for the problematic effects (underwater and shockwave have separate sample scenes)?

    For the demoscenes, every demo scene except the Ruins demo are available soon, I ned to update them to the latest FXLab version and upload them.
     
  26. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    thanks great

    re: describe the problem

    let do it tomorrow its 5:48 am est and i still have not fallen asleep :(

    re: demo scenes

    im also having some problems with additional island and mountain demos...

    again ill post details tomorrow ,my brain its fried...

    re: gir

     
  27. Unnumeric

    Unnumeric

    Joined:
    Jun 3, 2013
    Posts:
    9
    Hi marrk! I just bought the asset and imported it into my project - however, all the demo scenes display all effects as pink. I checked the documentation and ensured the camera had correctly assigned fx camera scripts (which would be bizarre if it didn't, as these are the demo scenes - specifically the heat haze and shockwave scenes) - but for some reason the materials all have no main texture assigned.

    Here is a pic:

    http://i.imgur.com/cG1Wgie.png

    I assume I have missed something obvious?
     
  28. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    No, thats no error on your side, you use the DX11 mode, the FXLab shaders have problems with it.

    I fixed the issue, but didnt release the version yet. But you can grab the fixed shaders from here in the meantime and just replace the FXLab shaders with it:

    https://dl.dropboxusercontent.com/u/2446365/Shader.zip
     
  29. Unnumeric

    Unnumeric

    Joined:
    Jun 3, 2013
    Posts:
    9
    Hmm, that fixed most of the effects (the heatwave and the black hole work now) but the shock wave looks like this:

    http://i.imgur.com/7lP2Dna.jpg

    I assume this is not correct?
     
  30. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Its not correct, thats true, looks like the RenderTexture where not properly generated, you can look into the textures by clicking the Main Camera and expanding the FXScreenBufferTexture component, which displays and renders the texture used by the Shockwave Material.

    I will have a look into the scene once I am home, maybe there is something more behind this problem.
     
  31. Unnumeric

    Unnumeric

    Joined:
    Jun 3, 2013
    Posts:
    9
    Yeah, it feels a bit weird given that all the other effects work perfectly. I'm mostly interested in using these in a 2d project with an orthographic camera - is there a possibility of any weird interactions or should everything work correctly?
     
  32. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Everything should work correctly when using orthographic, but I didnt test that, I say that based upon how FXLab works.

    Regarding the shockwave: If you select the shockwave object the effect appears (I heard that from a friend). But thats only a temporal solution which dosnt fix anything :(
     
  33. jaelove

    jaelove

    Joined:
    Jul 5, 2012
    Posts:
    302
    I am having the same problem with the shockwave
     
  34. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Hi Marrrk just to be clear about what I meant. the majority of your shaders do not work correctly on opengles2 at present. All of your shaders are compiling correctly but most are being told to use the fallback under opengles2. Your simple water shader does compile for opengles2 and work though this is the exception. Since there are no compiler errors in all of these cases I'm assuming the compiler must know you are using too many texture channels or doing something that makes it incompatible with opengles2 since these same shaders do have a compiled entry for es3 and work for it and run on a compatible device. So you are aware opengles3 is fairly new in unity and at present only supported on quallcom chips so most mobiles even some others that do support opengles3 can't use them. I think the reason for this is not all graphics drivers for opengles3 work reliably enough yet which is why I said I'm not sure the issue with the soft particles is a fault with your shader. It could just as easily be a driver glitch or a Unity 4.3 bug as well. As a result though most mobile developers will want to us opengles2 rather than opengles3 as a result.

    Regarding your proposed fix of just supporting one texture effect for opengles2 for example letting water use refraction but not reflection to make it compatible. It would be better if instead you just halved the resolution of all the texture effects and compressed four of them into one texture as most people wouldn't want to run full resolution texture effects on opengles2 for performance reasons anyway.

    Version 1 of fxlab worked correctly on all opengles2 and opengles3 devices. If it is likely to take you a long time to fix the issues it might be worth submitting a new version of fxlab to the asset store that contains the shaders that compile which fix the issues with directx 11 and also include a package containing fxlab1 as an optional install so that people can use it in the mean time.
     
  35. maglat

    maglat

    Joined:
    Jul 9, 2010
    Posts:
    110
    *signed* ;-)
    That would be very nice Marrrk if you could do that for us ^o^
     
  36. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    ok just go up, still dead tired...

    but oh yeah im having the pink problem too with mountain demo, so i look towards release of update that resolves it...
     
  37. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    im getting about the same with the shockwave. but more invisible... more like faint outline of a bubble as it expands.

    so hopefully marrrk will solve the issue...
     
  38. Yokogeri

    Yokogeri

    Joined:
    Oct 14, 2013
    Posts:
    18
    Greetings :)

    I recently bought this asset and i think it works great! But there is one thing i wonder:

    Is it possible to combine FXlab's water shader with parts of unity pro's advanced water shader (The one called "FX-water4")?

    FXlab's water shaders have beautiful reflection, refraction, depth, height - but one thing that i miss from unity's advanced water is its ability to generate realistic waves and make them colide in a realistic way with objects and shores (make the water flow towards the beach and afterwards retract back into the sea). What would be the easiest solution to approach this? Some hints would be appreaciated since i'm relatively new to writing shaders! :)

    Altough, before answering my first question, the most important one before it would be: Even if i would somehow manage to mix them, would FXlab's water shaders work correctly on a surface that shifts at real time in editable wave shapes?

    Thank you!
     
  39. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Heya Marrrk,

    I wasn't exactly sure by your earlier reply; do you intend to add color correction, levels and contrast post processing (if possible) to the asset? It'd be extremely useful for any project.
     
  40. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    maark im running late on the things i said i would get you showing issues with underwater and shockwave

    someone already mentioned shockwave so for now look there

    its just holidays and ive been busy on other stuff

    regardless happy thanksgiving/holidays
     
  41. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Hi,

    to fix the shockwave problem: Delete the FX Texture Assigner component attached to the Shockwave GameObject, it will automatically readded and will work as expected, that worked for me and was persistent.

    To the GLES2.0 Problem:
    I added FXLab 1.0.0 into the asset as a fallback option until I found the core of the issue.

    @IanStanbridge: What I meant with one texture was exactle that what you described, internal this is what will be done (even in 1.0.0).

    @Kirbychwan: I can add those, but my top priority after the 1.2.0 release would be the gles fix, maybe I can convince my partner (who works on the thermal view plugin) to write those. After the fix is done I am ready for those too.

    @Yokogeri: The FXLab water has no mesh deformation (vertex shader) but it can be added, either by vertex shader, tesselation shader (DX11) or real dynamic mesh manipulation. Also the water supports flow textures, which doenst help you with waves crushing and repelling from the land, but its a nice to have. Maybe I will add mesh deformation (VS oder TS) in the future, there is currently nothing which prevents this feature.

    The FXLab water is a surface shader, so changes on the geometry should work well with most f the FXLab waters features (except the reflection which is always based upon a plane, but you possibly wont see any artifacts, excepts when you add bigger surfer waves).

    @im: The shockwave error has been mentioned above in my post, the underwater effect just lacks a distortion texture assigned to the material, I fixed this in the coming update.

    I uploaded the updated big sample scenes for FXLab 1.1.x:
    Project Files Island Scene
    Project Files Mountain Scene

    I also uploaded FXLab 1.2.0 into the asset store, which should be accepted next friday, with following changes:
    • Fixed shaders (no longer are there dx11, opengl ps3, eg. errors)
    • Update check for new versions (will be performed once each Unity start and will display a notification about the availability of a new version)
    • Unity Pro check (activating the next point will require something the notification will tell you about)
    • Unity Pro support (FXLab will switch to native RenderTextures when possible which will remove the performance drop due to Unity Free restrictions)
    • Chromatic Aberration PP Shader
    • Sepia PP Shader
    • Blur PP Shader
    • Fixed some sample scenes
    • Fixed some warnings
     
    Last edited: Nov 29, 2013
  42. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    wow thanks! :D

    to express my sincerest and deepest gratitude for your hard work on our behalf here is an invader zim moment just for you

     
    Last edited: Nov 29, 2013
  43. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    Project Files Island Scene

    Assets/IslandSceneAssets/Scripts/WaterSplash.cs(21,39): error CS1061: Type `FPSWalker' does not contain a definition for `oldMoveDirection' and no extension method `oldMoveDirection' of type `FPSWalker' could be found (are you missing a using directive or an assembly reference?)


    im guessing change oldMoveDirection to moveDirection...
     
  44. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    I will tell my colleague about this error, he made the scene and should know why it broke. Sorry for the problems that made.
     
  45. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    ok still having problems with island demo

    when i first run it i get:

    NullReferenceException: Object reference not set to an instance of an object
    SceneIntro.Start () (at Assets/IslandSceneAssets/Intro/Scripts/SceneIntro.cs:46)

    basically its because Weapon_Sniper is set to None

    i guess he has to add a bunch of if statements to see if null...

    still it does not work i have to disable SceneInto component

    then i spawn, but cant move the camera in x/y so i can move on ground but camera always looking forward and i cant look around using mouse....
     
    Last edited: Nov 29, 2013
  46. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Did you import both elements into one project (Weapon_Sniper is not present in the island scene)? My colleague told me that he didnt test this case, so better import everything into a single project.
     
  47. im

    im

    Joined:
    Jan 17, 2013
    Posts:
    1,393
    that what i did everything in a single project, but then i had to fix 2-3 dup files, i renamed the 2nd one to end with 2 and it then compiled, mountain sort of almost works with latest release but island looking around does not work and going underwater gives like blue screen until you walk out...

    i'll play with it more tomorrow... its 6:51 am est and ive still not gone to bed...
     
  48. nukeD

    nukeD

    Joined:
    Feb 12, 2009
    Posts:
    405
    OK, here is another idea: Lens!! There are a lot of Dirt Lens effects, but all of them require PRO. So what do you think? Dirt and Anamorphic?
     
  49. Cyrien5100

    Cyrien5100

    Joined:
    Oct 17, 2012
    Posts:
    145
    Hi Marrk, you do a very good job :)
    But what about the ssao and the ssr ?
    I can add an idea : screen space shadows (same technique as ssr)
     
  50. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    @im: The scene I uploaded is bugged as hell, I told that my colleague and he promised me to fix it ASAP, I think I will reupload it in around 3 or 4 hours.

    @nukeD: Its possible, to do, maybe not the same quality, but possible. Anamorphic seems to be just a lensflare and glare effect based upon the demo webplayer I have found. And the dirt effect looks just like a dirt texture which only is visible before bright spots of the scene. There is more behind this, but that's how I would naively implement such effects.

    @Cyrien5100: SSR and SSAO are still on my list, but the gles bug is constraining my worktime on it, but as long as I have no access to such device (I will get access to it in 1 or 2 weeks). I can work on such "side projects". SSAO is inside the package btw, but its far from beeing perfect aand hard to setup. More a beta effect.
     
unityunity