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. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Hi Echologin,

    Enjoying your shaders very much!

    I'm having an issue on iOS with F-additive/fusion-fx. It's working fine in the editor, but all the colors are wrong and lots of weirdness happens on device (iPad 3). Forward rendering is enabled. both of your prefabs in the scene, no lighting.

    Here's what I'm doing :

    Code (csharp):
    1. void OnPress(bool press)
    2. {
    3.     if(press)
    4.     {
    5.         renderer.material.SetFloat("_echoHitMix0",pressedShaderMixVal); //works fine in the editor
    6.                 //Also tried the 2 lines below, but ShaderPropertiesSubmit leads to a null reference
    7.         //ShaderSet_echoHitMix(0,pressedShaderMixVal);
    8.         //ShaderPropertiesSubmit();
    9.     }
    10.     else
    11.     {
    12.         //the opposite
    13.     }
    14. }
    I'm new to shady stuff, apoligies if the solution is obvious.

    Many thanks,

    Gregzo
     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Was so hoping 1.1 would be approved in time for the weekend :(
     
  3. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    me 2 !

    anyone else who wants it now, that bought it, just PM me your invoice number and ill send the 1.1 link
    (Remember to read the readme.txt br installing 1.1, TONS of things have been renamed, and or changed )
     
  4. Voronoi

    Voronoi

    Joined:
    Jul 2, 2012
    Posts:
    584
    Thanks, I just bought the shaders (v. 1.0) and they work great! Quick question, I am currently using the built-in Mobile/Diffuse for my environment walls and floors as static objects for Lightmapping. What is the equivalent shader in your package?

    I am tiling a small texture, and it seems like your Lightmap wants to have a Lightmap in the alpha channel, which is not what I do with the built in shaders.
     
  5. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Thanks for the early access to the new version. I'm having some trouble getting the shaders to work with the Unity (Beast) lightmaps though. Can you possibly provide a brief step-by-step on it?

    EDIT: Nevermind. I think I've figured out what I'm doing wrong. Need to experiment a bit...
     
    Last edited: Apr 6, 2013
  6. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Get me on skype "echoLogin"

    Im going to make some video tutorials soon
     
  7. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Hi echologin,

    Still no luck with F-additive/fusion-fx on iOS (see message above). Email sent at echologin support. Any ideas?

    Cheers,

    G
     
  8. gregzo

    gregzo

    Joined:
    Dec 17, 2011
    Posts:
    795
    Solved in 1.1, thanks EchoLogin. Superbly formatted code, and very friendly support. Not mentioning the cool shaders...
     
  9. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Your the same person I just helped in Skype right ?

    EDIT: I guess so lol ( your post just came in )
     
  10. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Ok if your using beast light-mapping you can use any of the unlit or transparent shaders

    the unlit fastest one should work as mobile diffuse for unity lightmapping

    But this only works in 1.1 ( did i send you v1.1 ? if not PM me invoice number and i will send a link )


    EDIT: IF anyone needs instant answer to anything contact me via SKYPE "echoLogin" im almost always online.
     
  11. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    In 1.1 there is the light-map project in SampleProjects folder, uses light-probes and beast
     
    Last edited: Apr 9, 2013
  12. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    1.1 just got approved !!!!!!!!!!!!!!!!!

    If your upgrading from 1.0 please backup and read steps in readme.txt There are lots of changes

    ReadME

    I will have to update reference/docs for framework on website tomorrow
     
    Last edited: Apr 9, 2013
  13. Finjitzu

    Finjitzu

    Joined:
    Sep 8, 2011
    Posts:
    160
    Yup just logged in, good news! Can't wait to dive into this!
     
  14. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Cool any questions just ask


    New Outline\Overlay system use:

    1) Extend script/class from EchoGameObject instead of Monobehaviour

    2) Pick a material from echoLogin\OutlineMaterials

    3) Drag it to proper slot on GameObject in inspector
    ( Overlay named materials goes to overlay slot and Same for outline )

    4) In code now just use Outline ( true ) to turn on, Outline ( false ) to turn off.
    ( or check the Outline On flag in inspector and press play )

    Can use only outline, only overlay or both

    Should work on GameObjects/ Skinned Meshes
    and Objects with multiple materials on same mesh or sub-meshes.

    ** it does not matter what shader the main object is using at all **

    I will make a video tutorial soon for this
     
    Last edited: Apr 9, 2013
  15. Deleted User

    Deleted User

    Guest

    Hi, I just purchased Core Framework and I have two questions based on this paragraph in the documentation:

    1) I am assuming that EchoComponent is now EchoGameObect for v1.1.. Should I really add this component to every GameObject, or just the ones with renderers? Should I add it to Main Camera, Lights, etc?

    2) What are the the implications of not extending scripts' from EchoGameObject. I am using many third party assets and this would be complicated.

    Thanks!
    Shawn
     
    Last edited by a moderator: Apr 9, 2013
  16. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    yes EchoComponent is gone and now you can use just EchoGameObject ( they where 2 separate classes in 1.0 )


    You do not have to extend from EchoGameObject if your not using some part of framework, I personally do it in my own projects to make sure the scale is set to 1,1,1 with the fix scale option. ( found quite a few of my FBX models imported had scales of 0.99999998 when it should be 1.0, which broke batching )

    I would only put it on camera IF they have children that need it otherwise its pointless.

    There is also a way to access framework via reference w/o having to extend ( new in 1.1 )

    See Outline sample project OutlineByReference.js
     
    Last edited: Apr 10, 2013
  17. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    That scale thing that you mention is interesting. As in you could see a 0.99999998 scale in the transform inspector? Or that showed "1", but the actually scale was less?
     
  18. Deleted User

    Deleted User

    Guest

    Maybe this is just my complete lack of knowledge, but I am not clear on what constitutes using the framework. I read somewhere earlier in this forum topic that you must add an EchoComponent (now EchoGameObject) to every GameObject that has a lit shader. I am not using Core's effects or object pooling, but I am using lit shaders. Am I using the framework?

    Thanks,
    Shawn
     
  19. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Like in my robothead app tons of the children objects are 0.9999999 or 0.9999998
    when i do the fixscale option I go from 50 drawcalls to around 9.

    Also you can use it if you want one object scale at 2,2,2 ( or anything other then 1 ) and still batch with others that are 1,1,1 in this case ( if Fix Scale is checked ) it will remake mesh and scale colliders so they are all 1,1,1 scale
     
    Last edited: Apr 10, 2013
  20. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Ok if you want to use the premade shader effects, object pooling or functions of EchoGameObject then extend from that otherwise it is not needed

    If you want to use just shaders

    the only requirement is Putting EchoCoreManager in scene.

    and EchoCoreManager is only required if you are using EchoGameObject OR any of the LIT Shaders

    I will be on skype in a few hours
     
    Last edited: Apr 10, 2013
  21. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Can you explain how to use the flashlight shader? I don't see an example or anything in the docs. Is it a projector shader?
     
  22. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    This is pretty interesting. I have problems all the time with position - e.g. I'll set something to sit at Y=5.0 and later when I come back to it, it's at Y=4.99999998 or something. I always assumed it was just something to do with float inaccuracy that was too complicated for my brain to understand. On position, it doesn't affect me too much. I haven't paid huge attention to the scale on child objects though... definitely going to now as having even the slightest variation would kill batching as I understand it.

    So I'm guessing this fix scale thing of yours just goes on the parent object and automatically flows down to all children?
     
  23. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    only if you have the Add Children thing checked

    What i would do is run app see if any scales are off then just add the EchoGameObject to ones where it is not 1

    It is a float error but it seems it happens more for some people then others.

    Ive seen other peoples projects where it NEVER happens then others where tons of objects scale are skewed to some fraction

    I wonder if the modeling program has anything to do with this
     
  24. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Hi,

    Can you explain how to use the flashlight shaders?
     
  25. Finjitzu

    Finjitzu

    Joined:
    Sep 8, 2011
    Posts:
    160
    Does the Add Children toggle also register the LIT children objects for the EchoCoreManager? Or should I still add EchoGameObject to each child object?

    Another question. Can I register an object with EchoCoreManager on instantiation? Right now, my pooling instantiates the objects to be pooled on Awake. Also when the the pooled object isn't used I switch it off with .SetActive(false), is this a problem?
     
    Last edited: Apr 12, 2013
  26. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078

    Sure,

    Make a Material
    Choose Flashlight Shader
    Add a Directional Light source
    Add EchoCoreManager to scene, check directional light option ( should be on by default )

    Now the objects using flashlight shader will have a round beam/ spotlight where directional light
    is pointed. ( size can be changed on material/shader properties in inspector )

    This shader also works with beast lightmapping

    PS: If you want i can make a sample flashlight project, and send it to you just PM me your invoice number
     
  27. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    You can choose the Add Children option it will add EchoGameObject to all children,
    but if they are not using effects or any part of framework this is not necessary for lit shaders to work.

    EchoCoreManager just does some math and sets keywords so lit shaders can do less and be faster

    If the object being instantiated has EchoGameObject on it, it should just work
    then you can get access to the EchoGameObject like this below.

    EchoGameObject ego;
    ego = go.GetComponent<EchoGameObject>();


    There is a GameObject pool manager built into framework that handles all this automatically
    See Sample Project -> ObjectPooling
     
  28. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    I just finished fixing a few bugs, big one in light probe shaders
    Also added a simple flashlight shader project

    if anyone wants latest PM me invoice# and i will send link

    I plan on submitting 1.15 monday with fixes
     
  29. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    More echoLogin excitement

    [video=youtube_share;FX95GkWz980]http://youtu.be/FX95GkWz980

    This is about 3000 feet from where I live, National guard evacuating people in lower areas

    So if i can not answer a support email in next few days, please do not freak!

    We live on top of ski hill so it will not flood here, but I do not know if electric will stay on
    or net, They are not letting people leave right now ( or enter area )

    I wish i bought tons of beer. ohh well

    Hospital , Floods whats next ? lol
     
    Last edited: Apr 19, 2013
  30. Finjitzu

    Finjitzu

    Joined:
    Sep 8, 2011
    Posts:
    160
    Holy crap, hope everyone is ok!
     
  31. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Yeah we live on higher area, so we just have to worry about electric, net and water going out.

    Just surreal seeing stores and homes we drive by everyday under water.

    Weirder was when we went to look at night, most of the lights are still on in places under water
     
  32. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Finally back at office, water went down a few feet and streets open again finally. Back on the job!

    what im working on for next update

    Falloff option for point lights
    Adding in EchoCoreManager where you can enter # of point lights 1-4
    3D Eye look at script that uses UVSets ( no extra drawcalls )
    EchoGameObject will use less ram in most cases
    Combine Children option for EchoGameObjects
     
    Last edited: Apr 21, 2013
  33. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, can you add glow.
     
  34. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    You can make things glow with the new Outline system

    Can you show me a image of the effect your looking for ?
     
  35. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  36. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  37. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    I'd like to see echoLogin's take on Toon shading... just saying........ :)
     
  38. meta87

    meta87

    Joined:
    Dec 31, 2012
    Posts:
    254
    Yes pleasee :D
     
  39. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    That will be in version 1.2 ( toon shading )

    ( gotta get 1.15 out b4 this, has many bugs fixes and a few new things )
     
    Last edited: Apr 23, 2013
  40. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Last edited: Apr 23, 2013
  41. meta87

    meta87

    Joined:
    Dec 31, 2012
    Posts:
    254
    Awesome!
     
  42. NisseHult

    NisseHult

    Joined:
    Apr 25, 2013
    Posts:
    1
    We recently replaced the built-in shaders with those in the Core Framework but unfortunately we're having some issues with lightmapping.

    The attached image shows several planes with different shaders. The ones circled in red are using built-in Unity shaders (Transparent/Diffuse and Transparent/Cutout/Diffuse) who behave like expected and the other two are using Core Framework shaders (echoLogin/Unlit/Cutout/Discard-Color and echoLogin/Transparent/10-Fastest). As you can see the cutout shader doesn't take the alpha into account at all and the transparent shader looks like it's inverted when lightmapped.

    $IMG_25042013_174218.png

    Is this something that will be fixed in an upcoming version?
     
  43. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Can you Private Msg me a link to that project ? and i will fix it asap

    or add me to Skype if you have it , skype name="echoLogin"

    =============================================================

    On another note here is a demo of new Eye Class ( Work in Progress, will be in next update )
    All eyes use one drawcall, all can move and look at something independently
    Nothing actually moves or rotates in eye, you just draw eye in modeling program ( can be flat, curved, anything ),
    map texture so pupil is centered. Extend from eye class then in script just call EyeLookAt ( Vector3 )

    Eye Demo Link
     
    Last edited: Apr 26, 2013
  44. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, can I request to add shader that has lightmap and reflection.
     
  45. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Beast light-mapping ? or just light-mapping where parts on dark areas can be lit ?
     
  46. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    both if possible. Most reflective shader will override the diffuse/lightmap so we lose the lightmap, I want it lightmapped properly.
     
  47. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Yeah its possible to do both, just might be a week or more
     
  48. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Can you also add in shader with emissive texture. Found that I need that.
     
  49. echologin

    echologin

    Joined:
    Apr 11, 2010
    Posts:
    1,078
    Yeah i been thinking about those too, ill add it to the "to do" list
     
  50. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Just noticed that my script to call a dissolve effect no longer works since updating to the 1.1+ version. Did something change that might stop this working? Here's the code that I use, which worked previously:


    Code (csharp):
    1.  
    2. public class Dissolve : EchoGameObject
    3. {
    4.     public void DoDissolve()
    5.     {
    6.         EchoFXEvent efx;
    7.         efx = EchoFXEvent.Dissolve_echoShader(this, -0.5f, 1.5f, 3.0f);
    8.         efx.StartDelay(2.0f, null);
    9.     }
    10. }
    11.