Search Unity

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

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

  1. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    This sounds really really cool. I suppose if the only thing we're doing is something like adjusting the AA width all you need is the "lite" refresh mesh, since it doesn't really need more vertices, it only needs to move existing ones. If you're updating the mesh density then yes, you'd use the full-blown refreshMesh(). Even then, having an user-adjustable update interval was already meant as a basic feature of RageMagnet, now it'll be possible to perform the light refreshMesh during these interval frames. Red hot :)

    Gotcha. Smart and Intriguing idea for a future update indeed ;)

    Update: Today I've added the RageText inspector interface and basic (with filler spaces) alignment functionality, left and right already working. Snapping it to the RageText boundary is next. Screenshot:
     

    Attached Files:

  2. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    I am finding on an iPad app if I Instantiate or activate a RageSpline my app stalls. This activating a single 72 vertex RagesSPlie (I 10~20 other RageSplines already active in the app). I put
    Code (csharp):
    1.  if (!Application.isPlaying){
    around the destoryImmediate, refreshMesh and RefreshPhysics in the RageSpline Awake() and the frame rate no longer has a noticeable drop. This does mean I had to be careful to make physics in editor and I could see it would make working without the auto generate on awake inconvenient for most users who don't instantiate or activate spline objects during active parts of a game on mobile device. Still I am hoping you can offer I way to disable the autorefresh when create physics in editor is on.

    BTW on my iPhone4 it runs smoothly with 18 splines all moving and colliding with each other. Works but very jerky on an old 3G, I don't have a 3Gs for testing.
     
  3. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I sent you latest beta with private message. Report back if you are able to test it.

    edit: ok sorry read again what you wrote and latest beat wouldn't help you on that Awake() vs. physics.

    I could disable the refresh on awake if it's created in editor just like you already did. Thanks for the tip.
     
    Last edited: Jul 26, 2011
  4. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    I'll check the beta for the other points I had mentioned earlier. After working a while with my modified version of Awake(), I can say you'll want a bit of code to protect users from them selves if they turn on no autogenerate physics/mesh. It was frustrating finding all the objects I thought I had generated physics for but had not. If you switch a style to in editor generate it generates a collider for that object but not other objects using the same style.

    I would suggest one or both of
    1)checking for collider when autogenerate is off and putting an optional debug warning up if it is found. ( like EZGUI does )
    2) having a menu script under tools that goes through all RageSplines and generates in editor physics as appropriate.
     
  5. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Yeah. I was going for the bulletproof approach with refreshing everything in Awake() before it turned out as performance problem. Now I need to think things a little differently and thanks for the tips and the work!
     
  6. onllm

    onllm

    Joined:
    Mar 4, 2011
    Posts:
    111
    hi how easy is it for me to incorporate images that i made using external tools into your system?Like if i already have a vector art can i use your system to import it
     
    Last edited: Jul 27, 2011
  7. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Not supported in RageSpline, but with MaDDoX's 3rd party extension called RageTools (sold separately and soon to be released), you can get SVG files imported as RageSpline objects.
     
  8. onllm

    onllm

    Joined:
    Mar 4, 2011
    Posts:
    111
    Do you know when it will be out? the ragetool. And is the objects created in RageSpline compatiable with Itween for animation and movement etc. Or is there some better way i can animate those objects etc? thx
     
  9. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    The release date is up to MaDDoX. Try reading this thread backwards a few pages and hopefully you get a better idea on how the animation works with the RageTools and how the tool is progressing. As far as I know he is releasing it soon and he has said that the animating works with Unitys own animation editor.

    There is a RageSpline API to get straight code access to the shapes so I guess you could hook up iTween to that too pretty easily.
     
    Last edited: Jul 27, 2011
  10. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    MeshCollider is covering all sides.
     
  11. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Sorry for clogging up RageSpline's thread keely, I'm starting to agree with iByte's early comment now :) Hopefully the fact that both products are made to complement each other justifies the occasional confusion, but soon enough I'll get a new page with info, screenshots, etc for RageTools up and that'll make "redirection" matters much smoother.
     
  12. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Just bought that tool. Looking forwart to see it. Keep up the great work! :)
     
  13. ProjectOne

    ProjectOne

    Joined:
    Aug 9, 2010
    Posts:
    442
    Hi keely, I guess you are busy now testing Rage Spline under Unity 3.4 ?
    I had in my scene the Rage Spline asset folder and just on rage spline square, the rest is what I had before (not rage spline stuff)
    in 3.4. there was yellow warning message about a obsolete guy thing in rage spline. I didn't need rage spline in that project right now so i got rid of the rage spline square... warning still there... then got rid of the Rage Spline folder and the warning went away. Again very minor thing suggesting to check the documentation for an updated command... surely you are on top of this
     
  14. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I installed 3.4 few minutes ago and noticed the warning. Since it's only warning and everything seem to work ok, it's not a huge priority now. I think it's part of the Asset Store rules not to submit stuff that raises warnings so I guess I need to fix it too :)
     
  15. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    How can I select multiple vertices?

    Its absolutly necessary to be able to select multiple vertices with mouse selection box. I can suggest to make Ctrl + LMB selecting multiple vertices. Right now its very annoying that Ctrl creates new vertex because I'm using Ctrl for snapping alot, and I have a habit to first press Ctrl, and then move objects. Although it would be nice if the grid will have a subdivision.

    And I'd like to see vertex mode with node conrol points hiden and autoaligned to make properuniform outline. I realy need it for making shapes from straight curve segments without having to manualy adjust the control points every time I moving the nodes to have the appropriate outlines.

    The connections between two shapes looks kinda glitchy if they aligned in one line, because antialiasing edges are overlaping their alpha is twice as bright at that corners as the rest of the line.
     
    Last edited: Jul 28, 2011
  16. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    There is currently no such feature. This has been requested by several users and it's definitely something that I'm working on for the next major update (v1.2).

    If I understand correctly, you are referring to Cubic splines. This is also something that I originally planned to implement for the current v1.1, but decided to leave it for later updates.

    I can see what you mean. Maybe the fill part needs an offset setting too or maybe a checkbox to contract it automatically the amount of AA width. I have to think about this problem more to say anything specific about how I should go about fixing it.

    About the schedule for v1.2, I'm against setting public release dates, but FYI the last update v1.0 -> v1.1 took me two months. I haven't started work on v1.2 yet, because focusing on the documentation and fixing v1.1 bugs.

    I'm downgrading my dayjob to part-time starting next week so I can work on RageSpline more. Hopefully this will accelerate the development.
     
  17. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Thanks for the answers.

    That's what I meant when I was talking about the connection glitch:


    And here is some more problems:


    The spline1 is the source spline. On spline2 I added one node. You can see the collider no longer matches the geometry. After deleting the last added node, spline3 should look like spline1, but it changes it's vertex count again and nodes around deleted node are changed their location.

    In my opinion, instead of defining the vertex count user should be able to define segmen subdivision count. That way collider will always match the geometry, and spline will always have the same detailing level.

    Deleted node shouldn't effect near nodes.

    And one more problem we can see on this picture is that grid and widgets are disappear on certain zoom level.

    And one more. :) If spline have been rotated around the Z axis, the grid starting to glitch or disappear.
     
    Last edited: Jul 28, 2011
  18. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    Keely, could you please give me the link (or the answers - i did not find them):

    1) I need to move pivot pivot (without moving the geometry itself)
    2) I need to rescale rage spline object correctly - i.e. I need the scaling goes into mesh

    Thanks!

    Btw, we manage to create a good picture - but about 1к splines required... Do you confirm that on iOS batch takes no more than 300 vertices?

    3) We need an adaptive step on the whole spline, or the number of vertices on each spline segment... :D I think now we too many vertices - and would like to reduce due to sharp corners...

    Btw, where can I read about Beak property? And may be I am blind - but I did not find any documentation about usage when import package - could you help me please? For me - this tool is quite obvious - but for artist is not - they would like to read about texturing...

    Anyway one thing is absolute neccessary - animating splines :) - I think this will allow us to move at the top of 2d game creation technology... Rigidbody (1 bone), skinning (2-4 bones), morphing :D and get on top... And we should be able to do animation inside Unity with possibility to save animation clips..

    4) I got a real life question - how to make blink eyes animation using ragespline?
    what kind of technic can be used now? :) may be any suggestions?
     
    Last edited: Jul 29, 2011
  19. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    These are not supported currently. I think MaDDoX is doing (maybe) both of these for his separate Asset Store add-on RageTools.

    300 verts is what Unity states in it's docs about dynamic batching. As far as I know the limit is set because it would be more expensive dynamically batch something that is over 300 than just use separate drawcall. I've said it couple of times and I will say it again: Drawcall count isn't all that important meter of performance anymore with Unity 3.x.

    I'm planning to research how to further minimize the amount of verts, but to be honest I don't think it's all that big of an issue for the frame rate.

    Also number of vertices isn't all that bad. You don't want to waste them, but you can do 20k+ verts with RageSpline on 3GS iPhone with 60fps easily. If you wan't to support older devices then keep in mind that everything under 3GS is something like 5% of the market and I don't think optimizing for that is worth our time.

    Did you watch the videos yet? I think the beak is explained in the video #3 and if by importing you mean "starting a project with RageSpline", then you should see the video #1. Texturing video is not yet released, sorry. There is documentation about texturing here, but unfortunately the part about multi-texturing refers to the yet unreleased update.

    I'm kind of outsourcing the animation to MaDDoX's upcoming extension. Currently the only way I would do (and have done) any kind of animation is via code and the RageSpline API. However, and I'm sorry about this, the documentation of the API is still very limited and I'm working on it.

    The basic use of API is:

    1. get a reference to IRageSpline interface with Unitys GetComponent()
    2. do something to the Ragespline like move points with SetPoints()
    3. call refreshMesh()
     
  20. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    I agree selecing multiple vertices would be nice, although for most precise vector art I'd use any of the free (and great) vector drawing programs like InkScape or DrawPlus, or their amazing (yet paid) big brother, Adobe Illustrator. Then you'll be able to import the SVG (with a user defined vertex density, ie. how many subdivisions per curve segment) using Rage SVG-In which's part of RageTools - a toolset I'm developing which's reaching beta stage next week. Also, you can transform many vertices at once using RageMagnet, the deformation and animation component of RageTools.

    #1 is already in, #2 is planned and might kick in for the initial release or not depending on how long it takes me to finish adding some features (namely gradient and polygon import) to the SVG-in support. I have high hopes to get it in very soon in any case, tbh I also need it :)

    The idea is really for our products to complement each other. Not everyone will need all that RageTools has to offer, while it also has a couple non-RageSpline-dependent features like Recenter Pivot and Mesh-based text generation. I also talk to Keely on a regular basis to make sure our features roadmaps don't conflict, this way everybody wins :)
     
  21. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Seems like Unity 3.4 doesn't crash anymore if you remove MeshCollider component via code. If you flipped between MeshColliders and none/boxed, I threw a warning in the console that you need to remove the component by hand. Now the crashing bug is gone and I can remove it automatically. Very nice!
     
  22. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I can't regenerate this. Maybe you are using perspective view? Always use orthographic camera when editing RageSplines. Check out the very beginning of the documentation or the video #1 about Unity camera setup.
     
  23. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Seems that Unity 3.4 handles prefabs and gameobjects a little differently now. If you generate RageSpline from and prefab and make a duplicate, they are connected and moving a vertex on other moves it on every instance. It's a nice feature and you don't need to use styles if you wan't every tree to be in the same shape.

    However I don't currently have any idea how to break the connection to the prefab.

    edit: Well now I know. You need to remove the MeshFilter (it's autogenerated back) if you wan't to separate the two meshes.

    edit2: So it seems it has nothing to do with prefabs, but shared meshes. The behavior with RageSpline and Unity 3.4 isn't very logical now and I need to address this somehow.

    edit3: What I just wrote might only matter if you have one of the beta versions. I'm too lazy to check.
     
    Last edited: Jul 30, 2011
  24. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    Hi

    I bought Ragespline recently and it keeps making Unity crash. I have an object that so far only uses the drifter script included in the package and sometimes when I run the game(in the editor) it crashes.

    It's kind of weird because sometimes it crashes and others don't but when it always crash is when i duplicate an object created with ragespline and not only in my scene but in the templates too.

    Other thing is that always when i save the scene i get this message: "Cleaning up leaked objects in scene since no game object, component or manager is referencing them
    Mesh has been leaked n times.". I don't know if it has anything to do with my problem.

    Regards.

    EDIT: here are the settings of the object:

     
    Last edited: Jul 31, 2011
  25. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I was getting the leaked message too, but I think it's now fixed with Unity 3.4. I could never figure out what caused it, but it didn't cause any crashes for me and nobody else has so far contacted me about Unity+RageSpline crashing. Which version of Unity are you using? Do you have any crashes without RageSpline?
     
  26. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    That was fast... I'm using the 3.4 version. I had the problem before upgrading Unity too.

    I haven't tried with a new project, do you think it could help?
     
  27. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Can you send me a project that crashes or walk through some actions that most likely crash it. If I can't recreate the crash on my end, I can't really fix it.

    edit: I'm also sending you latest beta version so check out your private messages from the "notifications" up there from the Unity forums menu.
     
    Last edited: Jul 31, 2011
  28. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    I was never a big fan of updating Unity versions right after a new release (it's caused me pain in the past), but especially now that I'm about to wrap up RageTools beta this new version crashes and unexpected (undocumented?) behaviors are especially daunting.. hope we can get around these issues ASAP.
     
  29. Kondor0

    Kondor0

    Joined:
    Feb 20, 2010
    Posts:
    601
    EUREKA!

    I found the source of the problem. It's an incompatibility with the BatchEdit plugin, you can't have both in the same project.

    Why? i don't know but it came to me because i had this same problem with Locomotion before (locomotion crashes in the initialization if BatchEdit is in the same project) so I tried with an empty project and it works ok, the same for my old project when i removed the plugin.

    BatchEdit is a real time savior in projects with lots of objects but it has these serious incompatibility problems so better people be careful if they work with it.

    Thanks and regards.
     
  30. Ryuuguu

    Ryuuguu

    Joined:
    Apr 14, 2007
    Posts:
    391
    My two problems
    1)RefreshMesh causing triggers not to fire
    2)Colliders on children of RageSplines being delete on play
    are both fixed by the beta using
    1) use- RefreshMesh(true,false,false)
    2) it just works™

    Cheers,
    Grant
     
  31. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Ok it's very good know that RageSpline wasn't the main culprit. These kinds of crashing problems - especially now that the new Unity is out - are most likely the nastiest bugs out there.
     
  32. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Good to hear that your problems are now gone.

    I can see you are calling the new RefreshMesh with refreshNormals=false. It's fine, it won't break or anything, but if you are moving the control points and start getting artifacts with anti-aliasing or something like that, you should considering calling that every once in a while with refreshNormals=true.
     
  33. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    This is the reason why the latest beta currently fills the console with errors if you run the Uphill Rage example project.
     
  34. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    Hi, there! I just purchaced RageSpline yesterday. This thing is just awesome, it's going to solve a big roadblock for me. So thanks a big-old-bunch for your hard work. I'm looking forward to giving RageTools a try as well in the near future!

    However I think I found some odd behavior in the editor on my Mac and Macbook Pro (running OS X 10.6.7).

    In the Scene View, I've placed a Line prefab. When I click once on a spline Point (Magnet?) I notice that it appears to toggle th eresulting outline from above the baseline to below. Click once more, and it reverses the process. I checked on the handle coordinates in the inspector by setting the Coordinates variable to World or Local, and sure enough, the coodrinate for the points swaps from the bottom set of boxes to top, and vice versa. It also doesn't appear to matter which tool I have selected at the time, clicking the Point still produces this result.

    Now, this may be intentional, but it struck me as an unexpected behavior. This behavior occurs in both Unity 3.3 (iMac) and 3.4 (Macbook Pro). Am I over reacting here, or is this something anyone else has experienced as well?
     
  35. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I think this behavior is already fixed for the next update, which is currently in beta testing. I'm sending you private message ("notifications" in the upper forum menu) with a link to the beta version. Try that out and see if the problem is gone.
     
  36. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    Looks like that fixed it for me! Thanks for the link!
     
  37. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    I'm working with ortographic view. But I found the solution. This problem occures when spline have Z <= 0, and view is zoomed to approximately (in my case) 4x6 meters. On this zoom level scene grid dissapears too, obviously it's caused by scene view camera's near clipping plane passing beyond 0 Z.


    Now I have the worst problem.. The Style contains vertex count and physics split count. But I'm using the same style to make the terrain parts with absolutely bifferent scale, like 100 times bigger or smaller.

    The best solution, in my opinion, would be to make the vertex and physics split count relative to number of nodes. As I see, this feature already was requested.

    I appreciate your work. Good luck.
     
    Last edited: Aug 1, 2011
  38. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Can you use RageSpline to create deformable terrain?
    How would you go about splitting the terrain up if you dig right through it?
     
  39. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I guess you could and I've been thinking about trying to implement that sort of behavior as a proof-of-concept. To achieve digging you need add and move points. I'm sure there are multiple ways to go doing that, but I guess you'd just add three new points in the position you are diggin and start moving the one in the middle away from the digger. You need check if the nearby points already exists too and stuff like that. It's not simple.

    Splitting the terrain is even more complex. It's not trivial to split one spline into two, but I can't see why it wouldn't work. A lot is dependent on the accuracy you need.
     
  40. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Is there a minus operation you can do by overlaying 2 shapes and getting the result in points? Something like that would be hugely popular I'm sure.
     
  41. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    You mean boolean operations like in this picture?

    Nothing like that is currently available and from the top of my head it's not too easy either. Atleast API has everything needed for 3rd parties to extend this sort of functionality. If I can't make it, maybe others will and hopefully share.
     
  42. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    Yes exactly like that. You can use it like in the old worms games where explosions cut out circles in the terrain. Hopefully a feature like that can be added soon.
     
  43. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    Kelly,

    We need at least scale tool - cause its impossible to work without it...

    Could you do please couple of lines:
    - add 3 numerical fileds and button scale - when set up values - then scale goes directly to vertices...

    Second tool is anchor point... Or just make please 3 numerical edits and button apply - and this translation goes directly into the mesh...

    Thanks!

    Without this its almost impossible to use this tool...
     
  44. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    I agree that would be extremely interesting, but wouldn't it be more intuitive to use raster graphics like bitmaps for this kind of effect?

    I had a "deformable" terrain idea for a game I'm working on, but I'm going in a little bit of a different idea: I was imagining animating the Points on a terrain to achieve a kind of "ripple." Perhaps some heavy object slams to the ground, and wave propagates outward, away from the impact. Seems like a group of 3 points traveling away from the origin that deform the terrain should achieve the visual effect.

    On the other hand, I have read soemwhere that deforming a collision mesh in this manner could be trying on the processor on mobile phone platforms. Also, with RageTools still on the horizon somewhat, I wonder if the effect can be achieved using iTween or some similar plugin.

    Anyone have any experience with using RageSpline in this way? [goes to try and prototype this]
     
  45. iisjreg

    iisjreg

    Joined:
    Mar 25, 2011
    Posts:
    101
    I like! I want! Whatever it takes :)
     
  46. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    Heh, such enthusiasm. I'll post my progress when/if useful progress occurs.
     
  47. etoiles

    etoiles

    Joined:
    May 13, 2008
    Posts:
    216
  48. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Looking good. I'm putting it on ragespline.com as featured game. I'm sure don't mind :)
     
  49. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    Marc, I played this one. It was cute and fun! Nice puzzle game! Ran flawlessly on my iPhone 4.
     
  50. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    Kelly,

    We need at least scale tool - cause its impossible to work without it...

    Could you do please couple of lines:
    - add 3 numerical fileds and button scale - when set up values - then scale goes directly to vertices...

    Second tool is anchor point... Or just make please 3 numerical edits and button apply - and this translation goes directly into the mesh...

    Thanks!

    Without this its almost impossible to use this tool...
     
    Last edited: Aug 3, 2011