Search Unity

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

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

  1. tbjod

    tbjod

    Joined:
    Feb 25, 2008
    Posts:
    19
    Hi Keely

    Yep, i can confirm this, and that the line "jumps" a little when releasing the bigger circle gizmo, reproduction steps:
    1. Create a new line from prefab
    2. Press and hold the left mouse button on the bigger circle gizmo and drag the mouse to extend the line
    3. Release the mouse button and Notice how the line "jumps" to another position
    Pretty sure i cannot reproduce this on my Windows machine.
    --OSX10.7 Lion

    Something else you want me to check, just ask :)

    Cheers
    //Tobias

    P.S.
    Wouldn't call myself a rage spline expert as i purchased it yesterday, Thanks for a great product!


    Edit:
    Seems like its also changing the current selected gizmo when releasing the bigger circle gizmo (I'm guessing its selected when its yellow) Don't have access to my Windows machine right now so a little bit hard to compare to know how it should work.
     
    Last edited: Aug 12, 2011
  2. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22
    I noticed this with the current v1.1 release of RageSpline on Snow Leopard. Keely supplied me with a beta version in which the jumping line issue was fixed.

    Dunno how that affects Lion, though. I've been holding out on Lion because of compatibility with other applications. :)
     
  3. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I have the latest stuff (1.1.9) submitted and waiting for approval for the Asset Store. Maybe I wait if it gets approved and then when I'm 100% sure everyone has the same version, we can start to narrow the problem down.
     
  4. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967


    Added some eyecandy to the graphics and made some physics parameters available for my new RageSpline powered multiplayer driving game qRally.

    http://kiili.org/qrally
     
    Last edited: Aug 12, 2011
  5. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    If you mean that for programatic changes / animation, in full honesty I think it'd be quite useless. What'd be the difference between using a dictionary (gives key, get value) and this? :?

    If what you want is to move a bunch of points around, be it by editing the mesh or animating it, RageTools allow you to do that in an artist-friendly way. Basically you have a collider (by default using only its shape, but it can obviously be taken advantage for gameplay as well) which defines the influence area of the "RageMagnet", and you have a min radius of effect where it's 100% effective for points translation, decaying to 0% at the collider radius. You move the Magnet and every shape that is grouped with it get its points deformed smoothly. If you've even used or seen any 3D-sculpting program like zBrush you already know what it does.

    Now, for arbitrary shape selection of points you currently would need multiple RageMagnets which might be a performance bottleneck. For the selection of multiple points I find RageSpline would be the "right place" for the improvement, Keely already said he intends to provide it in the near future. Although, like I said, point tags wouldn't be of much use, in my opinion having "point groups" in RageSpline would be great, relatively easy to implement and very helpful for both standard RageSpline and RageTools. And nothing would stop you from having a 1-point group, aye? :)
     
  6. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Houston we have a problem! RageSpline deletes ALL children with box collider! Is that fixed in new version?

    Although there are many error messages about using Destroy instead of Destroy immediate and vice versa, in rage spline script.
     
    Last edited: Aug 13, 2011
  7. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Asset Store now has new 1.1.9. Do you have this problem with that or with older versions? This should be fixed with 1.1.9
     
    Last edited: Aug 13, 2011
  8. BODYPRINT

    BODYPRINT

    Joined:
    Jul 14, 2009
    Posts:
    7
    Hey guys, I bought RageSpline today and started a new project.
    It's an awesome tool !!

    I came across a pretty serious bug. I don't know if it's been reported yet.

    If I create a landscape object and then create a MeshCollider, when I change the landscape bottom depth value, Unity will crash out.
    If I Remove the collider object first, it's fine.

    It's not unworkable, but I can see myself falling into the trap fairly regularly.
    Hope you guys can fix it fairly quickly.

    Cheers.
     
  9. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    Yes it fixed, thanks.

    I think there is no point of having local vertex count without local physics split count unless you not using physics.
     
  10. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    You are first to report this, because the latest version is very fresh (24h). I can confirm that yes it seems to crash Unity just like you described. I'll start investigating and hopefully get a update out there asap.
     
  11. bralexlabs

    bralexlabs

    Joined:
    Jul 31, 2011
    Posts:
    22

    Oh yeah, all of this sounds very cool and I had no idea what was going on behind the scenes. I couldn't call myself an expert on these tools, either. Ultimately I'm more interested in seeing meaningful feature additions that don't jam up the weight of the code or decrease performance.

    Don't get me wrong. You're right that there is no semantic difference between and index and a name-value pair. The reason I asked for it is because 1) I'm totally self-taught, and so wind up reinventing the wheel a lot, 2) I work in web 40 to 50 hours a week, so I'm more used to name-value pairs, and 3) i only get to work on my stuff late at night after staring at a computer screen for 8+ hours a day, so my brain gets pretty fried when I'm trying to bend it around logic of nested for-loops 3 levels deep. I'm so used to jQuery that when I actually have to work with Arrays and Loops it starts to get kind of scary for me. :p

    And so, for purely organizational purposes (rather than programmatic ones), I thought maybe a named point would make it easier for me and one or two others to keep track of their logic. Maybe I should just learn to program instead. :\

    Can't wait to see what else RageTools will have to offer. :)
     
  12. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    It seems that the new RageSpline 1.1.9 and Unity 3.4 crashes if:

    1. You have MeshCollider + Create in editor selected
    AND
    2. Type in values with keyboard

    Very weird bug and I have to investigate further. In the meantime you could try to input values with mouse instead or switch Create In Editor off while you are poking values.

    EDIT:

    Ok I got this bug narrowed down and it's now fixed. I'll be submitting the update to the Asset Store very soon.
     
    Last edited: Aug 13, 2011
  13. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    That's good news. Thanks for checking it out so quickly.
     
  14. BODYPRINT

    BODYPRINT

    Joined:
    Jul 14, 2009
    Posts:
    7
    Keely, I've manually added a local physics count option to the styles by following the same format in the Get and Set routines in your code.

    Do you think you could make this an option on your end so that I don't have to modify it every update?
     
  15. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I already submitted the next update to the Asset Store without that feature, but I'm adding it to the next.
     
  16. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    Thanks, much appreciated :)

    BTW, I am BODYPRINT as well. Somehow I accidentally setup another account on my Mac :/
     
  17. illinar

    illinar

    Joined:
    Apr 6, 2011
    Posts:
    863
    It although crashes when I picking fill color. Its the same bug that have been fixed, right?
     
    Last edited: Aug 14, 2011
  18. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    If you have MeshCollider created in editor and you get crash, then it's most likely same bug. If you don't have MeshColliders on, then this might be something else.
     
  19. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
  20. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    616
    I'm considering using Rage Spline/Unity as an editor for a game that won't be built in unity. What I'm interested in is the outer vertices of the shapes created with RageSpline.

    Is there a way I could extract these vertices?

    To be a bit more clear, imagine you created a circle using RageSpline. If you then use the "Box" collider physics you get a bunch of boxes that map to the outer surface. Now imagine you removed all but the top edges of the boxes. You'd be left with a set of lines and vertices that make a polygon that represents the circle. I want to get the vertices of this polygon.

    Make sense? Is this possible?

    Thanks, awesome tool!

    -Jeff
     
  21. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    If you are not a programmer or don't have access to one, then you are a bit out of luck.

    If you are a programmer, you can use RageSpline API to get position values (world or local space) anywhere along the spline and export these position values (vertices) out in a format of your choosing. I don't think Unity has a lot of exporting features build-in, so you need to write exporting code yourself. You also need to formulate triangle-arrays yourself.
     
  22. jeffweber

    jeffweber

    Joined:
    Dec 17, 2009
    Posts:
    616
    Wow, quick answer. Thanks.

    Yep,I am a programmer...

    Just took another look at the API docs and saw these:

    Vector3 GetPosition(int index)
    Vector3 GetPosition(float splinePosition)
    Vector3 GetPositionWorldSpace(int index)

    Missed them the 1st time I looked but those should do exactly what I want.

    Thx.
     
  23. TimB

    TimB

    Joined:
    Jan 19, 2011
    Posts:
    65
    I'm trying to scale a ragespline object that has several ragespline children. When I scale them they scale perfect, until I test the scene. After I test the scene and go back into the scene editor it looks as though the anti-aliasing refreshed itself back to the original scale. When I scale something should it scale everything (outline, anti-aliasing, etc..)? The mesh seems to scale fine, but the outline mesh and anti-aliasing mesh do not scale. This is with version 1.1.9.1, I don't recall if this worked in previous versions.

    Thanks
     
  24. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I made AA to automatically react to scaling, but unfortunately it seems that I didn't account for parent scaling :(

    This goes to my todo now. Hopefully another update coming soon.
     
  25. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    Keely, I haven't researched too far, but can I draw irregularly shaped "areas" in Ragespline? Not starting from a basic primitive shape, but a multi-point area like provinces on a map or areas of specific terrain? -- ANSWERED VIA VIDEO, THANKS.

    Then, I assume I could apply a GUITexture to that shape, or is it only the fill types you have shown in the Docs (this was prompted by the stripes in your immovable rocks in your asteroids demo)? -- ANSWERED VIA VIDEO, THANKS.

    Also, what about borders only on three sides of a square, for example?

    I'm thinking/hoping Ragespline might allow me to draw pretty cool 2D, top-down "maps" for a demo project I have bubbling.
     
    Last edited: Aug 17, 2011
  26. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    For my 2D projects, I have made tests combining ex2D and RageSpline :
    * ex2D for the fixed or animated main characters,
    * RageSpline for quick background or secondary objects.

    Here is a screenshot :



    6R
     
  27. godmanGM

    godmanGM

    Joined:
    Aug 17, 2011
    Posts:
    1
    Can I create a cardgame with RageSpline?
     
  28. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    There's not too much control over that, but you can have a filled shape with one "part" missing the outline if you choose the outline=free with some filling. For example you have 6 control points and there is no outline between the last and the first control point (a.k.a outline wont loop).

    I'm not going to say that RageSpline is 100% superduper perfect for that, but I think it should do ok. There might be inconveniency if you try to do traditional maps (like borders between nations etc). Post some pics if you make it that far :)
     
  29. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Looking good :)
     
  30. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Yes you can.
     
  31. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    Keely, please update readme in asset store... You added lots of functions - scaling, etc... But there is no any info in readme...
    I think many people even did not know about K, L keys and selected points :)

    And please remove warnings that generated by unity 3.4
    I think only actual version of unity should be supported in asset store. :)
     
    Last edited: Aug 18, 2011
  32. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
  33. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Fantasy buttons or symbols made in a few seconds with RageSpline :
    Simply use the outline offset of the rectangle or the triangle for that !



    6R
     
  34. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Last edited: Aug 18, 2011
  35. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Cool idea! Yet another thing I didn't expect ppl would do with RS :)
     
  36. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    Keely, I am sorry to trouble you - but I am badly needed adaptive division of spline curve...

    200k triangles that I have right now in active camera frame (and the hole level is about 2m) is a little bit too many...
    The game could not run at 60fps on iPhone4 - only 30fps - and this is not enough for high quality...
    And to be honest I would like to add more vertices - because of sharp corners...
    And I see that spline can be optimized about ten times without loosing smoothness... :)

    I would like much less vertices on straight line and much more in corners...

    Could you help me please - add such feature?
    May be the simplest way just to add checkbox - adaptive (and as I clearly see from 3ds max spline - number of required vertices will be dramatically decreased with nice smoothing)

    Or just point me at line with code where the generation is taken place
    and I try to implement adaptive step by myself...


    Thanks!
     
    Last edited: Aug 18, 2011
  37. lilymontoute

    lilymontoute

    Joined:
    Feb 8, 2011
    Posts:
    1,181
    Awesome stuff. One thing I would suggest would be to include UnityScript examples as well, similar to Unity's documentation (I personally wouldn't need it, as I almost always code in C#). That might help scripters/programmers who are more used to/comfortable with that language. Of course, if there's no demand for that, then it's fine as-is.
     
  38. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Your triangle count sounds a bit high. Are you sure you need all those triangles and could just step vertcount down to like half? Can you post some screenshot on what kind of game and scenario are we talking about?

    I was thinking about trying to poke the GetSplits() - function in the RageSpline.cs to achieve something like the adaptive stuff you mention. Remember that the whole RageSpline mesh building system is build upon a rule that vertex count is known beforehand (ie. fixed). So if you edit GetSplits(), you need to return the exact same number of verts you get as a parameter.

    Also you need to stick a vertex where there is a sharp corner, because it looks awful otherwise.

    GetSplits() is used everytime when the meshbuilding code needs array of points around the spline. I'm not sure if it's use somewhere else, but you can try what happens if you poke it. I might do the feature you are requesting later, but it's too big of change to do for this v1.1 branch and it will be v1.2 feature.
     
    Last edited: Aug 18, 2011
  39. DaveyJJ

    DaveyJJ

    Joined:
    Mar 24, 2005
    Posts:
    1,558
    OK, thanks.

    No, these aren't traditional maps, more like lazy area maps and just a prototype of an idea. I will post a screen shot later. regardless, the product is amazing and you've got one more sale from a very long-time Unity user.
     
  40. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    Got another bug for you Keely.

    In RageSplineStyle under the SetBoxColliderDepth GetBoxColliderDepth functions you are using the colliderZDepth variable which is locking the Z Depth and Box Depth varables together when using styles.

    I changed the colliderZDepth variable to boxColliderDepth which seems to fix the problem, but with Enable In Editor ticked, I get a lot of IndexOutOfRangeException errors when I change the Box Depth value.

    I'll keep working on it and let you know what I find.

    [EDIT] The errors seem to have stopped now, must have just been an initial resetting problem. So after changing the variables over it seems all good. [/EDIT]
     
    Last edited: Aug 19, 2011
  41. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    @LeshaVH I sent you private message
     
  42. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Btw. LeshaVH I noticed that I was giving misinformation earlier. RageSpline doesn't actually need to know the fixed vertexCount when building the triangles. This was the case back in the v1.0, but I totally forgot how I changed the way triangles were build and I'm glad you proved me that. This project is getting a little complicated to remember everything.
     
  43. LeshaVH

    LeshaVH

    Joined:
    Mar 22, 2010
    Posts:
    84
    May be someone else will be interested to test spline optimization... How to use:

    -) increase vertex count to 100 * control points count
    -) turn on optimization
    -) setup optimization angle (1..8)
    -) code has backward compatibility

    You will be given MUCH less triangles with the same quality... (or very smooth splines with the same number of triangles)
     

    Attached Files:

    Last edited: Aug 21, 2011
  44. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    Just got RageSpline and it is very fun to use. I'm a programmer and not an artist and using RS is very easy and it helps to do prototyping in Unity.

    For ragespline.com, I'd recommend having a Showcase page where you put up screenshots and links to apps (when possible) to show what can be done. Something like one of these:
    http://developer.anscamobile.com/showcase/
    http://www.justaddli.me/showcase.php

    Was toying with Corona because I like lua (even ported Lua to Flash in LuaAlchemy)... but decided I'd rather use Unity since I can deploy to mobile + web + desktop and transition from 2d to 3d when my skills allow. RageSpline is my current tool of choice for 2d work because I can do it all in Unity.

    Oh, I think it was mentioned before... but I get the following warning in Unity 3.4
    Assets/RageSpline/Editor/RageSplineEditor.cs(139,79): warning CS0618: `UnityEditor.EditorGUILayout.ObjectField(string, UnityEngine.Object, System.Type, params UnityEngine.GUILayoutOption[])' is obsolete: `Check the docs for the usage of the new parameter 'allowSceneObjects'.'
     
    Last edited: Aug 21, 2011
  45. Cico

    Cico

    Joined:
    Aug 21, 2011
    Posts:
    11
    Very nice :) I really like it. Good job
     
  46. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    I had a choice of RageSpline working at all in Unity 3.3 and below or getting these warnings in Unity 3.4.

    I chose the later because I know many developers are in a middle of a project or have some other reason they don't want to upgrade to 3.4 yet.
     
  47. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    This exact feature is coming to the official version too and I'm paying LeshaVH his $75 back as voluntary payment for his good work.
     
  48. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    You make a good point Keely. I chose to make Ragetools compatible with the latest Unity since I believe thats what most users will use. Its a very tiny change to make it compatible with 3.3 though, so I might add a second editor file pack to the main release with instructions on how to replace the right files.

    PS. To everyone getting in touch eager to betatest Ragetools: Thanks! Keep tuned for next weeks' news on the new beta phase :)
     
    Last edited: Aug 21, 2011
  49. Brady

    Brady

    Joined:
    Sep 25, 2008
    Posts:
    2,474
    Yes, these are only warnings that do not affect functionality. However, you can use:

    #if UNITY_3_4

    to conditionally compile it with/without the new boolean argument. Of course, the really filthy, ugly, despicable thing is that, thanks partly to a crippled preprocessor spec in C#, you can't do something like:

    #if UNITY_VERSION > 3.3

    ...which you CAN do in C++. So you wind up having to do something REALLY awful like:

    #if UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9

    And that only covers you until Unity 4.0! In a couple years time, our conditional compilation blocks are going to have to be a gigantic, horrific mess. My middleware has to support Unity iPhone (1.7, etc), and because of the way Unity uses these preprocessor symbols, I have to pepper my code with:

    #if UNITY_IPHONE !(UNITY_3_0 || UNITY_3_1 || UNITY_3_2 || UNITY_3_3 || UNITY_3_4 || UNITY_3_5 || UNITY_3_6 || UNITY_3_7 || UNITY_3_8 || UNITY_3_9)

    For that reason, there should at least be a "UNITY_3" #define that would cover all 3.x versions, but there isn't.

    Sorry, rant over... :)
     
  50. keely

    keely

    Joined:
    Sep 9, 2010
    Posts:
    967
    Thanks. Now I can get rid of those warnings. You are right about the rant. I'm hoping RS wont get sucked too deep into this preprocessor "sexiness".