Search Unity

MegaShapes advanced Lofter and spline based mesh builder.

Discussion in 'Assets and Asset Store' started by SpookyCat, Jun 14, 2012.

  1. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Second Tutorial video done, this one covers the more advanced params for the 'Simple' Loft layer.
     
  2. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    In the third tutorial video we will use the Clone layer to add a fence on top of the grass surface we built in the previous videos. The video covers selecting the surface to build on, using mesh objects for start, end and repeating parts of a fence. It also covers the various params you have to control the positioning of the fence and adjusting its look.

     
  3. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Fantastic, been waiting for a system like this that works on mobile devices as well and allows runtime changes for a driving game concept. Really looking forward to seeing more tutorials, very close to making a purchase on this system.
     
  4. havchr

    havchr

    Joined:
    Jun 18, 2009
    Posts:
    75
    Thanks for the update. It fixed a bug I had where clone layers would pop up a warning about some mesh filters not being ok, about five times per second :)
     
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Yeah I was a bit over eager on the error checking :)

    Are there any 3.5.3 users out there that can say if there is a slowdown when a spline has all it's handles showing. Was getting reports that on 3.5.2 more than a couple of handles was really slowing Unity down and I was wondering if Unity fixed this in 3.5.3
     
  6. havchr

    havchr

    Joined:
    Jun 18, 2009
    Posts:
    75
    Is there a way to scatter/clone game objects? In my game, you are a snake, eating apples. I'd be nice to use the path's to scatter/clone my apples along the surface.

    I have been able to clone the fence, but unable to clone my apples. The apples should work as independant objects, which the snake can eat, and not like a static mesh, which seems is what is happening with the fence I am cloning.

    Hope you understood what I meant :)
     
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    That shouldn't take long to add, I will do a script for that today.
     
  8. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just to say I have forgotten about the scatter script, it will be added soon, had to do some support and new docs for the web page. New features and tutorials coming soon.
     
  9. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Are there any more tutorials coming? Also could you do some examples of using the spline code ie making shapes dynamically. And finally will you be extending the shape exporter to other 3d packages, Blender ideally?
     
  10. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi Mike
    I will be back on MegaShape tutorials very soon continuing the level building and then hopefully showing some more advanced features. Also I have been looking at adding an exporter for Blender for shapes and splines, and I will be doing some proper docs on the spline API and the SPL format so people can do their own exporters as well as learn how to manipulate the splines through scripting etc.
    Chris
     
  11. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    How hard would it be to use this tool to chain multiple MegaShapes (LoftObjects?) together at runtime?
    For example, I have a short spline segment attached to a LoftObject, then I create a new spline segment and a new LoftObject.
    I want the 2nd one to attach smoothly to the first so the parameters continue on as if it was the same object.

    Or, I suppose this could be accomplished by allowing dynamic spline additions to a LoftObject.
    (And the opposite feature of removing entries from the start of spline list)
    And/Or allow multiple spline lists to define the path. With the ability to enable/disable a specific spline list on the fly.
    You should be able to tell which spline connects to which by the start / end coordinates.
    (This could be useful for large / long paths where you only display/update the current segment)

    I never seen any sample dynamic script code, so the path can only be defined by specifying spline data?
    ie. I can't just specify four points forming a square and have it calculate how to smoothly join those four points into a circle?
    (similar to: http://unifycommunity.com/wiki/index.php?title=Interpolate)

    But then how fast does it take to regenerate for dynamic scripted changes?
    I'm looking to build a continuous, non-repeating path.

    And about the regeneration speed, could this be done in real time?
    I would like the ability to dynamically change say the x-scale when the user gets an 'Expand' power up to allow the path to become temporarily wider. Then after a certain amount of time, gradually shrink the x-scale back to its default. And have all cloned objects and colliders adapt to the dynamic sizes.

    If I can figure out how to create an endless path, I will definitely purchase this amazing tool.
    I actually started to write my own code to do a small subset of MegaShapes, but for $100 it will save me 100 hours just to create the features I originally needed, not to mention the tons of other features your tool provides that opens up so many other possibilities!
     
    Last edited: Jul 11, 2012
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @slydog - I am in the process at the moment of docuementing the Spline system, the classes and methods and adding some code examples for creating and extending splines via scripting so that will help anyone who wishes to create lofts on the fly and join them together. You can look at the source files such as MegaShapeCircle.cs to see how a spline can be built at runtime, though not if you dont own the system yet hence the new docs I am working on which will show such things.

    The idea of being able to have continous lofts is one that is coming up quite often so I will invest some time in adding such functionality or at least making it easier for users to do such systems, the idea of working along a series of shapes is a nice one. The system is being used by ourselves to build tracks and long levels for our games so that will surely lead to me adding more functionality in that department soon. The time it takes to build a loft will obviously depend on how long the loft is and how detailed it and how many layers it uses. I will en devour to do some timings on this soon, I will also be getting the mesh builder working on multiple threads to speed it up even more.

    You dont say which platform you are aiming at but being able to update levels in realtime is not a problem on PC/Mac/Webplayer and as you can see above with the Android version that has 3 scatter layers updating every frame.

    If you can wait a little I will try and find the time to create an endless level example or two with run time generation of splines and lofts, so if you aren't on a super tight deadline might be best to wait till I can show the functionality you need before you make a purchase to avoid dissapointment :)
     
  13. MaaS

    MaaS

    Joined:
    Mar 9, 2010
    Posts:
    51
    Hi there! Such a great product!!

    I'm a new customer! hehe... Where I can find the Max and Maya spline exporter?

    And... about mesh resolution... It seems that the dist and cross dist parameters are the quality/smooth subdivision rate for the loft... and they seems to be in unity units from 0.0 to 1.

    But when making a huge (in units size) lowpoly loft... the distance in units it's not right indicator to choose... so the only way to achieve a lowpoly mesh is to make the splines tiiiiiny and scale the loft. But as the splines and loft sizes are soooo different it's quite hard to make changes and see what you are doing... any better way to do this? I would like to have some kind of number of subdivisions per distance or between spline points through the path, and for the cross... or at least to be able to make the dist and cross dist parameters way over 1...

    Some other suggestions here:
    - The loft mesh could uses a lot less subdivisions when the surface generated is planar.
    - The basic shapes available are great, but they could be better if a knot resolution is added... like what you make with rectangle fillet... you say you make a circle but you need more knots... just increase the knot rate.
    - And it would be cool if there were another basic shape... just an line open spline, define the number of knots and basic distance between them and you have a linear spline with a few knots. And then it's time to move then around or add knots so you can use it as a path.

    Anyway... one of the best assets out there! I'll look forward more assets from you!

    Thanks!!
     
  14. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Thank you, and thanks for the purchase. To get the spline exporter for Max (no Maya version yet not had the time to get one working there but soon, as well as Blender and Cinema4D) just email me with the version of Max and whether it is the 64 or 32 bit version and your invoice number for the purchase and I will get that sent of asap.

    I will change the dist values and have an option to use number of steps as well.

    Yes the lofts can be more optimized and that is something I am working on, it has some impact on some other systems but it will be implemented.

    If you use the NGon shape then you can say how many points you want to make up the shape, but I can see that it could be useful on the other shapes as well so will investigate implementing that. I will certainly add the linear one for the next update.

    Glad you are liking it, if you get anything cool made with it please do share, we are working on the new demo scene for some new videos and tutorials and I am doing the docs for the Spline API to allow you to mess with the splines from script and producing your own splines on the fly. Lots more stuff coming soon.
     
  15. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    I have just submitted version 1.13 of MegaShapes to the Asset Store. This sees some additions to the spline system to allow for easier creation of splines from scripts and an Auto Smooth feature for splines so you can easily now just provide an array of positions and tell the system to create a spline from it. More information can be found on the MegaShapes API page Also all the helper shapes have their own help pages on the site now.

    Changes for 1.13:

    • Added autosmooth option to shapes.
    • Added BuildSpline method.
    • Added various methods to aid in spline building via script.
    • Added option for different handle types on Shapes as some people reported big slowdowns in 3.5.3
    • Adjusted sensitivity of some Editor GUI values
     
    Last edited: Jul 17, 2012
  17. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Hi, I'm trying to use MegaShapes to make motocross race tracks and I'm trying to figure out the best way to setup the track collision. If I set the "collider" checkbox under Mega Shapes Loft, my framerate dips down to about 2fps. So instead I just added a Mesh Collider component to the Loft and that seems to work ok, but my character intermittently falls through the geometry at medium to high speeds (this may be an issue with mesh colliders in unity in general).

    So what's the best way to setup optimized and stable collision on a MegaShapes Loft?
     
  18. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    I found a script on UnifyCommunity.com that helped me with my (dynamic) mesh colliders, and fixed my ball from passing through them:

    http://www.unifycommunity.com/wiki/index.php?title=DontGoThroughThings

    It uses raycasts to see if there is anything between where you are now, and where you were last frame. (If so, then set your object to the ray hit point)
    It is available in all three flavours of Unity scripting languages too.
     
  19. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Thanks for the reply @slydog. I've used that script on simple characters with success, but haven't quite figured out how to set it up for a vehicle where 1 or more wheels can go thru the ground but not the whole character.

    Also still wondering if simply adding a Mesh Collider to the Loft object is the best way to add collision. What's the purpose of the "collider" checkbox on the mega shapes script and why does it kill framerate?
     
  20. alewinn

    alewinn

    Joined:
    Nov 8, 2009
    Posts:
    185
    Hello SpookyCat,

    Mega shapes is really impressive, and i would be interrested, just had some questions :
    1 - Is it possible to add holes in the shape ?
    2 - Is it possible to draw bezier splines directly inside unity with megaShapes ?
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Firstly sorry for the delay in responding, been without a computer for a week.

    @rocket5tim - If you turn on collider support on a loft object then the final mesh built from the layers will be used as the mesh collider, the reason it is slow is Unity must be building an octree or some other form of spatial subdivision on the mesh data to suit its own internal collision system, there is nothing I can do to speed up that process I am afraid unless Unity expose the workings of the collision system. In the test scene the Big balls collide with the fence and grass loft objects so they system works, are you still having problems with it?

    @alewinn - Support for holes in shapes is something I will be working on, I do have a triangulator almost ready to go to handle that. You can create and edit your bezier splines inside Unity with MegaShapes, you just start with one of the basic helper shapes and add and remove points and drag the knots and handles around to make your shapes, or you can generate the splines via scripting, I have been adding more functionality to the spline system to allow for easier manipulation and control of splines from code.
     
  22. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just submitted a small update to the asset store, this adds a copy button to the Inspector for loft objects which allows you to create a copy of the object that you can edit separately so for example you build a fence on one side of a road and you want to build one on the other you can use the copy button, then change the cross alpha value and have a new fence, before you would need to create it from scratch.
     
  23. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Can you do an example of generating a spline and a loft from it at runtime, my coding skills are a little limited and I would really like to see an example of how to get that working?
     
  24. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @MikeUpchat - Getting a few requests for that so will get on that after the next update to the system.
     
  25. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Version 1.15 of MegaShapes has been submitted to the Asset Store. This updates sees some improvements to the workflow so you can now duplicate layers in a loft so for example if you are putting a fence on a surface you can now just hit the 'duplicate' button to copy the layer and then slide it across. A delete button has also been added.

    The spline to mesh system has been enchanced now with the option to either fill the shape to make a mesh or to turn the shape into a tube/line, you can define the radius of the mesh, the number of sides and the start and length as well as cap the ends. The option also allows you do define multi strands with twisting useful for ropes. More meshing options are coming soon such as box and line options which can be used for say tank tracks.

    A 'tangent' option has been added the to Loft Object which allows you to tell the system how far to look ahead when it calculates the forward vectors for the loft allowing you to add more variation to your lofts or to increase the accuracy to make tight corners nicer. And finally the Walk Loft helper which allows you to easily move your game objects over the surface of a loft has had a smoothing value added. I will hopefully be doing a video today to show of the new features in this update.

    Changes for V1.15:

    • Added 'Duplicate' button to layer inspector to easily make a copy of a layer on a loft object.
    • Added 'Delete' button to layer inspector to easily remove a layer.
    • Added a smooth value to Walk Loft helper script.
    • Added 'tangent' value to Loft Object to control the accuracy of the forward calculations in the lofter.
    • Added new meshing option to splines, 'Tube' allows multi-stranded tubes to be made.
     
  26. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    MegaShapes v1.17 is in the Asset store now, this quick update adds a box mode to the spline to mesh options so now providing a choice to either fill the shape or build a tube along it or a box section. The Walk Loft helper has had a vertical offset value to make it easier to control objects whose pivot is not at the correct place on an object. And I have added a MegaShapeFollow component which allows you to easily move objects along shapes, you can select any number of shapes for an object to follow and have weights for each shape to you can smoothly transition from one shape to another or mix together a dozen shapes to form a final path.

    Changes for v1.17:

    • Added Box type to meshing options for splines.
    • Added a Vertical offset value to the Walk Loft helper script.
    • Fixed inpsector gui bug
    • Add Mega Shape Follow to allow gameobjects to follow a shape or multiple shapes.
    • Walk Loft works correctly with transformed loft objects.
    • Added limits for the 'Dist' and 'CDist' params to the Loft Object inspector.
     
    Last edited: Aug 14, 2012
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    $msrope-1024x578.jpg
    Another day another update to MegaShapes, this sees some bug fixes. Firstly you can now freely move your loft objects around and if the layers using the object have 'realtime' on then the layers will move, scale, rotate correctly as you change the base object. This might have the effect on exiting lofts of rotating clone layers by 180 so they appear upside down, if so just change the x value in the tmrotate to 180, I would suggest doing a backup of your project before updating.

    Copying Loft Objects will now work correctly instead of layers sticking to the original surface they will now stick to the new one.

    I will be adding more systems over the coming week such as a system similar to the Path Deform modifier found in MegaFiers this will make it easy to build a long mesh out of mesh components then feed that along a spline and maybe onto a surface. You can pretty much do this with the Clone Layers but just to have the option will be nice. Also the first part of the rope system has been added, you can build multi-stranded ropes along splines by selecting the mesh option and then a mesh type of 'tube', I will be doing a video to show this and other new features very soon. The physics update of the rope will also be added soon.

    Also with the addition of the dynamic rope and other systems the price will revert from the introductory price of $100 back to its normal price of $150 so if you plan on getting the system get it before the price change, probably the end of the month.

    Changes in v1.18:

    • Made some changes to how the twist works on tube and box meshes.
    • Fixed bug on Duplicate Layer which caused an exception.
    • Update help page for Loft Object component.
    • Changed how the system deals with transforms, now allows objects to be moved, scaled and rotated and layers will follow correctly (if realtime set), you may need to adjust rotations on clone layers and offsets depending on base object rotations etc. Please backup before updating.
    • When copying a Loft Object layers will now use the newly created Loft Surface instead of the original one if the Loft Object is the one being copied.
     
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Just uploaded a new tutorial video for MegaShapes. In the forth tutorial for MegaShapes we will use the Duplicate Layer and Copy options to make a second fence quickly, also the Walk Loft system will be shown which is a way you can easily position and move your objects or characters over a MegaShapes surface.
     
  29. alewinn

    alewinn

    Joined:
    Nov 8, 2009
    Posts:
    185
    Hello SpookyCat, i finished by buying Megamesh, even without "Hole maker" ;) (And it's a reaallyy great tool !)
    I have this problem on my work computer ; did it have been already solved ?
     
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi Alewinn
    if you click the drop down box of 'Handle Type' on the shape inspector you can swap between Free or Position handle types.

    Sorry for the delay but we were at Unite, was a nice surprise to see MegaShapes pop up in the Keynote speech.
    Chris
     
  31. Daniel_Knecht

    Daniel_Knecht

    Joined:
    Aug 28, 2012
    Posts:
    4
    I hope you can help me Spooky...
    I want to make my own Loft Shape but i dont have a "Mega Shape Loft (Script)". Can you say me what i have make wrong or where i can get this? I have Import your Package new without any changed Settings etc.

    I dont have more as this:
     

    Attached Files:

    Last edited: Aug 28, 2012
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi There
    Looks to me as if you don't have the full MegaShapes system but have the basic version included in MegaFiers, if you can submit a support ticket at the website with your invoice number I will be able to check if you have the right package etc.
    Chris
     
  33. Daniel_Knecht

    Daniel_Knecht

    Joined:
    Aug 28, 2012
    Posts:
    4
    I can only have the Full Package then i have buy it in the Asset Store.
    Thats mysterious!
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Did you buy MegaFiers or MegaShapes? They are two very different systems, MegaFiers includes a very small subset of MegaShapes ie the core spline system which is uses in its path deform modifiers as in its basic spline to mesh system. MegaShapes is an advanced lofting system as well as a more featured spline to mesh system. It is convenient to have MegaFiers share the core spline system so that as the system improves or more spline types are added both packages and both sets of users benefit.
     
  35. Daniel_Knecht

    Daniel_Knecht

    Joined:
    Aug 28, 2012
    Posts:
    4
    Oh ok thats the problem i buy MegaFiers only :(

    Now again 100 Money... hm.. No!
     
  36. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    $moo4..jpg
    Version 1.20 of MegaShapes has just been submitted to the Asset Store. This sees some bug fixes, as well as the inclusion of some more assets for the MegaMoo tutorial scenes such as jump models, trees, and some more textures for you to play with.

    Some of the core systems have also been optimized so everything runs a little faster with more to come in that area. Also added a rotate value to the walk loft system so add more control over your objects, as well as an offset value to the Shape Follow system so if multiple splines are used you can control the start point of each one, there will be a video very soon showing that system and the other new additions to the system.

    Finally I have started the SVG importer so you can now build your splines in Photoshop or Illustrator etc and export them to SVG for use by the system. The importer supports most of the features of the SVG file format and what it doesn't will be added soon.

    Changes in v1.20:

    • Fixed the flip not working on the Complex Loft layer.
    • Added error checking code to Complex Loft so check for valid state before trying to draw. NB Complex loft needs at least 2 cross sections before mesh builds.
    • Added start of SVG import support.
    • Optimized some of the core maths for faster updating of loft meshes, more to come.
    • Added a rotate value to the walk loft script.
    • Fixed bug in Duplicate Layer code, now works for all layer types.
    • Added an offset and modifier param to each target in Shape Follow.
    • Jump and tree assets added to tutorial scene
     
    Last edited: Aug 29, 2012
  37. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Had to submit the system again as for some reason the 3d models etc all got updated but the code didn't version 1.20 is in the store now.
     
  38. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    A couple of simple questions before I buy (and soon, price is going up!):

    • Is there a way to 'serialize' the current editor splines and settings? This would be great for using your IDE integrated editor for designing your lofts, then saving those loft settings to a text file (or other). Then while your game is running, you have a command to deserialize (is that a word) the file and recreate your lofts. You would only need one scene that you can reuse for multiple levels. And you should be able to save tons of disk space. The 'manual' approach would be to edit your level using the editor, then manually store those values in a text file (custom layout) to reread back at run time and use your runtime API commands to recreate the lofts.
    • (This may be the same as 'can I create a hole in a loft') Say I have a model of an empty in-ground swimming pool. I want to place it onto a loft surface such that the pool dips below the surface, and not have the loft surface 'fill' in the pool.
    • Can the final loft be segmented into multiple sub meshes? (ie: top view would be a circular track split into 4 pie shapes) Would this improve mesh collider performance since each mesh would have less vertices? Other advantage could be view frustum culling for larger lofts?
    I see the API has been expanded since I asked about dynamic lofts, just what I wanted! Great job!:D
     
    Last edited: Aug 29, 2012
  39. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    @slydog - That is an interesting idea I will have a think about that. If you wanted to put a swimming pool object onto a loft surface then the easiest way would be to make sure the water and pool insides used a shader like the ones used for boat models that want to float on a water surface but not have the water show on the inside of the boat. It would be a very complex addition to have the objects boolean themselves into the surface. As for chopping up the mesh best approach currently would be to have four objects for your example, and just use different start points ie 0, 0.25, 0.5 and 0.75 all with lengths of 0.25.
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    I have uploaded a new simple tutorial video. This tutorial shows the new SVG import feature so you can build your paths in packages such as Illustrator and import them into the system. The system also includes support for importing animated splines directly from 3DS Max through a custom exporter. The other feature shown in the video is the Shape Follow system, which allows you to easily move objects along a spline or along multiple splines using weights to define the end path. This makes it easy to have for example lots of camera paths in your game and smoothly move the camera from one to another.
     
  41. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Another new video this time showing the new meshing options in MegaShapes. The meshing options in MegaShapes have been extended to include two new methods of tube and box. This allows you to turn splines into tubes or lines as well as extruded boxes very easily. Ends can be capped if the full length of the spline is not used and the extrudes can have multiple strands to build rope type meshes. These new meshing options can also be found in the version of MegaShapes that is included in the MegaFiers system.
     
  42. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Looking forward to the dynamic rope system being added, do you have eta for that?
     
  43. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Working on it now hopefully it will be in the next update which should be a week or two away.
     
  44. artonator

    artonator

    Joined:
    Sep 12, 2009
    Posts:
    69
    Hi,

    Can you provide any sample script that let user manipulate knots position runtime?

    I went through your API doc, but I was not able to find too many sample codes.

    thank you,


    Arthur.
     
  45. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Hi Artonator
    What kind of manipulation example are you looking for? As all the source code is included with the system you can check out the code that animates the splines in the Update method of MegaShapes or the editor code that allows dragging of points, but if you can give me an example of the manipulation you are looking for help on I will add a code example to the API page.
    Chris
     
  46. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Version 1.22 in the Asset Store now, this brings greatly improved SVG parser so should now work with all SVG files. The CursorPos option now works correctly for the selected curve you are editing instead of just the first curve in a set. And the Complex Loft layer now handles out of range interpolation of open splines much better.

    Changes for v1.22:

    • SVG importer rewritten and greatly improved.
    • CursorPos on shapes now works correctly for the selected curve.
    • Fixed an exception error if Complex Layer missing a path.
    • Complex Loft layer now handles non closed splines properly for our of range values ie alpha < 0 or > 1
     
  47. artonator

    artonator

    Joined:
    Sep 12, 2009
    Posts:
    69
    Some thing simple sample will be good enough, say I have a scene with a doughnut shaped object which was created using circle as a path, and I would like to move the knots of the path circle with mouse run time...

    It will be awesome if I can see sample scripts that let me do something like this.

    thank you,
     
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Version 1.23 of MegaShapes is in the Asset Store now, this brings some fixes for Unity 4.0 where splines were not being drawn, as well as a reverse spline feature so if your lofts are inside out you can either reverse the splines or use the 'Flip' option in the advanced params of the Loft layers. An Outline spline system has also been added as well as a scaling system. I will be doing a video showing these new features soon.

    Changes for v1.23:

    • Added Elipse support to SVG importer.
    • Fixed splines not showing up when selected in Unity 4.0
    • Added a Reverse spline option to the Shapes inspector, will reverse the currently selected spline
    • Added an Apply Scaling button to the inspector so if you scale the shape using the transform click this to correctly scale the splines
    • Added an Outline spline system, you can now ask the system to make a new spline that outlines the current one with control over the outline distance.
     
  49. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Version 1.24 of MegaShapes is in the Asset Store now or can be purchased directly from the website. This brings some improvements to the Shape Follow and Walk Loft system adding a distance mode to the existing alpha mode so you can choose to position your objects via an alpha value between 0 and 1 or via a distance along the spline or surface. We have also included on the help page of Shape Follow a very simple example on how to move a game object using keys and the Shape Follow component. Also when you import SPL or SVG files you will be asked if you want to replace the splines already on the shape or add them to the existing spline list.

    Change in v1.24:

    • Walk Loft now has an alpha mode and a distance mode for positioning object.
    • Shape Follow now has an alpha mode and a distance mode for positioning object.
    • Added Late Update option to Walk Loft
    • Added Late Update option to Shape Follow
    • Added Help page for Shape Follow
    • Added Help page for Walk Loft
    • When loading SPL or SVG files you now have the option to Replace existing splines or add to the splines making the shape.
    • Add example script MegaMovePlayer.cs to show how to control character moving on a spline.
     
  50. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    $ribbon.jpg
    Another small update to MegaShapes is in the AssetStore now or available from our store on the website. Version 1.25 brings a new meshing option, Ribbon to add to the Fill, Tube and box modes, this will produce a flat ribbon along the spline with options to rotate and have multiple twisted ribbons like the other modes, useful for roads. A UV Offset options has also been added to the meshing options and pivot offset works for all modes now so you can easily position the mesh relative to the spline.

    Changes in v1.25:

    • Added Ribbon option to mesh types when converting Spline to a mesh.
    • Fixed MeshRenderer being added to object when it wasn't required.
    • Added Late Update option to shapes.
    • Pivot offset value now works for tube, box and ribbon meshing options.
    • Added UV offset param to tube, box and ribbon meshing options.