-->
Starscene Software
Home Utilities Fractscape Contact
 

More demos

------

 
Try Tank Zone — it’s a retro Battle Zone remake, with increasing numbers of tanks that’ll keep you on your toes! The complete project is included when you buy Vectrosity.

Also check out the line drawing demo. Lines can be any number of pixels thick, and there’s an option to fill in corners.

Finally there’s the scribblecube demo, which fills the screen with hundreds of rotating, glowing line segments.

 

How it works

------

 

Vectrosity uses a mesh-based solution, with a separate camera overlay. This is handled automatically and is transparent to you, the user. Once the line is drawn, it stays on-screen permanently until changed or removed. To make a simple line, just call the VectorLine.SetLine function with a color and at least two points:

    VectorLine.SetLine (Color.white, Vector2(100, 50), Vector2(250, 120));

If you want more options, you can make a VectorLine object. First create some points in a Vector2 or Vector3 array, which can be any size up to around 16,000 elements (Vectrosity uses screen space for 2D coordinates and world space for 3D coordinates):

    var linePoints = new Vector2[ Vector2(0, 0),
                                  Vector2(Screen.width-1, Screen.height-1) ];

Then make a VectorLine object, giving it a name, the points, a material, and the line width in pixels (there are more optional parameters, but these are the basics):

    var myLine = new VectorLine ("Line", linePoints, lineMaterial, 2);

Then draw the line:

    myLine.Draw();

Presto, you have a 2-pixel-thick line that extends from one corner of the screen to the other. You can update the points and call VectorLine.Draw again whenever you like. You can also pass the transform of an object to Draw in order to move or rotate lines without having to recompute them.

This is just the start...there are lots more options and functions available to make things easy and to accomplish various effects. Vectrosity is written in C#, but you don’t have to know C# to use it, and the complete functionality is available in any language.

 
 
The best solution for drawing vector-based lines in Unity! Vectrosity has much more control and flexibility than the LineRenderer, plus it's better than GL.LINES and doesn't need Unity Pro. Draw all sorts of vectors, grids, graphs, and just plain lines, fast and easy, in 2D or 3D. Version 2.2 now available! You'll get an update notice if you bought an older version. Get Vectrosity now
 

Vectrosity

  1. Works with iOS and Android (does not currently work with Flash)

  2. You can make hundreds or thousands of separate lines, each with its own color and width, with only one draw call.

  3. You only need to update lines when they change, so static lines take no extra CPU time.

  4. Continuously redrawing lines every frame is still fast, with low-end computers updating over half a million line segments per second.

  5. You can draw anti-aliased lines without needing FSAA, or make lines glow without needing Pro-only full-screen image effects.

  6. Make 3D vector objects that behave like regular game objects. Can be used for various special effects, like the x-ray demo (right).

  7. Can draw points, too.

  8. Extensive user’s guide and reference guide to all functions.

  9. Includes many example scripts and scenes, and the complete project for the retro Tank Zone vector graphics game is included free!

demo2
demo3
import Vectrosity;

var lineMaterial : Material;
var textureScale = 4.0;
private var selectionLine : VectorLine;
private var originalPos : Vector2;

function Start () {
    selectionLine = new VectorLine("Selection", new Vector2[5], lineMaterial, 4.0, LineType.Continuous);
}

function OnGUI () {
    GUI.Label(Rect(10, 10, 300, 25), "Click & drag to make a selection box");
}

function Update () {
    if (Input.GetMouseButtonDown(0)) {
        originalPos = Input.mousePosition;
    }
    if (Input.GetMouseButton(0)) {
        selectionLine.MakeRect (originalPos, Input.mousePosition);
        selectionLine.Draw();
    }
    selectionLine.SetTextureScale (textureScale, -Time.time*2.0 % 1);
}

Get Vectrosity

------

 

