Search Unity

CORE-Framework with 100+ mobile ready shaders [RELEASED]

Discussion in 'Assets and Asset Store' started by echologin, Dec 8, 2012.

?

What version of Unity are you using ?

  1. 3.5.x

    19.0%
  2. 4.0

    6.1%
  3. 4.1

    78.0%
Multiple votes are allowed.
  1. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Ahh ok sorry about that! mis-read. lemme know when its out ill buy it
     
    Last edited: Sep 9, 2013
  2. JayG81

    JayG81

    Joined:
    Sep 4, 2012
    Posts:
    72
    It's most likely going to be free. When it's going to be released though, I have no ETA.
     
  3. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    I'm relying heavily on AssetBundles for pretty much all content except GUI.

    I tried both possible scenarios: normal shader-inclusion in self-contained independent complete AssetBundle (the simple approach) and also "outsourcing" to a separate shared-dependency AssetBundle (the approach I'll ultimately need).

    Both works with any random custom (ie. non-builtin) shader but both don't work with CORE shaders:

    Bundle-loaded objects with materials based on CORE shaders currently show up all-black (but geometrically etc. correct) in both aforementioned scenarios, in-bundle inclusion and separate-dependency-bundle. If I do the latter scenario but prevent pre-loading the shared shader bundle, they show up as pink but this is normal, not caused by CORE (but if/when tackling this, should be useful to remember ;)

    First guess: now I can only assume there's some connection to my scene's _EchoCoreManager that's broken and needs to be re-established at runtime on bundle loading?

    Btw. AssetBundle generation and scene testing all happen in the same project. (Of course when an asset is loaded from a bundle, it's no longer associated with the in-project asset, even inside the Editor in Game View.)

    Of course, as a quick fix I could first force-include all CORE shaders in the built Android player, then upon loading such Objects, try to fix-up their "broken material" by relinking its bad shader reference to the built-in shaders. But this is a sub-optimal band-aid that forfeits the benefits of AssetBundles: first, whenever shaders get updated, users would have to re-download the entire player -- many MBs -- instead of auto-updating the cached shader bundle -- a couple KBs; plus there are "broken" / redundant / duplicate / unused resources (shaders) staying loaded in limited mobile RAM/VRAM..

    Theoretically speaking, whatever behind-the-scenes connection between the EchoCoreManager and the pre-"compiled" (or generated, not sure what's really happening when clicking "Compile All Shaders") is usually set up in a normal fully-built project should also be possible to re-connect at runtime, right? Ideally almost-automagically but hey I'm not too picky in that dept.. :D
     
    Last edited: Sep 10, 2013
  4. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    These are "Lit" shaders right ? are any light objects being loaded from asset bundle ? If so manually add the EchoLight script to the lights. ( this would be only way to tell core framework the lights exist, w/o it scene would be black ) "EchoLight.cs" is located in echoLogin/PrefabScripts.

    If this is not problem could u make a simple project to show problem. im sure i could fix it quickly

    Also msg me on Skype next time your online, i have another update of framework
     
    Last edited: Sep 10, 2013
  5. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    No I only have one directional light and it's right in the scene, not loaded via AssetBundle.. will see if I can cobble together a smaller simpler sample project.
     
  6. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    PM with demo project sent, thanks for looking into this! :cool:
     
  7. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    got it thanks , I will send you update after I fix this!
     
  8. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Ok not sure 100% what is going on when importing from asset bundle.

    but i did find a workaround

    1) Make an empty game object in scene add this script to it

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5. public class MyMaterials : MonoBehaviour
    6. {
    7.     public Material[] MyMaterials;
    8. }
    9.  
    10.  
    Drag all the materials you use on the imported objects to this array


    then in your LoadBundle.cs under line where it says if ( nuObj != null )

    add this line

    nuObj.renderer.sharedMaterial.shader = Shader.Find(nuObj.renderer.sharedMaterial.shader.name);

    ( is this the same thing you where talking about ?, still experimenting here )
     
    Last edited: Sep 10, 2013
  9. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    Thanks, well this band-aid workaround is easy to come up with but defies the purpose of AssetBundles. By binding all the materials to an empty game-object in-scene, they get built right into the player and I wouldn't need AssetBundles in the first place :D

    As I said, I could also add core shaders to "always included shaders" via Edit / Project Settings / Graphics. But Unity sells the feature of "AssetBundles capable of bundling all non-script resources conveniently" and it works with their own shaders (not just built-in like Mobile/Diffuse but also real "*.shader" source-file resources from their Standard Assets Mobile package). But it seems to not work with most 3rd-party-authored shaders out there, tried another pkg from Asset Store as well and while it "works better" it still ultimately does not get bundled as expected.

    So I made a thread in another forum for this, asking Unity to provide more in-depth docs on how to write custom shaders to work as well with AssetBundles as their own do.
     
  10. helioxfilm

    helioxfilm

    Joined:
    Apr 23, 2008
    Posts:
    259
    Hi Echologin,

    do you have any updates on the progess?
     
  11. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Yeah beta testing one now, if anyone wants it pm me your invoice # and ill send a link.
     
  12. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    AssetBundles issue resolved. Damn Unity's subtle little bugs! That stuff works great on-device, just not in Game View. Sorry should have tried that earlier, but turns out I was trusting Game View just a tad too much. Never again! It's all good, CORE shaders work fine both unlit and lit (yay even that!) on-device, tested with 2 different phones. It's all good. Sorry for the waste of time... o_O
     
  13. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Thats how we learn ( trial and error ), better safe then sorry.
    ( at least i got to mess with asset bundles which i never did b4 )
     
    Last edited: Sep 12, 2013
  14. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    This will sound crazy but ... CORE framework has a handful of foreach statements, over time such statements accumulate unnecessary garbage adding to GC overhead when the GC does run:

    http://www.reddit.com/r/Unity3D/comments/1m667q/060_fps_in_14_days_what_we_learned_trying_to/

    One in EchoPoolManager.cs and 4 in EchoGameObject.cs --- would replace them myself but then you keep updating this great package so maybe something to ponder :D stuff like this is so easy to replace, so hope you'd consider it :)
     
  15. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Yeah all but one of those are only called on startup, I meant to change the one in ShaderPropertiesSubmit
    ( just an oversight )

    All of them fixed now, i will send you an update l8r on

    -Scott

    PS: thanks for going thru my code with a microscope, found some really good things there !
    Thats better than beta testing thats Zeta testing ! lol
     
    Last edited: Sep 12, 2013
  16. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    OK of course for one-off costs doesn't really matter compared to accumulating-via-Update. Great then thanks!
     
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I should have purchased this long ago...but I didn't. Now I've got a game nearly done, with all the scenes lightmapped. Can I use these shaders without re-lightmapping each scene? (or do I get any benefit from doing so?)
     
  18. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    You could get some speed and a few more options, like spotlight/flash light, realtime shadows w/o casting more light and shadow tinting.



    BUT

    As much as I would like another sale if your almost done you might want to wait till next project
    ( or update of your current )

    You might not not have to rebake light-mapping, but I cant say that with 100% certainty.

    You could add me to Skype ( name==echologin)
    I could show you via screen share how it all works, and answer questions in real-time. If you would like ?

    Got to run out for a while but will be back online in 3 hours or so

    -Scott
     
    Last edited: Sep 13, 2013
  19. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Made some splat shaders to be used for terrain that will be in next update
    ( made for mobile )

    2 that work with vertex colors
    and
    2 that work with a control texture

    Maybe more who knows?
     
    Last edited: Sep 20, 2013
  20. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    Is there any update on the upcoming postFX's? Really looking forward to them!
     
  21. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    Yay, sounds very cool! Looking forward to playing with the splat shaders in the next update .. but like Toad I too am extremely interested in buying some form of v1.0 release for postFX as well! :D ;)
     
  22. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Doing support for framework has been taking half or more of my day recently, just taking a bit longer then I planned.

    its coming soon tho! ( postFX )
     
  23. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Don't worry guys, I'm keeping him in his cage away from modern warfare 3. He has to work day and night to finish this so you can benefit from the fastest post fx ever.
     
  24. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    I can't get my objects to reflect light. I am using the metal-reflect material, which is using 20-2Layer-2Tex-BumpMap shader. This is the one that is using on the echo login logo in the space demo scene.

    I noticed that in the space demo scene if I add another light, the echo light script is automatically added. In my scene this doesn't happen. I am not sure if I need it, but I have added the _echoCoreManager prefab and its settings are the same as the space demo scene.

    The only other hint I found in the help, is to have forward rendering on. Which I do.

    I have one point light, I even set this up identically to the sun light in the space scene. But no joy getting light on to my object. My object is on the default layer.

    If I change the shader, it does light up with reflected light.

    I could use advice on what else to check.... Thx.
     
  25. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    make sure the 1st texture has an alpha channel 1.0 alpha == full reflection 0.0 == none
    this way you can control what parts of texture are reflective.

    Also make sure

    1) Main camera is tagged as main camera
    2) if your using the Main Point or Main Directional lights set them to auto or important
    3) if you using 4 extra lights option those have to be set as non-important.

    You say your using one point light, make sure the options on EchoCoreManager have point light set
    and press compile ( look at options on EchoCoreManager in space demo )
     
    Last edited: Sep 21, 2013
  26. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thanks echologin. I didn't have the Camera tagged. The scene is now looking fantastic with your shaders :)
     
  27. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Hi, I want the "echoLogin/Light/10-Fastest" to get lights from 1 directional light and 1 spotLight. But I can't get it work with spot lights. It seems like only points lights are allowed as dynamic lights. Is there any way to achieve this? Thanks.
     
  28. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    @Echologin. I have a shameless request. I have been struggling all day to replicate your Logo in the Space demo and how the front Panel flashes on. Anything to do with graphics and I struggle. I was hoping you could give me the basic steps to achieve this. I don't need the low level details, I'll work my way through those. If you can give me a general direction, at least I won't end up wasting too much heading down wrong paths.

    My current plan is:
    1. Create 3D text in 3DS Max. (Front and back panels) (Done this bit)
    2. Apply Atlas texture to front panel. Using your fullbright.psd. (Working on this bit. Never done it before.)
    3. export as FBX
    4. Import FBX. Add to scene and apply material to front and back panels.
    5. Copy your script LogoBrain from Space Demo (Not that understand how it works yet), and adjust for my logo to get effect to work

    Any pointers would be greatly appreciated.
     
  29. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Cool!
     
  30. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    My stuff doesn't work with unity spotlights at all ( you can turn the directional light into a spotlight\flashlight in the options )

    Do unity spotlights even work on mobile platforms ?

    Right now the other lights can only be point lights. ( this may change down the road )
     
  31. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    1) Make sure each letter is UV mapped to one of the color cells on that full bright texture ( 1st darker cell of the color )
    ( might want to look at uvmapping of my model )

    2) each blinking color should be its own gameObject with an EchoGameObject attached

    3) put the logo brain script on the top parent.

    4) look in the LogoBrain script around line 60, now make sure the object names in the Find match the names of your gameobjects.
    ( or name your objects same as mine )

    If you have skype add me "echoLogin" could be more help in realtime chat
     
  32. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    I'm currently using spotlights in Traffic Racer as you can see in the video below. But currently I use "mobile/diffuse" shader on NPC cars to receive the flashlight of our car. Although it works on iPod Touch 4, I thought your shaders can handle it even faster so I can push it to 60fps on those devices.

    https://everyplay.com/videos/737530
     
  33. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    it would be possible to make framework have 2 spotlights.
    ( like option to make 4 extra lights all spotlights )

    but i couldn't even guess on a time table right now im swamped

    I will keep it in mind, sometimes lightning strikes and i think of a quick easy solution.
     
  34. rextr09

    rextr09

    Joined:
    Dec 22, 2011
    Posts:
    416
    Thanks, that would be great.
     
  35. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Ya know, I thought of a workaround that would be fast

    for 2 core spotlights how about in update do something like this

    if ( _frameTick % 2 == 0 )
    {
    dlight.transform.position = ( position of headlight 1 )
    }
    else
    {
    dlight.transform.position = ( position of headlight 2 )
    }

    _frameTick++;

    ( if the dir light has a EchoGameObject on it use cachedTransform in place if transform << faster )

    as long as your game is running at a good framerate it would look like 2 lights but would flicker a bit
    like old arcade game shadows. ( might even make it cooler having the flicker )

    has benefit of only calculating the directional light once per frame also.
     
  36. gshape

    gshape

    Joined:
    Aug 8, 2012
    Posts:
    104
    Hi Echologin,

    Thanks for this great asset, I purchased this recently and tried to import to my iOs project. It works fine while testing in editor but it failed while testing the build on the iPhone5S with iOs 7.

    I found that if the scene contains prefab "_EchoCoreManager" (No matter what settings it is), the iOS build will freeze after 60~90 secs of the game play begins. I found no error log unfortunately, it just freeze.

    Therefore, I removed the prefab "_EchoCoreManager" from the scene, and problem is gone. Yet, I need this prefab because I am going to use the Light shader from this asset.


    Below tasks have been checked.
    1. Make sure forward rendering path is selected
    2. Use opengl es 2.0 and zero pixel lights on mobile platforms
    3. I only used Light/10-fastest shader in the scene for most objects, others used Unity3D diffuse shader.

    Would you please shed me light how to fix this?
    Thank you.
     
  37. gshape

    gshape

    Joined:
    Aug 8, 2012
    Posts:
    104
    Hi Echologin,

    I guess I found the cause of problem. It is not about the prefab "_EchoCoreManager" in the scene, but the point lights.
    My project generates a path with different path section prefabs in runtime. Each path section prefabs contains 3 point lights (with EchoLight component attached). The path keeps generating by spawning and despawning those path section prefabs.

    In my test case, I kept prefab "_EchoCoreManager" in the scene, removed all point lights in those path section prefabs. The build runs fine on the iPhone now.

    Any idea please?
    Thanks.
     
    Last edited: Sep 25, 2013
  38. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Are the point lights you spawning marked as "Not Important" ?

    And on manager make sure the extra 4 point light option is selected.

    If this is not problem is there anyway you could send me a test project that shows problem ? ( via pm or add echoLogin to skype )

    PS: Thanks for buying framework!
     
  39. gshape

    gshape

    Joined:
    Aug 8, 2012
    Posts:
    104
    Thanks! Appreciate your help!

    Yes, those point lights marked as "Not Important", and 4 point light option is selected.
    I managed to create a scene that hangs on editor as well. I sent PM you the URL to download the test project. :D
     
    Last edited: Sep 26, 2013
  40. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    I am a little delayed in replying. I had few days at the beach with the family.

    I followed your instructions and it worked brilliantly first time :D Thank you very much for assistance.
     
    Last edited: Sep 26, 2013
  41. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Anytime !
     
  42. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Loading up that project you sent now. i will pm you when i find out whats wrong
     
  43. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    gshape, i fixed that bug will send you an update in a bit just need to test things a bit to make sure everything is ok after the change.
     
  44. gshape

    gshape

    Joined:
    Aug 8, 2012
    Posts:
    104
    Thank you for your instant respond!! Great support!! :D
     
  45. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078

    update sent ( has a lot of things fixed in it )
     
    Last edited: Sep 27, 2013
  46. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Hey there :)

    How soon is "soon" on the Post FX pack that you're working on? Do you have a rough idea - days, weeks, months? Really looking forward to it.
     
  47. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    154
    Hi !

    Would you be able to release a "Test" version with say one shader or dunno ? I'd like to test the lighting options offered and test performances !
     
  48. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Well its hard to say it should have been done already but support for framework has been crazy lately. ( like 6-8 hours a day helping people )

    will be worth the wait, i promise !!

    It has actually turned into a postFX maker ( will come with presets )
    but u can do so much more, could do effects I haven't even thought of !!

    Once i have something to show i will start a new thread for postFX thing.
     
    Last edited: Sep 29, 2013
  49. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    I don't see having time to make a free version of framework anytime in the near future.
    ( possible down the road )
     
  50. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    Developer support is 100% Fantastic !