Search Unity

RageSpline - 2D Vector Graphics for Unity - v1.1 RELEASED

Discussion in 'Assets and Asset Store' started by keely, Jun 30, 2011.

  1. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Only gradient, texturing and embossing gizmos can be made local with the checkboxes under the style-section.
     
  2. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Just a quick check first: Are you calling RefreshMesh() on your object after you made changes?
     
  3. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    I had not called refresh, I see it there in the API. that fixes thinks. thanks.
     
  4. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
  5. Acumen

    Acumen

    Joined:
    Nov 20, 2010
    Posts:
    1,041
    Can't wait for the videos to get down and dirty with texturing finally !
    Anyways, congratulations on this person who talks over the videos. Super fun to listen to and learn. Very likable and pleasing voice :)
     
  6. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    John actually said that he hates his voice :), but I guess that's pretty common fallacy.

    We are leaving texturing last on purpose, because I'm very likely to be redoing how the multi-texturing is done. I found a way to do it in a way that isn't nearly as confusing as it currently is.
     
  7. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Last edited: Jul 18, 2011
  8. Acumen

    Acumen

    Joined:
    Nov 20, 2010
    Posts:
    1,041
    Yeh I was reading that with joy, that the multitexturing will be just like I imagined it to be.
    Weird to see that almost ever functionality that I wished for is almost included now :)
    So great to see this piece of software evolving into something that forces me to just do a different styled game for once !

    http://snobli.net/blog/2011/05/check-out-some-new-textures-for-snobli-run/ - that is awesome btw. Wonder how they set that all up :)
     
  9. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Seems to me they used same texture with a little bit of different scaling/positioning for each of the objects and then just stylized the outline to follow the textures on some parts.

    Then they added couple of simpler rock shapes on top of that to create some variation
     
  10. Acumen

    Acumen

    Joined:
    Nov 20, 2010
    Posts:
    1,041
    I think you could include pictures like these on the ragespline page to display what kind of stuff people make with your tool. Always a nice seeling point for software like yours !
    So people can see a wide variety of games that incorporate your tool in one way or the other.
     
  11. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    I found a problem using RefreshMesh() at runtime. If I call RefreshMesh() in Update then OnTriggerExit() is not fired by the spline. neither on the spline object nor the trigger object. OnTriggerEnter() seems OK. I have not tested OnTriggerStay(). I may try making a PseudoTiggerExit() from stay and enter as a work around.
     
  12. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Thanks for the info. I'll try to figure out what is causing this. What if you call refreshMesh on LateUpdate() ? It shouldn't matter, but worth a try.
     
  13. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    Just tried and also in fixedUodate. Exit trigger still did not fire.
     
  14. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Ok so here is what I found out so far:

    Currently when you call RefreshMesh() it always regenerates the MeshCollider. When MeshCollider is regenerated, the OnTriggerEnter() is actually called over and over again, because Unity considers this a new MeshCollider instance. OnTriggerExit() gets lost (I assume that it's not allowed to fire right after OnTriggerEnter()).

    I need to make something like a RefreshMeshLite() for the next update, where it doesn't try to refresh physics at all and assumes they aren't changed.

    Currently it seems that if you want to change the shape of the MeshCollider constantly run-time, you can't use triggers. I think you could use the boxed-physics option this way, though.

    If you were only changing the appearance (colors etc.), then triggers should work fine after I make the new RefreshMeshLite() or similar available, which doesn't touch the physics at all.

    Are you willing to betatest for this?
     
  15. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    RefreshMeshLite sounds yummy :)

    So, yesterday I've worked hard to finish what I call the "resolution-independence" support of RageTools and it's now 100%! :D You can change the screen size, the object size or the object distance from the camera and the "visible" anti-aliasing width stays the same. Toggle the "LOD" (level-of-detail) option and the contained ragesplines vertex density is increased or decreased on the fly to adapt to the shape size on screen, you can watch in the profiler in realtime as it reduces the polycount as the objects are scaled down! It's really a thing of beauty, I'm eager to make a video and show it to the Unity world. Damn you scarce free time.. :)
     
  16. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    How is the performance overall now? Do you have mobile platforms to test on?
     
  17. iisjreg

    iisjreg

    Joined:
    Mar 25, 2011
    Posts:
    101
    Aaaah! This is painful. I need RageSpline so bad (in a crack cocaine sort, not an actual necessity sort) and now RageTools AS WELL!

    You two are my new dealers...

    You'll have my money soon :)
     
  18. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391

    Yes I would gladly betatest.
     
  19. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Yesterday I went crazy and bought a cheap virtual server instance. I'm trying to make some kind of simple multiplayer proof-of-concept with the webplayer. RageSpline powered of course. I'm doing the server-side stuff with Java. Maybe releasing the source code in a blog post if the solution ends up being robust enough.
     
  20. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    I've only got some minor performance problems (past RageSpline 1.0) in the animation component, I've still got to run the profiler in the same scene with different RageSpline versions to check if it's not my imagination though. As for mobile devices I've only tested it on the Android, there was no performance loss for the text generation itself - which has a fast mode which only replaces the meshes instead of re-generating it from the splines - but I'll have to test the Auto-AA component and see how it performs. On the desktop, it only slowed down when deeply zoomed in, and that was before I've added a max density setting. Now all you have to do is limit density to 7 or 8 so that it doesn't go to some crazy 14 or 20 level. One thing I want to add is the option to define the update interval of the mesh re-generation, this will let the developer fine tune the expensive refreshmesh calls relative to how fast / how much a certain object scale up and down for instance. It's also possible to run the Auto-AA routine only when the resolution has changed, or during the scene load. Those'll probably be the most used options and can be set on a group basis - for instance, you can have a certain element running Auto-AA dynamically for a resizing UI element, and leave it fixed for the rest of the scene.

    Wow, we should make a game together some time! :D
     
  21. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Got kerning to work on RageText today, you can adjust it dynamically and even animate it (using the default Unity animation editor) for some nice vector text effects :)

    Keely, I've noticed you have no "copyAllPoints" method in your RageSpline API. Basically I'm dodging instantiation of objects as much as possible, to avoid any performance drops, this I've made RageText characters copy pre-generated meshes in what I call a "quick mode". To be able to use Auto-AA on dynamically generated text this won't be an option though, so I have to actually "copy" the ragespline from the font's character to the display character, thus the need for a copy method. It's not especially hard to code in an extension method to do this, I'm just wondering if creating all the points in a copy process would actually perform better than instantiating from a prefab (which is much easier from a coding standpoint). Any idea?
     
  22. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Copying points to existing RageSpline is faster than instantiating a new GameObject from prefab, but I'm not sure if that's what you're even asking?

    Copying might be nice addition to API. You could easily code that on top too so I gotta think if that's really necessary to add to the API itself.
     
  23. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Yep, that's what I asked. I've made it work with instantiate for now, I'll try the copy points strategy for optimization later. BTW Keely,the reason why I'm not using styles for Svg import right now is because it overrides the functionality of both BulkSet (ie. Line width adjustment) and AutoAA. Could we have a "style lite" API option to only inherit texture settings, fill and outline colors?
     
  24. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Good point. I think adding "local antialiasing" check to the actual GUI makes sense, because yes people will eventually scale objects with the same style and need different AA widths, even if they don't do it run-time.
     
  25. TimB

    TimB

    Joined:
    Jan 19, 2011
    Posts:
    65
    While using RageSpline I find myself Scaling objects in the Inspector a lot more than I use to. I have heard that there is a performance hit if you scale too many objects inside Unity. It is recommended to do scaling on import, but since we can't do it on import with RageSpline I was wondering how much I should be concerned about this. I also think I read somewhere that Unity Physics can have some strange issues on scaled objects.

    Has anyone done any testing or had any experience with this? Should I even worry about it?

    I glanced through the RageSpline API and it doesn't look like it would be too hard to create a utility where you can select a scaled object, for example (0.25, 0.25, 0.25) and have it create a new object exactly the same as the old except with a (1,1,1) scale. Pretty much the same as a "Freeze" function in 3d modeling packages. But, if there really are not any issues with it, then I won't worry about it.

    Any thoughts?
     
  26. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    For purely performance reasons, I think the difference is so small that it doesn't really pay off to be religiously unscaling stuff.

    From run-time coding standpoint, it makes sense to keep the scale in 1,1,1 to avoid one more confusion along the way.

    Just my two cents.
     
  27. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    Are children with colliders, of RageSplines destroyed at start up? I mean completely destroyed when I press play they go away and are not there when I press stop. they have been deleted from the scene. an empty child seemed buy but when I added a box collider it destroyed with extreme prejudice.
     
  28. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    This is possible yes. Seems that Ragespline is trying to make sure that box colliders it created are cleared away and now it's doing a "too good" job with that.

    I have to check this out and I'll add a fix for the next update. I'll send you a beta in couple of days with all the fixes I've been talking about.
     
  29. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    That's only for re-scaling polygonal geometry. If you create your objects to-scale inside RageSpline (ie. in editor time) you won't suffer any performance hit, after all the inspector transform/scale will be at 1,1,1. If you re-scale your object during play time then you're subject to the same problem as any polymesh, but the hit is minimal so I wouldn't worry much about it.
    I had already added a "center pivot" component to RageTools, to allow centering the pivot point to the bounding box center of imported vector characters. It's trivial to adapt it to center the pivot at a reference game object, I'll do that. As for nested scaling, you're right, it's the source of all evils in Unity development - I've had my fair share of problems with it to know that. I'll definitely consider adding freeze-rotation and freeze-scale options to the toolset, good point. ;)
     
  30. flim

    flim

    Joined:
    Mar 22, 2008
    Posts:
    326
    Can I use this to make something like Jelly Car?
     
  31. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I think something similar could be made, but it's going to need a lot of coding and know-how on top of the RageSpline API.
     
  32. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    @keely


    Hi,
    I found quoted post on page 3 of your old thread, but there are 28 pages on that thread and 7 pages on this thread, it will take me all night to go through these threads and find out if you eventually implemented this feature :)
    Did you? :)

    I just started using Rage Spline tonight... well, started with those videos on your site. Want to replace some of the blocks in my prototype with Rage Spline shapes to see how it goes. Good stuff
     
  33. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I didn't implement what I said, but I have plans for something quite similar (not the same) for v1.2. Something to make the texturing more intuitive and less Photoshop anyways. I like it how RageSpline makes iterating with game or level design super fast and fun. I'd like to do that for texturing too. I'll put out some video or screenshots when I get my ideas technically solid and working.

    I might do a longer post soon. Just like the .plan #1 I did after the v1.0 release.

    I said there that I'd do quad sprite, but I think performance wise a sprite quad is worse than more complicated textured object if you have a lot of alpha. Atleast in mobile where I being told that fillrate and overdraw is the bottleneck, not the amount of verts or triangles.

    Good luck with your project. Come here or e-mail me if you run into any walls.
     
    Last edited: Jul 25, 2011
  34. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
  35. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Not to mention that's not a concern at all for a PC ;) Worst thing for sprites is the amount of memory they take, especially the large ones - or even smaller ones if you try to make detailed, 60 FPS animation. Been there, done that.

    Vectors, in the other hand, are made of very low memory-footprint data, and animating vertices don't require completely storing the whole data again like 99% of the sprite solutions.
     
  36. backer

    backer

    Joined:
    Mar 7, 2011
    Posts:
    20
    oops, don't want to offend you ;)

    we made a 3D iPad game a couple of months ago and ended up with some performance issues, and now we are creating a 2D game for iPhone 3Gs so just want to make sure we don't corner ourselfs.

    In about 4 weeks we should have the first couple of levels with all items in place, can give feedback then about how's it going then =D
     
  37. backer

    backer

    Joined:
    Mar 7, 2011
    Posts:
    20
    Having a question about texturing.

    I've created a landscape and what I'm looking for is to have a texture with some gradient for the actual ground and this works great. But we also want to add a texture for the Outline with a transparent texture of grass. Tried RageSpline multitexture or using multiple materials but can't really get it to work.

    Is it doable? If it's some tips how to get it to work would be great.
    thanks
    Backer
     
  38. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Multi-texturing in current version is a bit complicated and this is an issue that I'm aware and working on improving. I already have a version which makes it more straightforward, but it still needs some beta testing before release. I'm also going to update the docs to include texturing stuff and John is doing a tutorial video later on.
     
  39. monster1197

    monster1197

    Joined:
    Aug 6, 2010
    Posts:
    19
    can you make animations with rage spline objects?
     
  40. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Currently you can animate via code with access to RageSpline API. Later on you can use Unitys animator too if you get MaDDoX's upcoming RageTools, which is a 3rd party extension to RageSpline and will cost separately.
     
  41. monster1197

    monster1197

    Joined:
    Aug 6, 2010
    Posts:
    19

    is there any tutorial on this?
     
  42. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    I am very sorry to trouble you again, Keely...

    But just get v1.1 and I got a question - I would like to build animation (rigidbody - one bone per vertex and skinning (couple bones) with those splines)... Is it possible?

    Or how it can be done? May be I should write my own extension?

    Or Maddox did may be made it already?

    BTW, when we got Maddox release? :)
     
  43. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    No tutorial or code examples yet for the API, sorry. They are on my TODO-list which is unfortunately a mile long currently. You can get somewhere by reading the API documentation:

    http://ragespline.com/docs-api/

    The basic idea is:
    1. Get a reference to IRageSpline interface of your object with GetComponent
    2. Do something like move points with SetPoint()
    3. Call RefreshMesh()
     
  44. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    No problem. That's why I'm here :)

    I have admit that I know absolutely nothing about bones or skinning or how they work in Unity. Maybe MaDDoX can shed some light on this subject, because afaik he does animation for a living.

    That it always a possibility. I'm sorry that the API docs are still basically non-existant. After I get the next update out I'm working on them.

    Better he answers these.
     
  45. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    You can add the whole Unity infra-structure for bone deformation programatically, I just warn you that it would be a heck of a lot of work. Even then, if you want to re-generate those weights on a frame-by-frame basis (which might be the case if you want any kind of dynamic curvature change in the spline) you'd most surely suffer from slow performance. The dynamic/adaptive nature of vectors are their #1 advantage imo, that's why RageTools focus on exactly *expanding* that, giving you, for instance, auto-adjusting anti-aliasing width that adapts to whatever output resolution you're using and even the size of the shape on screen. RT's animation component, called "Magnet" follows this same phylosophy, you keep the full vector flexibility (working in tandem with Auto-AA and the other RageTools components) and can define your "influence area" interactively - think painting weights using spheres - and completely independent of the actual output resolution of your mesh.

    It's taken long I admit, but it's close to a happy ending now :) Closed beta should be up next week, then it'll be just some bug-ironing days before prime time! I know I'm late with videos and all but as Keely can testify those take time to do right (and are more adequate as tutorial material) so I'm focusing on getting things done and stable. Meanwhile, here goes another cookie for ya all, a screenshot of the new custom inspector (for now only on RageTools Group, which merged PathList and BulkSet in a single streamlined interface) and the game-changing "RageText" in action. RageFont characters imported flawlessly using RageTools SVG-in, of course, and yes - I can type whatever numbers I want in that field and the vector text updates dynamically, respecting kerning and spaces! ;D

    PS.: If you don't get excited by that.. I'll say for sure that you've never tried to build a standard GUI in Unity :)
     

    Attached Files:

    Last edited: Jul 26, 2011
  46. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Nice see how things are progressing MaDDoX :)! Don't worry about things taking time. It's the nature of the beast. And documenting/videos are a lot of work. Not always fun either. I'm just finding out that myself.

    You might want to know that I made a new version of RefreshMesh. You can skip the triangulating with it. This increases performance of RefreshMesh() (according to my FPS stats) to something like 2-3x from the old, depending on the vertex count.

    Triangulating is the one thing that is taking most of cpu time in RageSpline now. Atleast with objects that go over 100 splits in vertex count. The used time of the algorithm isn't linear, but it grows exponentially with vertex count. You don't need to triangulate if you don't move the control points.

    Also I think you can call that lighter version even if you have moved some points slightly. Let's say you are doing those animations. I don't think you need to triangulate every frame at all. Maybe every third or fifth or who knows how much. You could make it adjustable.

    I would also distribute those calls to different frames with different RageSplines so that they wont all go RefreshMesh on the same frame. Easiest way is some kind of randomness, but you'll figure it out.

    This is ofc for later improvements. I wouldn't do this on your v1.0.

    edit: I sent you a new build with pm
     
    Last edited: Jul 26, 2011
  47. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I've added grid, styles and texturing to the documentation.

    NOTE: The part about multi-texturing is refering to the future update so don't get confused if the features aren't yet available!
     
  48. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    It takes way more than that to get me offended. Just ask my Mrs :).

    I was more worried not to offend you. If II said like "HAVE YOU EVEN BUILDED ON DEVICE?!" it might make someone mad and I was just trying to help out.
     
  49. backer

    backer

    Joined:
    Mar 7, 2011
    Posts:
    20
    Is there any plans for this update? We are in full blown production and the texture part is a major for us.

    To make it look really good we need working different textures for outline and fill.
    Also a feature that would be great is to be able to change the anchor position of the outline so when changing the offset for a specific point it works both out and in (able to use is as example grass up or gravel down).
     
  50. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I'll send you the current beta via private message.

    What you describe with point specific offset is not currently available and I think you should start considering creating separate RageSplines for complex decorating. Try doing the grass with a spearate RageSpline on top of your underlying landscape etc.