The indie version of Vectrosity is just $24.95, and you can use it in as many projects as you like. The source code isn’t locked away in .dlls, so you can alter it as you see fit. (Though a .dll is also included if you'd rather use that.) The only thing you shouldn’t do, of course, is redistribute it — I have to eat and pay bills somehow! The pro version of Vectrosity is $49.95. You should buy this if you’re representing a company rather than an individual, or are a pro user in some capacity (how “pro” is defined is up to you), or are just feeling generous. The functionality is the same for both versions. All updates are free.

Click one of the buttons below, and you’ll be taken to a secure page where you can pay through PayPal (account not required), using any currency, and get your copy of Vectrosity in seconds (eCheck payments will take longer to clear). Please make sure your email filtering allows mail from starscenesoftware.com. If you're using a Gmail address, or your ISP uses Gmail as their email provider, the mail may be classified as spam, so please check your spam folder on your webmail page.



Also, check out FlyingText3D for a great way to use dynamic 3D vector text right from TrueType fonts!


Feedback

------

 

Questions, suggestions, comments? You can use the Contact page on this site, or better yet leave a message in the Vectrosity topic on the Unity forums.

 

Customer quotes

------

 

What do people think about Vectrosity? Here's a sampling of some actual unsolicited customer feedback. Some of it's from email, and some of it was posted on sites such as forum.unity3d.com and answers.unity3d.com:

“I bought it myself and while it is super-cheap, its much, much better than what I feel like doing. I have over 20 years of game development code experience and yet buying a vector line solution was the smartest move I've made for a long time.”

“20 minutes in and I already have my GPS route lines working. It "Just Works", my mind is blown.
I just bought two copies of Vectrosity. This is not an error or a double billing.
I bought a copy, then had a look at the docs. Full of pictures and code examples, with great formatting and clear-as-day explanations. The documentation for the $10,000 audio middleware I use at my day job is so awful that I swear it exists only to sell support contracts. So paying twice your asking price is the least I can do. It's people like you who make me want to come home after a 12 hour day, and spend 6 more playing with Unity.”

“I do appreciate the constant and superb customer service. :)”

“Great product and GREAT support! It has saved hours even days of my time.”

“having plenty of fun with the examples, its great to see so many!”

“It's been pretty sweet making this UI/HUD in Vectrosity. Just access Vector... and POW! HUD!”

“Just a quick line to congratulate you for your vectrosity lib. ! . It is really the very first cost-effective piece of SDK I have ever bought (and I ve been in the industry for +20 years ! ). It really does what it says on the can ! :) It saved me days of coding .”

“Vectrosity is awesome and every developer should buy it immediately. (Why is the price s low?)”

Selection box example

------

 

Here’s a complete script example of a selection box using Vectrosity. It uses the uniform-scaled texture functionality for animated dashed lines. Try it now, by dragging out a box below.

 
import Vectrosity;

var gridPixels = 50;
private var gridLine : VectorLine;

function Start () {
    gridLine = new VectorLine("Grid", new Vector2[2], null, 1.0);
    MakeGrid();
}

function OnGUI () {
    GUI.Label (Rect(10, 10, 30, 25), gridPixels.ToString());
    gridPixels = GUI.HorizontalSlider (Rect(40, 15, 590, 25), gridPixels, 5, 200);
    if (GUI.changed) {
        MakeGrid();
    }
}

function MakeGrid () {
    var gridPoints = new Vector2[((Screen.width/gridPixels + 1) + (Screen.height/gridPixels + 1)) * 2];
    gridLine.Resize (gridPoints);

    var index = 0;
    for (x = 0; x < Screen.width; x += gridPixels) {
        gridPoints[index++] = Vector2(x, 0);
        gridPoints[index++] = Vector2(x, Screen.height-1);
    }
    for (y = 0; y < Screen.height; y += gridPixels) {
        gridPoints[index++] = Vector2(0, y);
        gridPoints[index++] = Vector2(Screen.width-1, y);
    }

    gridLine.Draw();
}

Grid example

------

 

Here’s another complete script example of a dynamic grid using Vectrosity, where a GUI slider controls the pixel size of each grid square. Try it out now by dragging the slider, below.

 

Vectrosity: US$24.95

Vectrosity Pro: US$49.95

 

Starscene Software