Search Unity

AltSketch Graphics Library (C# FreeType port, GUI, Vector Graphics, etc.)

Discussion in 'Made With Unity' started by AltSoftLab, Jul 25, 2014.

Thread Status:
Not open for further replies.
  1. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Hi Unity community!

    AltSoftLab Team is pleased to present our .NET AltSketch Vector Graphics Library

    AltSketch on Asset Store (don't forget to read README.txt doc of package to solve integration tasks):
    1. Indie License (for Indie developers only) - https://www.assetstore.unity3d.com/en/#!/content/20601
    2. Pro License (for Professional developers and Commercial Organizations; includes source code of AltSketch Extensions) - https://www.assetstore.unity3d.com/en/#!/content/20849
    NOTE: AltSketch Unity SDK contains full source code of AltSketch Backend & Integration and not depends on any Unity release version. AltSketch Asset requirements ("Unity 4.5 or higher") set by Asset Store Administrators, but AltSketch hasn't such requirements in real.

    AltSketch Unity Asset forum thread

    AltSketch Description:

    AltSketch is a pure C# CLS compliant 100% managed, without unsafe blocks Vector Graphics Library with Software and Hardware Render Backends for Games, Scientific Applications & other uses of Computer Graphics. All core functionality collected in one lightweight library AltSketch.dll for Microsoft .NET Framework or Mono (including Silverlight / Moonlight). It depends only on System, System.Data & System.Xml assemblies (.NET Framework 2.0).

    AltSketch has System.Drawing like program interface and Software & Hardware Render Backends (solid and texure AA visual data triangulation), contains a subsystem AltNETType - port of wonderful font rendering library Freetype and subsystem AltNETImage for Image manipulations (loading, saving, transformations).

    As AltSketch has several integrations with most popular GUI systems and Mobile platforms, you can develop and test a drawing part of your 3D application/game as independent program, and then easy integrate it into your main solution. Now you can draw Graphics in 3D with Brushes and Pens like you do it with any drawing library. It is flexible and useful development method in case of main project bulking and test complexity, or useful for team development process. Now you can develop graphics part of your Mobile applications without using an emulator as stand-alone application, only running on Mobile devices (or Emulator) for final tests.

    AltSketch has Virtual File System support with Zip containers for resources loading. All AltSketch functionality & extensions works via VirtualFS and all resources can be loaded as from real file system, so from Zip containers (from files or memory streams).

    AltSketch SDK includes wide variety of open source extensions: ported to AltSketch popular libraries (GUI, Plot, GIS, Computer Science, Physics, Graphics etc.):

    - SVG.NET
    - NPlot
    - OxyPlot
    - PieChart
    - ZedGraph
    - MigraDoc
    - PDFsharp
    - GMap.NET
    - HTML Renderer
    - Box2D
    - Farseer Physics
    - AForge.NET
    - Accord. NET
    - Gwen GUI
    - Miyagi GUI
    - CeGui
    - etc.

    AltSketch SDK includes many Integration Demos with a wide variety GUI-s & frameworks (all Integrations & HW Render Backends are open sourced, so you can easily adapt it to your applications or improve it if you need):

    Unity Game Engine
    Windows Phone
    Android
    iOS
    Silverlight / Moonlight
    XNA / MonoGame
    OGRE 3D Engine
    Axiom 3D Engine
    NeoAxis 3D Engine
    Irrlicht 3D Engine
    OpenTK / AltOpenTK
    SdlDotNet / AltSdlDotNet
    SharpDX
    Windows Forms (throw System.Drawing, OpenGL, DirectX, DirectDraw)
    WPF (throw System.Windows.Media, OpenGL, DirectX, DirectDraw)
    GTK (throw Gtk.Image, OpenGL)
    Qt: Qyoto & Qt4Dotnet​ (throw Qt.Image, OpenGL)
    wxWidgets (throw wxWidgets.Image)

    Only the fist application start may take some seconds because AltSketchDemo finding system fonts. This information cached and next starts became more faster

    AltSketch Demo contains examples of AltSketch in different ways of uses:



    AltSketch Unity Vector Text Double Path Transform


    AltSketch Unity QuickFont


    AltSketch Unity SVG Transformations


    AltSketch Unity OxyPlot


    AltSketch Unity Geometry Polar Transform


    AltSketch Unity GMap.NET Interactive


    AltSketch Unity Gwen Skinned


    AltSketch Unity HTML Renderer


    AltSketch Unity Geometry Bilinear and Perspective Transform


    AltSketch Unity Pie Chart


    AltSketch Unity MigraDoc


    AltSketch Unity PDFsharp


    AltSketch Unity AltNETType


    AltSketch Unity Geometry Boolean Operations


    AltSketch Unity NPlot


    AltSketch Unity Accord.NET


    AltSketch Unity AForge


    AltSketch Unity RenderBox


    AltSketch Unity Box2D


    AltSketch Unity Farseer Physics



    Johnny,
    AltSoftLab Team
     
    Last edited: Aug 23, 2014
  2. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Additional Screenshots:

    AltSketch Unity Font Atlas


    AltSketch Unity Vector Text Outline Transformations


    AltSketch Unity Clipper


    AltSketch Unity SVG Outline

    AltSketch Unity ExtBrush


    AltSketch Unity ZedGraph


    AltSketch Unity Miyagi GUI


    AltSketch Unity CeGui


    AltSketch Unity SVG


    AltSketch Unity GMap.NET Online Big Map Maker


    AltSketch Unity
     
    Last edited: Aug 16, 2014
  3. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Last edited: Jul 30, 2014
  4. xiongmaoboshi

    xiongmaoboshi

    Joined:
    Mar 15, 2012
    Posts:
    44
    Hi,

    Thanks for adding Unity support! I Was trying this out, some things you should add in the readme (correct me if I'm wrong):

    - AltSketch.Unity.MonoDevelop.VS2012.sln must be build using Visual Studio, couldnt build it with MonoDevelop
    - 2 projects are referencing a missing UnityEngine.dll, needs to be set to be able to build
    - Alt.Integrations.Unity was complaining about missing backend stuff, fixed that by adding a reference to the backend project
     
    AltSoftLab likes this.
  5. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Hi rvharten! You are welcome!

    1. Why you couldn't compile in MonoDevelop? What errors? I think it's because MonoDevelop limits. Maybe it's because we compiled it with Xamarin - it can
    2. Yes of cause, UnityEngine.dll can be placed in any other place in developer environment
    3. Thanks! Fixed

    Fixed SDK reloaded

    Thanks rvharten! Please write your opinion, bug reports, feature requests. Here or on AltSoftLab (faster reply) forum

    Johnny
     
    Last edited: Jul 27, 2014
  6. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    So how are the graphics generated, is it realtime and fast like you could move and adjust lots of objects in realtime, or more of a software renderer type of thing?
     
  7. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Hi imaginaryhuman!
    All of this can be rendered in several ways:
    - Hardware Render - all the data preprocessed, triangulated, postprocessed and rendered. Text can be rendered as textures and as Vector Data
    - Software Render and then displayed as Texture - we have too fast Software Renderer. It used in some popular GUIs like WinForms, WPF, GTK#, etc.
    - HW Render To Texture - for the some not rarely changing operations can be used buffering
    - Combined SW and HW render - for the too mutch changable vector data SW Render can be used as it in many cases too faster than HW Render with triangulations and some additional data processing

    In all our integrations HW Render To Texture has been implemented. For this case in Unity Backend Unity_RenderTexture class used. For the professional and free Unity edditions we have a little hook in Unity_RenderManager for determining is Unity RenderTexture available (it's not available for Unity Free eddition). If it's not available we just use SW Render buffers.

    And of cause we use many cache systems. Triangulation caches, text textures caches, gradients caches, and many others. But we still hasn't batching. This feature will be added very soon! Too lesser render operations per frame => faster render! We are working on deffered drawing pipeling for this. And another useful thing we will add in the nearest future - is multithread data preprocesing. It's useful for many changed vector data and parallel SW render to buffers and parallel bitmap data processing (like filters, etc.). And the last thing we need is instancing. Now all vector data moved to render as new. We will implement this in the nearest future also! So soon AltSketch will be more faster!

    Of cause for the more efficiency we use compound technics. You can use HW Render to Texture if you prefer it, but there are some limitations now in AltSketch Unity Backend:
    - We still didn't implemented texture multisampling. It's need a special shader or we still didn't find a Unity standart element like DualTextureEffect in XNA. It's because of our our politics: we don't using any extentions in our Backend realisations; only standart communly used features; it's to prevent any limitations to AltSketch user
    - Because of premultiplied alpha. The problem is of transparent data rendering to transparent RenderTexture. In this case you get some visual artefacts then when render this texture. The result will be darker or more transparent than if you render data dirrectly to the target screen. But if you render to not transparent RenderTexture (for example, to White backbuffer) the result will be ok. So if you know that you draw on not transparent you can use HW Render to Texture. It can be managed in the drawing code by Alt.Sketch.RenderImage.SoftwareRender property per each buffer (you can scan these uses in AltSketch SDK).

    So we prefer to use SW Render buffers now for buffering. But HW Render to Texure is available. You can enable this in Unity_RenderManager constructor by disabling line 'RenderToTextureSupported = false' et the end of constructor.

    And the best efficiency in the hands of AltSketch user (like in the hands of any Graphics Library user). For example if you want to draw the same moving circle, it's prefer to change Matrix translation and draw circle in the same place, than draw circle in different places. It's because of triangulation cache usings. If you changing just Matrix the same triangulation data used to draw render primitive. In another case new triangulation process started.
    And use buffers (Alt.Sketch.RenderImage) in the case of rarely changed data.

    All our integrations are open sourced so you can look in all Backends realizations

    Best!
     
    Last edited: Aug 17, 2014
  8. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
  9. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    AltSketch is on Asset Store (don't forget to read README.txt doc of package to solve integration tasks):
    1. Indie License (for Indie developers only) - https://www.assetstore.unity3d.com/en/#!/content/20601
    2. Pro License (for Professional developers and Commercial Organizations; includes source code of AltSketch Extensions) - https://www.assetstore.unity3d.com/en/#!/content/20849
    NOTE: AltSketch Unity SDK contains full source code of AltSketch Backend & Integration and not depends on any Unity release version. AltSketch Asset requirements ("Unity 4.5 or higher") set by Asset Store Administrators, but AltSketch hasn't such requirements in real.

     
    Last edited: Aug 16, 2014
  10. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Just copied discussion from another thread with useful information and new screenshots:

    Hi, cl.9!
    We don't have Unity Web Player Demo yet - coming soon. But you can play with Online Silverlight Demo, or download No Commercial SDK and play with precompiled Irrlicht 3D Engine Demo or build any other Demos (XNA, OGRE, iPhone, Android, etc.) - for all platforms corresponding AltSketch assembly provided (look at screenshots below)

    Yes

    Only AltSketch Core is closed source. We provide full source code of AltSketch Render Backend and Integration and of cause of the the Main Demo (just much scroll down the Package Contents Tree on Asset Store - you will see A LOT OF CS files - look at the last screenshot below; it's because of many data files in Demo in AltData folder and they auto placed on top of the tree - in the next releases we'll put it into Zip storage like we did it in No Commercial SDK and Silverlight Demo) - they placed in _Backend, _Integration and Demo folders. Also we provide all AltSketch Extensions source files (ported to AltSketch popular libraries - GUI, Plot, GIS, Computer Science, Physics, Graphics etc.: SVG.NET, AForge.NET, NPlot, OxyPlot, PieChart, ZedGraph, MigraDoc, PDFsharp, GMap.NET, HTML Renderer, Box2D, Farseer Physics, etc.). It requires Pro License, but you can download all AltSketch Extensions source files with No Commercial SDK and play with it for dating ;)

    Bests!

    Johnny,
    AltSoftLab Team







    CS files in Package Contents tree (just much scroll down the Package Contents Tree on Asset Store)
     
  11. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Hi bjornrun!
    The main idea of AltSketch project is to bring a useful drawing functionality (like Brushes, Pens, Drawing Graphics funcs) into Graphics Engines and extend it (like Custom Shader Brushes – ExtBrush, Vector Graphics, etc.). So you don’t need to operate with Vertex/Index data and hard vector math any more - just draw over your 3D Graphics! Many famous widely used useful libraries has been ported to AltSketch. Because AltSketch has System.Drawing like interface it was not hard (just to rename some names). Also you can easily port to AltSketch by yourself some nice System.Drawing/GDIPlus solutions and use it in your game project or also maybe you can sell it in Unity Asset Store as AltSketch Extension (like extensions for NGUI). With AltSketch it's not need to create new apropriate developed from scratch libraries that solves a trivial tasks (for example Graphs, Plots, Text Rendering, etc. - look at screenshots at the bottom - all this samples are interactive, dinamicaly generated and available in SDK). Just find usefil professional solution and try to port in (if this solution based on System.Drawing, you not need to pay too much time and efforts)!

    Yes, we would like to see too! But it's hasn't difference from any other AltSketch uses (like in XNA, OGRE, NeoAxis, WinForms, WPF, etc.)

    AltSketch has Hardware Render (to Screen and to Render Texture) and fast Software Render to Texture2D. And we working on many optimization things. AltSketch fast and soon it became more faster (read technical description below)! You can play with Online Silverlight Demo or with integration into other Render Engines by downloading No Commercial SDK.

    Unity Backend and Integration is open sourced in package. It’s very structured and simple. You can look into Backends & Integrations into other engines (by downloading No Commercial SDK). In Unity we did it in the same way. Untity Implementation does not depend on a specific version of the Unity, so AltSketch can be used in any Unity version (we didn't use any extra specific Unity functionality).

    We have Multiplatform PC Standalone AltSketch version, Android, iOS, Windows Phone 7.1-8 (you can play with it by downloading No Commercial SDK). AltSketch works in the Web version, but it’s need to update some AltSketch Extensions because of Web restrictions.

    Developing of AltSketch is a hard way of more than 3 years of work. And it will more stronger and wider in the nearest future because we are still hard working on it new functionality!

    AltSketch in work (more screenshots here and available in work in Online Silverlight Demo):

    AltSketch NeoAxis GMap.NET and CombinedGeometry


    AltSketch NeoAxis HTML Renderer


    AltSketch NeoAxis NPlot and Clipper


    AltSketch NeoAxis Accord Face Detection and Vector Text Transformation


    AltSketch NeoAxis NPlot and SVG

    AltSketch NeoAxis Awesomium Web Browser


    AltSketch OxyPlot - Tile Map Annotation (OpenStreetMap)


    AltSketch HTML Renderer - Using the Code


    AltSketch HTML Renderer - Text


    AltSketch QuickFont (Bounds and Justify) - Alignment Centre


    AltSketch QuickFont (Drop Dynamic Shadows)


    AltSketch AForge.NET Filters Demo


    AltSketch Accord.NET Kinematics Demo


    AltSketch Vector Text over 3D


    AltSketch OxyPlot - DateTime


    AltSketch OxyPlot - Polar Plot


    AltSketch OxyPlot - Rectangle Annotations


    AltSketch OxyPlot - Scatter Series


    AltSketch OxyPlot - Two-Color Line Series


    AltSketch OxyPlot - World Population


    Johnny,
    AltSoftLab Team
     
    bjornrun likes this.
  12. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    Ok I'll buy it.
    The demos seems to cover most use cases, but is there any other documentation available?
     
  13. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    We try to use SelfDocumented Naming of all AltSketch/Extensions/Demos modules (classes, structs, enums, funcs). AltSketch in most cases like System.Drawing interface with a few extensions showed in SDK Demo. "Like" means "almost compartible with a few exceptions". For the Extensions we use commonly widely used libraries ported to AltSketch. You can get any assistance here (on this forum) or on the Project Main Site forums.

    And also brief info from the Asset README.TXT:

    UNITY BACKEND & INTEGRATION
    -------------------------------------------------

    AltSketch Unity Backend & Integration files placed in _Backend & _Integration Folders. Backend solves
    all rendering operations. It includes:

    Unity_Renderer - single render context handler (like render to Screen or to Texture)

    Unity_RenderManager - common settings, textures container

    Unity_RenderPrimitive - single render data processor

    Unity_Texture - operates with Texture2D & RenderTextures


    Also Backend contains BrushMaterial-s (placed in _Backend/BrushMaterials folder). Brush materials solve
    to operate with Brush settings and move it to render pipeline. BrushMaterials includes:

    Unity_SolidColorBrushMaterial - SolidColorBrush processor

    Unity_LinearGradientBrushMaterial - LinearGradientBrush processor

    Unity_RadialGradientBrushMaterial - RadialGradientBrush processor

    Unity_ImageBrushMaterial - ImageBrush processor

    Unity_ExtBrushMaterial - ExtBrush processor


    AltSketch Unity Integration consists of 2 main objects:

    AltSketchMonoBehaviour - main MonoBehaviour class that processes all needed Unity events and render

    AltSketchScreenMonoBehaviour - inherits AltSketchMonoBehaviour and solves to process Mouse and Keyboard
    in full screen mode


    AltSketch Unity Backend & Integration is only things you need to integrate the AltSketch core functionality.
    You just need to create script, derive it from AltSketchScreenMonoBehaviour and process some event routings
    like in the way of it do AltSketchDemo.cs (we use Windows Forms events style notation & scheme):

    1. Do some initialisaion in Unity Start method:
    void Start ()
    {
    ...
    }

    2. Process some cleaning in Unity OnDestroy method and at the end call DestroyRender method of AltSketchMonoBehaviour to clean render:

    void OnDestroy()
    {
    ...
    DestroyRender ();
    }


    3. To draw something just override OnPaintBackground, OnRender & OnPaint AltSketchMonoBehaviour methods:

    a) Called first to draw background - just general scheme

    protected override void OnPaintBackground(Alt.GUI.PaintEventArgs e)
    {
    base.OnPaintBackground(e);
    ...
    }

    b) Called secondly. Here you can render something before OnPaint - just general scheme

    protected override void OnRender()
    {
    ...
    }

    c) Called thirdly. The main AltSketch foreground render method

    protected override void OnPaint(Alt.GUI.PaintEventArgs e)
    {
    base.OnPaint(e);
    ...
    }


    4. Override OnResize to process render window resizing event:

    protected override void OnResize(Alt.GUI.ResizeEventArgs e)
    {
    base.OnResize(e);
    ...
    }


    5. Override OnMouseDown, OnMouseUp, OnMouseMove & OnMouseWheel to process Mouse events:

    protected override void OnMouseDown(Alt.GUI.MouseEventArgs e)
    {
    base.OnMouseDown(e);
    ...
    }

    protected override void OnMouseUp(Alt.GUI.MouseEventArgs e)
    {
    base.OnMouseUp(e);
    ...
    }

    protected override void OnMouseMove(Alt.GUI.MouseEventArgs e)
    {
    base.OnMouseMove(e);
    ...
    }

    protected override void OnMouseWheel(Alt.GUI.MouseEventArgs e)
    {
    base.OnMouseWheel(e);
    ...
    }


    6. Override OnKeyDown, OnKeyUp & OnKeyPress to process Keyboard events:

    protected override void OnKeyDown(Alt.GUI.KeyEventArgs e)
    {
    base.OnKeyDown(e);
    ...
    }

    protected override void OnKeyUp(Alt.GUI.KeyEventArgs e)
    {
    base.OnKeyUp(e);
    ...
    }

    protected override void OnKeyPress(Alt.GUI.KeyPressEventArgs e)
    {
    base.OnKeyPress(e);
    ...
    }


    AltSketch DEMO
    -----------------------

    AltSketch SDK Demo examples located in Demo folder.

    AltSketch Demo is built on top of modified and extended AltSketch.Gwen GUI library. Each AltSketch
    example uses it's own class derived from Example__Base class. Example__Base is the Base Gwen Control.

    All examples collected in ExamplesHolder examples handler class. And finally ExamplesHolder owned by
    main AltSketch Demo class - Demo/AltSketchDemo. Demo/AltSketchDemo - is the main top level class used by all
    AltSketch integrations for unification.

    As you can see equal named AltSketchDemo derived from AltSketchScreenMonoBehaviour used just to rout all
    Unity events to Demo/AltSketchDemo object.

    In AltData folder located AltSketch SDK Demo data used in examples. All this data can be zipped into zip file,
    that can be used dirrectly by VirtualFileSystem or attached to any DLL as resource and then added to VFS.

    All addition information you need you can get on AltSketch Project Main Site and on it forums.


    Bests!

    Johnny,
    AltSoftLab Team
     
    Last edited: Aug 17, 2014
  14. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    Great I think there is enough information to use it.

    It worked directly on OSX, but on iOS the demo has the following (AOT) problem - so I need help:

    Cross compilation job GMap.NET.Core.Unity.dll failed.
    UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/PlaybackEngines/iOSSupport/Tools/OSX/mono-xcompiler --aot=full,asmonly,nodebug,static,outfile="GMap.NET.Core.Unity.dll.s" "GMap.NET.Core.Unity.dll" current dir : /Users/bjorn/Projects/Unity/testalt/testalt/Temp/StagingArea/Data/Managed
    Env: DISPLAY = '/tmp/launch-xx8ycU/org.macosforge.xquartz:0'
    Apple_PubSub_Socket_Render = '/tmp/launch-LPSVDB/Render'
    LOGNAME = 'bjorn'
    TMPDIR = '/var/folders/69/wpmrpn1d7bvglyrq3hk46d0c0000gn/T/'
    MONO_PATH = '/Users/bjorn/Projects/Unity/testalt/testalt/Temp/StagingArea/Data/Managed'
    ENABLE_CROSSDOMAIN_LOGGING = '1'
    USER = 'bjorn'
    GC_DONT_GC = 'yes please'
    _ = '/Applications/Unity/Unity.app/Contents/MacOS/Unity'
    __CF_USER_TEXT_ENCODING = '0x1F5:0:0'
    __CHECKFIX1436934 = '1'
    SHELL = '/bin/zsh'
    GAC_PATH = '/Users/bjorn/Projects/Unity/testalt/testalt/Temp/StagingArea/Data/Managed'
    HOME = '/Users/bjorn'
    GOPATH = '/Users/bjorn/go'
    PATH = '/usr/bin:/bin:/usr/sbin:/sbin'
    SHLVL = '1'
    result file exists: False. Timed out: False
    stdout: Mono Ahead of Time compiler - compiling assembly /Users/bjorn/Projects/Unity/testalt/testalt/Temp/StagingArea/Data/Managed/GMap.NET.Core.Unity.dll* Assertion at method-to-ir.c:2652, condition `method->is_inflated && mono_method_get_context (method)->method_inst' not met
    stderr:

    at UnityEditor.MonoProcessUtility.RunMonoProcess (System.Diagnostics.Process process, System.String name, System.String resultingFile) [0x00000] in <filename unknown>:0
    at UnityEditor.MonoCrossCompile.CrossCompileAOT (BuildTarget target, System.String crossCompilerAbsolutePath, System.String assembliesAbsoluteDirectory, CrossCompileOptions crossCompileOptions, System.String input, System.String output, System.String additionalOptions) [0x00000] in <filename unknown>:0
    at UnityEditor.MonoCrossCompile+JobCompileAOT.ThreadPoolCallback (System.Object threadContext) [0x00000] in <filename unknown>:0
    UnityEditor.HostView:OnGUI()
     
  15. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    These assemblies are not portable! I think for mobile platforms you need to use platform dependend libraries. You need to download No Commercial SDK and build iOS version of all AltSketch Extensions. And then use it to build iOS version. But as I said before Web and Mobile platforms can have restrictions and not all AltSketch Extensions available every where. GMap.NET hasn't mobile solutions at all. But it hasn't restrictions too. Just not processed for mobiles yet.

    We are working on portable version of AltSketch and it will be available in the nearest future (there are too many restrictions for portable configuration and AltSketch has thousands of classes, plus AltSketch Extensions). So for now you need to use platform dependent asemblies:

    Alt.Sketch.dll - for Standalone PC

    Alt.Sketch.WP.dll - for Windows Phone

    Alt.Sketch.Android.dll - for Android

    Alt.Sketch.iOS.dll - for iOS

    Alt.Sketch.Silverlight.dll - for Silverlight

    And also you need to build AltSketch Extensions to corresponding platform by using solutions from No Commercial SDK
     
    Last edited: Aug 17, 2014
  16. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Also in No Commercial SDK you will find AltSketch LGPL Extensions (ZedGraph, AForge.NET, Accord. NET, CeGui) that we can't publish in Unity Asset Store
     
  17. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    For the moment I just want to find the quickest way to get the demo project (as much as possible of it) on iOS.
    What is the steps to build DLLs for iOS? (and then Android)
    Can these be built using only No Commercial SDK? When I do rebuild all there is one GMap.Net.Core.dll but no GMap.Net.Core.Unity.dll (and it should be two version - one that works on iOS as well)
    I guess I need to choose target somehow. If there are more steps than just "build all", please describe them.

    Is it possible to get precompiled DLLs for iOS and just copy those in when targeting iPhone? Or get a demo that runs out-of-the-box on iPhone.

    Thanks!
     
  18. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Yes, you can build all AltSketch Extensions to target platforms by using only No Commercial SDK. It requires Pro License, but in current case you can feel free with this task. Just run appropriate solution and build needed libraries. But for mobiles we don't have configured solution for GMap.NET yet. If you need it, you can try to build it by yourself. Or just remove GMap.NET examples from Demo. We will try to release portable version of AltSketch and Extensions in a week. Or we will deploy binaries for all platforms. It will be announced of course - you can subscribe here or on AltSoftLab Facebook Page or on AltSoftLab Twitter or on AltSoftLab Blog RSS or on AltSoftLab News Forum to get news as soon as it becomes. I promise that we'll solve all issues as soon as possible

    Bests!

    Johnny,
    AltSoftLab Team
     
    Last edited: Aug 17, 2014
  19. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    I removed GMap.NET but running on iOS gives this runtime error:

    ExecutionEngineException: Attempting to JIT compile method '(wrapper managed-to-native) System.Threading.Interlocked:CompareExchange (System.EventHandler&,System.EventHandler,System.EventHandler)' while running with --aot-only.


    at Alt.Timer.add_Tick (System.EventHandler value) [0x00000] in <filename unknown>:0

    at b1..ctor (Alt.Sketch.Rendering.RenderManager A_0) [0x00000] in <filename unknown>:0

    at Alt.Sketch.Rendering.RenderManager..ctor () [0x00000] in <filename unknown>:0

    at Alt.Backend.Unity.Unity_RenderManager..ctor () [0x00000] in <filename unknown>:0

    at Alt.Integration.Unity.AltSketchMonoBehaviour.Render (Int32 width, Int32 height) [0x00000] in <filename unknown>:0

    at Alt.Integration.Unity.AltSketchMonoBehaviour.OnPostRender () [0x00000] in <filename unknown>:0


    (Filename: Line: -1)



    What am I doing wrong?
     
  20. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Did you use iOS version libraries? DId you recompile Demo with iOS assemblies?
     
  21. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    No, that is probably the cause. I'm not sure how to generate iOS assemblies... I just switched to iOS target in Unity editor. (and defined DontUSE_GMapNET in settings)

    I bought the indie license, is it missing iOS support?
     
  22. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    No, it's not missed. We just started to distribute by Indie License only Standalone PC version. But don't worry! We'll solve all issues! As said before you need iOS versions of all assemblies refferenced by Unity Demo. You can get all AltSketch Core assemblies from No Commercial SDK and build Extensions for all platforms. I explained for you how you can do it some posts ago. You need to build iOS assemblies with VS or Xamarin. Then you need just replace old libraries with new.

    If it's too hard for you:
    1. Tomorrow (on Monday) I'll send request to our iOS developer to create iOS version of libraries and we will deploy it in our download area. Please send e-mail to altsoftlab@altsoftlab.com, I'll write to you when it will done.
    2. In the few days we'll try to create portable version. It'll solves all tasks at all. This issue is on highest priority!
     
    Last edited: Aug 17, 2014
  23. bjornrun

    bjornrun

    Joined:
    Oct 29, 2013
    Posts:
    88
    Ok, thanks. I got a bit further, but I continue in email.
     
  24. AltSoftLab

    AltSoftLab

    Joined:
    Jul 25, 2014
    Posts:
    79
    Some useful info:

    Hi Arisha!

    Thanks a lot! You are welcome! Yes, the main Idea of the AltSketch project is "Just Draw It!". In many cases it's very unfriendful native tools to draw any data with it. It's need to create a tons of addition code with many maths. We use System.Drawing like interface because it's known for a wide variety of coders. It's nice and simple. And also there are many good solutions based on Syste,.Drawing, so it's easy to port it with AltSketch to your 2D / 3D graphics App / Game.

    1. Clipboard support coming next week with the Windows.Forms Clipboard program interface like object. Yes, we try to use common used interfaces - it's easy to adapt for users. And it's good, so no any reason to develop a bicycle!

    3. We decided to release all AltSketch Extensions as open source code (include Gwen GUI) for Indy License too to give users more flexible way to manipulate with needed components. Thanks for request.

    2. It's very easy to use custom shaders in AltSketch Brushes:

    a) Every brush has BrushMaterial realization:

    Unity_SolidColorBrushMaterial - for SolidColorBrush

    Unity_LinearGradientBrushMaterial - for LinearGradientBrush

    Unity_RadialGradientBrushMaterial - for RadialGradientBrush

    Unity_ImageBrushMaterial - for ImageBrush

    Unity_ExtBrushMaterial - for ExtBrush

    Unity Backend contains BrushMaterial-s (placed in _Backend/BrushMaterials folder). Brush materials solve
    to operate with Brush settings and move it to render pipeline.


    b) Every BrushMaterial has an event (just func) that called before Brush will be used:

    protected override void BeginRender(RenderContext renderContext)


    c) And also func called when brush can unsed its params:

    protected override void EndRender()


    d) BrushMaterial has a func that called per each RenderPrimitive to enable BrushMaterial set the params per this RenderPrimitive (for example different shader will be used for AA render and for solid render):

    public UnityEngine.Material GetMaterial(RenderPrimitive renderPrimitive)


    You can do some preparation in BeginRender and clear in EndRender. In GetMaterial you can return custom material. Example of uses is Unity_ExtBrushMaterial that is Material for ExtBrush. ExtBrush is a spetial brush type for common uses. Each Brush has a user parameters that routed to BrushMaterial (you can fine Set/GetExtParameter funcs in Brush-es and BrushMaterials). So we used this parameters in "AltSketch Unity ExtBrush" (look at screenshot below). It's not good axample because we use some Unity integrated shaders ("Hidden/Internal-Flare", "Particles/~Additive-Multiply", "Transparent/Cutout/Specular", "Hidden/Internal-Halo"). But you can use your own interesting shaders with nice effects. Just look at Unity_ExtBrushMaterial and to Demo\Graphics\Example_ExtBrush example and you will see all answers. Good luck!

    Bests!
    Johnny

    AltSketch Unity ExtBrush
     
Thread Status:
Not open for further replies.