Search Unity

ex2D v2 - Fast and Elegant Sprite Engine for Unity

Discussion in 'Assets and Asset Store' started by johnny_karas, Aug 19, 2013.

  1. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704


    ex2D v2 Beta Released!

    Hi Everyone,

    We are happy to announce ex2D v2 Beta is released! It's been a very busy year for us that ex2D development was tremendously distracted. We're finally settled all the distractions and now get back to the ex2D development full time!

    For more details about the coming back, please read this blog post.

    What's New in ex2D v2

    • New core render that's 20% faster.
    • Customizable batching strategy.
    • Static batching groups defined in runtime.
    • 2D Scene Editor optimized for 2D game development.
    • Team collaboration optimized asset pipeline.
    • Intuitive layer system for rendering order control.

    To learn more about new features and changes please read the v2.0.1 Beta Release Note.



    ex2D v2 Beta

    ex2D v2 is in free beta! You're all welcome to download the package and give it a try!

    ex2D Beta Package

    Important Notice on Compatibility
    ex2D 2.0 is NOT Compatible with projects created with ex2D 1.X! Do not import ex2D 2.0 package into your ex2D 1.X project! It will break everything if you insist doing that.

    Once we are more sure about the work flow and assets pipeline, we may be able to write migration tool so you can have your ex2D v1.X project upgraded.

    Links


    License

    ex2D v1.X license will carried over for ex2D v2. Means all ex2D users will have free update to ex2D v2.

    Once ex2D v2 is in a stable state, we may raise the price with the official release since it will have much more components by then.

    ex2D v2 is now delivered with source code available.

    Since the source code is for everyone now. We have other cool benefit for Pro license holders: We are now opening our development Github Repo to all ex2D Pro users. Pro users can fork the repo and get the latest update to ex2D development at any time! (probably weeks or months before official release) Not to mention you can always merge your code changes with the latest ex2D code updates. If you feel like contribute your code you can also send us a "pull request" so we can merge your code and share it with all ex2D users.

    We also change the per-seat policy for Pro license. Now one Pro license grants 5 seats.

    You can get more information in ex2D Store.





     
  2. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Create An Animated Ninja Scene With ex2D v2.0 Video Tutorial:





     
  3. steinbitglis

    steinbitglis

    Joined:
    Sep 22, 2011
    Posts:
    254
    Will Ex2D continue forward and compete against the native Unity 2D tools in Unity 4.3?
     
  4. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi steinbitglis,

    We will continue developing ex2D v2.+. We don't know what is the feature Unity's Native 2D tool will provide at the end, so I believe we still need our own tools for special request.

    We will try to integrate Unity's 2D working pipeline if it provide interface. Compare to Unity's Native solution, I think ex2D v2 is less auto-matical and give user more chance to control the assets.

    Also, we are trying to provide a GUI solution based on ex2D, the difference between the GUI we design and others is it has its own layout editor, not just place your GO in 3D scene. I believe people have use ex2D v2's scene editor and know our ability in making tools not just in 3D environment. We going to ship this idea in our GUI, Tilemap and other editor. Make them have the most proper way design the assets.

    Regards,
    Wu
     
  5. Dizamok

    Dizamok

    Joined:
    Jul 10, 2013
    Posts:
    4
  6. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Dizamok,

    Yes, the documentation still in build, and script-reference will be added late after first stable version released.

    Regards,
    Wu
     
  7. Dizamok

    Dizamok

    Joined:
    Jul 10, 2013
    Posts:
    4
    I've been using ex2D for a few days now, and I'm having trouble instantiating an exSprite at runtime.

    I'm setting up my exSprite, I saved it as a prefab, I delete it from the scene hierarchy, I start the game and at a certain point I instantiate that prefab using Unity's Instantiate method. I also set this new object as a child of my only layer (using transform.parent).
    But it seems that this new exSprite is never drawn.

    Am I forgetting something ?
     
  8. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Dizamok,

    Right now we didn't store the layer data in prefab. So when you instantiate a prefab-sprite(s). You need to manually add the sprite to the layer GameObject so that he can be rendered at the Runtime. To do this, just set the parent of the root GameObject in the prefab as the layer GO.

    such as:
    Code (csharp):
    1.  
    2. prefabGO.transform.parent = myLayerGO.transform;
    3.  
     
  9. Dizamok

    Dizamok

    Joined:
    Jul 10, 2013
    Posts:
    4
    Like I said in my previous post, I already tried that.
    Even drag&droping my prefab onto the layer doesn't work.

    The only things that seems to work to instantiate an exSprite at runtime is to drag&drop a TextureInfo onto the 2D scene editor.
     
  10. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi Dizamok,

    Sorry I'm wrong in the last post. The parent assignment for adding a sprite in a layer is only work in Editor. In the runtime, if you want to add a sprite to layer, you need to use the function:

    exLayer.Add( GameObject _yourGO );

    The reason we do this is for performance.

    Here is an example code

    Code (csharp):
    1.  
    2. using UnityEngine;
    3. using System.Collections;
    4.  
    5.  
    6. public class Test_SimpleSpawn : MonoBehaviour {
    7.     public GameObject prefab;
    8.     public exLayer layer;
    9.  
    10.  
    11.     // Use this for initialization
    12.     void Start () {
    13.         GameObject newGO = GameObject.Instantiate (prefab) as GameObject;
    14.         layer.Add(newGO);
    15.     }
    16.    
    17.     // Update is called once per frame
    18.     void Update () {
    19.    
    20.     }
    21. }
    22.  
    Regards,
    Wu
     
    Last edited: Sep 19, 2013
  11. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Just let you known, instead of add a sprite by parent, try exLayer.Add().
     
  12. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
    I'm beginning to work on a system to dynamically build atlas and textureinfo objects at run-time (for modding/quick artist pipeline turnaround/etc). Is there anything you can think of that would make this very difficult or impossible off the top of your head that I might not be seeing? Obviously I will have to lay-out and generate the textures on the fly, but if I can do that it seems just a matter of creating that atlas and texture-info objects at run time and it seems like it should work.
     
  13. johnny_karas

    johnny_karas

    Joined:
    Sep 20, 2010
    Posts:
    704
    Hi unormal,

    I just update ex2D v2.0 beta 7 in the website. In this version, I add an Examples folder shows how to use dynamic content in ex2D. Currently, ex2D only support single texture from disk resources. To do that, you need to use the function:

    exTextureInfo.Create( Texture2D );

    We have plan in supporting generating atlas based on user resources in the runtime, but I'm afraid it won't come out recently.

    If you plan to make one before our progress, here is some suggestion:

    You need to make sure all the texture is read/write-able in the Runtime so that Texture2D.GetPixel can used for reading the pixel from resources. You have to integrate the packing function from exAtlasUtility to runtime. To make it happen, read the code in exAtlasEditor.cs in the function LayoutAtlasElements (), this is how ex2D layout and packing texture-info into atlas.

    So what you need to do can split in the steps:

    1. Load all the texture you want to pack in the runtime, and use exTextureInfo.Create() function create TextureInfo for them
    2. Create a new Texture2D as your atlas texture.
    3. Pack all textureInfo and layout them in your own algorithm, and set the x,y, width, height for all texture-infos after layout.
    4. Fill your texture pixels by the x,y you setup in texture-infos to your atlas texture.
    5. Set all exTextureInfo.texture to the new atlas texture.
    6. Release unused resources.

    P.S: For the Packing algorithm, if you read exAtlasUtility you would find MaxRect, BinTree and Basic algorithm for packing. If you doing texture packing offline, the MaxRect is great in the result, but if you adding texture one by one in the runtime, or you are not sure how much texture and how many times you need to rebuild your atlas texture, BinTree and Basic algorithm would be faster by incrementing builds.

    I hope my instruction can help you create runtime atlas packing system. Any question, let me know.

    Regards,
    Wu
     
    Last edited: Nov 5, 2013
  14. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
    Wow great, thank you very much for the detailed response. I'll let you know my experiment works out!
     
  15. colpolstudios

    colpolstudios

    Joined:
    Nov 2, 2011
    Posts:
    150
    Hi, i am willing to try out the beta free version.

    I was using another free sprite asset with my workflow in using daz studio renders to easily create game characters.

    I am using play maker asset do you support this asset?

    The figure 3d model used as a sprite is the Genesis figure rendered in Daz studio using my camera and light setup.

    topic can be found here: http://www.daz3d.com/forums/viewthread/33830/#502443

    https://dl.dropboxusercontent.com/u/150707256/sprite character/webplayer.html

    pm me if you wish more info.

    Character rendered in eight directions.

    From initial testing things are looking good, but please contact me with regard to a special request.
     
    Last edited: Dec 16, 2013
  16. unormal

    unormal

    Joined:
    Jan 10, 2012
    Posts:
    65
    Fyi, I was able to successfully build a build-time dynamic packing system, so I never need to manually pack an atlas ever again! Thanks for your help! :D

     
  17. Keshav

    Keshav

    Joined:
    Jan 17, 2013
    Posts:
    11
    @Wu Jie
    When can we expect ex2d v2?
    I am still using v1.x... And need the texture packer import feature...