Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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,748
    @cl.9 - Not at the moment it is something we have thought about though.

    Another tiny update is in the Asset store now, had a request to add an option to the simple loft to align the cross sections with the loft path so there is now a Align Cross slider in the cross sections panel so you can decide how much you want to align or use a 0 value to have the cross sections upright.
     
  2. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted an update for MegaShapes which sees a tiny bug fix for those who were getting an exception when creating Lofts from scratch via scripting, and we have also added a beta of a new feature. We were asked if lofts work with Terrains and we thought that it would be nice if they did so we have added a 'Conform' feature to the Simple Loft layer (other layers will also get have it in the next update). With this feature you can select per layer an object for the loft to conform to, it could be a terrain or a mesh object, the system will then make the loft fit the target object, so you can now create simple flat road loft and then have that go over a terrain object. You can adjust how much the loft will conform to the target as well as set an offset so it can float above the target. The loft will update in realtime if you change the terrain or mesh or move the spline etc and any other loft layer that uses the conforming one will automatically update as well, so fence layers or objects placed on a loft will all stay positioned.

    There is a video of the system in action below and as ever more information on our systems can be found on out website at http://www.megafiers.com
     
  3. pixelsteam

    pixelsteam

    Joined:
    May 1, 2009
    Posts:
    924
    Man Chris you hurt my head...
    This is so fantastic.
    Is it also possible to have that happen in realtime?

    Edit: Sorry Chris runtime...was overworked.
     
    Last edited: Oct 24, 2013
  4. cl9-2

    cl9-2

    Joined:
    May 31, 2013
    Posts:
    417
    Awesome addition. Thank you
     
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    If you mean at runtime then yes, it happens in realtime as it is as can be seen in the video, but you can have it update the conforming at runtime as well it is up to you, obviously as the vertex counts increase it will get a bit slower but the loft in the example updates at runtime no problem on my pc, not tested performance on mobile at runtime yet. Will be adding more options to the system in the later updates and can probably squeeze a little more speed out of, ie split the conform update from the loft update which would make it a lot faster if the loft itself is not actually changing but the conform values are.
     
  6. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Version 1.60 of MegaShapes has been released this sees the new conform system being added to the general meshing options in MegaShapes, so now you can have the mesh generated from the spline in any of the available modes ie Fill, Box, Tube, Ribbon conform to any target mesh or terrain, so you can easily use the ribbon mode for example to lay a road over a terrain.

    Changes in v1.60
    • Conform added to fill spline meshing option.
    • Conform added to box spline meshing option.
    • Conform added to tube spline meshing option.
    • Conform added to ribbon spline meshing option.
     
  7. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We added a little helper script to the MegaShapes package which makes it a little easier to setup multiple objects to follow a spline such as a train. In the demo scene in this video that is included with the full version of MegaShapes we have setup a simple track that lofts itself around a spline and then setup the Train Follow script to allow and engine and 4 carriages to drive around the spline. As the spline is changed the track updates and the train continues to follow the path correctly. This helper script is included in both MegaShapes and MegaFiers.

     
  8. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have released a new version of MegaShapes, this brings some bug fixes to some of the layers, and also the inclusion of the Train Follow helper script. The Autocurve feature in MegaShapes now has a smoothness value so you can have control over the spline generated, a value of 0 will give sharp corners, while a value such as 2 will give very wide in and out handles to a knot, the default value of 1.1 seems to generate nice curves for most starting shapes.

    Finally with the release of 4.3 the Undo system has been updated to make use of the improved Undo features in 4.3

    Please though backup your projects before moving over to 4.3, during beta testing there have been some issues with Unity converting projects from older versions of Unity to 4.3, it should be fine for 4.x projects but just to be safe back up first.

    Changes in v1.63
    • Added a 'smoothness' value to MegaShape which is used by the AutoCurve method, a value of 0 will result in sharp corners, a value of 2 will give very wide entries into knots, a value of 1.1 seems to be the best value for smooth curves.
    • Unity 4.3 new undo support.
    • Train follow has debug lines for easier editing.
    • Fixed bug in Clone Spline Simple where axis value was being used correctly to calculate repeat count.
    • Fixed bug in Clone Spline Simple where loft was not being positioned correctly over spline if spline not at 0,0,0
    • Fixed bug in Clone Spline where loft was not being positioned correctly over spline if spline not at 0,0,0
    • Added helper script MegaTrainFollow that allows for multiple objects to follow eg like a train with carriages
     
  9. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    I haven't seen anything that would lead me to believe that a race track with loops and twists is possible with MegaShapes. So, is it possible?
     
  10. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just been doing some work on the transport frame methods in MegaShapes, it will now work with complex lofts with out the gimbal lock twists that used to be present in the previous versions, so looping lofts are now easily possible in one loft instead of having to break the loft up into multiple parts which was the old workaround. The image below shows the issue in the old version on the left and what it looks like in the latest version. Anyway new version will be in the Asset Store soon.
    $transframe.jpg
     
  11. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    Excellent. Any optimizations to reduce tris on straighter bits?
     
  12. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    That is on the todo list.
     
  13. OhiraKyou

    OhiraKyou

    Joined:
    Mar 27, 2012
    Posts:
    259
    Once the new version hits, I suggest throwing together a video featuring the workflow for creating a race track with loops and corkscrew-like twists. For some reason, most track building assets on the store either don't support loops and twists or cannot do so smoothly. This could be your chance to fill that hole. I'll certainly be watching this development.
     
  14. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have submitted an update to the Asset store for MegaShapes. This sees the addition of the new transport frame system, allowing looping lofts to be built more easily without ugly twists, also brings some performance improvements to the lofter and multiple bug fixes

    Changes in v1.68
    • Added new transport frame method to simple loft layer allowing for loops to be created with no ugly twists
    • Added new transport frame method to complex loft layer allowing for loops to be created with no ugly twists
    • Performance increase with the loft system, moved check for layers so not happening every frame.
    • Removed unused Update methods
    • Added flipcap option to Simple Loft so you can flip the endcaps if used separately from the main loft
    • Added flipcap option to Complex Loft so you can flip the endcaps if used separately from the main loft
    • Added option to MegaShapeLoft inspector to disable Undo checks, some 4.3 users have reported slowdowns in the Undo system in 4.3
    • Fixed exception in MegaShapeLoft Start which could happen when creating a new Loft
    • Added MegaPathFollow, which is a simple spline following helper script.
    • Fixed errors in undo system.
    • Train follow has debug lines for easier editing.
     
  15. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Thanks for adding the new system to allow loops everything works great now in all my cases where there were twists, thanks for doing such a great job on all your systems they have really helped me along over the year with my projects.
     
  16. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    New versions of MegaShapes is available in the Asset store, this sees an improvement to the SVG importer to cater for lines that describe filled shapes, also improved performance on the interpolation of constant speed splines.

    Changes in v1.69


    • Update to the SVG importer to handle path 'm' commands with multiple values ie fill a shape.
    • Improved performance of spline interpolation when using constant speed.
    • Constant speed defaults to Normalized Interp for interpolation.
     
  17. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted an update to the Asset Store, this brings a couple of bug fixes and some improvements to the ease of use of working with splines, adding new knots to a spline can now be done by clicking and dragging the mid point circle between knots, and there is a gizmo to allow the whole spline to be moved instead of having to move each point one by one. Autocurve now only smooths the current working spline instead of the entire shape. Also added some more methods the API namely MoveSpline and RotateSpline and finally we have added an improved walk loft script which is now totally smooth when moving objects over your lofts, the older version is still there but as that used normal collision detection methods if you had a low poly loft there were ugly changes in direction as objects moved over poly edges, the new version computes the collision from the spline data for totally smooth movement in your game.

    Changes in v1.70
    • Added MoveSpline methods to API for easy moving of entire spline
    • Added RotateSpline methods to API for easy rotation of entire spline
    • AutoCurve Button now only updates the current spline being edited
    • Added Gizmo to allow current spline to be moved in the editor for easy repositioning
    • Fixed inpsector issue when selecting a new loft in some components
    • Added MegaWalkLoftSmooth which moves objects on lofts perfectly smoothly
    • Made it easier to add knots to a spline, click and drag the mid point circle to add a new knot at that position
     
  18. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    While doing some videos for our new MegaScatter system did a little guide video to show the use of the MegaShapes spline system, the basic version of which is included in MegaScatter, this shows some of the new features that have been added to the spline editing side of MegaShapes.

     
  19. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Wrong post
     
    Last edited: Feb 22, 2014
  20. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    OMG awesome, I will definitely have to check this out! Thanks for putting this feature in. :)

    One other feature request.. for making a very long or `endless` road... where it would normally have to be split up into multiple splines because of the max triangles per mesh etc... it would be really nice to have an even higher-level construct such as a `megaspline` or `metaspline` which contains an unlimited number of splines. Then that metaspline would have various options for moving/positioning objects along the entire length of the multi-spline shape, as a kind of abstraction layer, hiding the fact that it's really split into lots of separate objects. I'd like for example to move an object like a player or something along the spline and be able to easily go past the ends of one spline into another without having to think about it or reinterpolate manually or whatever other workaround. ie blowing the lid off the current `limited` length of each segment and working at the more abstract level to move things along it. That would make it much easier to implement various games without dipping into extra code.
     
  21. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Submitted a small update to MegaShapes to the asset store, this brings a couple of bug fixes the interpolation of constant speed splines when they were either opened or had been reversed. Also added some loop modes to the path and shape follow scripts and finally the ability to animate splines inside Unity, will be doing a video guide for how to do that shortly.

    Changes in v1.73
    • Fixed bug when constant speed opened splines are reversed.
    • Added loop mode to Path Follow script so you can pick from Clamp, PingPong, Loop or none.
    • Added loop mode to Shape Follow script so you can pick from Clamp, PingPong, Loop or none.
    • Fixed a bug where constant speed interpolation was not being used for open splines.
    • Added the ability to create animated splines inside Unity, you can now add keyframes for splines and have them played back for you.
     
  22. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    I have mega-fiers and mega-shapes. I'm prepping for a game that can make use of mega-shapes but I don't have the time to dig into the documentation at the moment, but I notice in these posts you mention scattering. Is the mega-scatter tool a totally seperate asset or is it built-in to mega-shapes already to any degree? If so, to what extent? I'm looking at mega-scatter because of the mesh combination feature so it's that I'm really interested in.
     
  23. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    MegaScatter is a standalone product that does include the basic version of MegaShapes, so you get the spline system and the basic spline to mesh options. MegaScatter then uses those splines to define the regions to scatter into.
     
  24. sicga123

    sicga123

    Joined:
    Jan 26, 2011
    Posts:
    782
    Ok, great.
     
  25. XeviaN360

    XeviaN360

    Joined:
    Jun 3, 2010
    Posts:
    181
    A lot of ultra cool MegaPlugins here! I think we only miss MegaMesh for boolean operations. Is it coming or will it be integrated into another MegaProduct?
     
  26. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    That will form part of MegaMesh, the problem is finding the time to finish it off.
     
  27. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    An update to MegaShapes is now available, it adds a new method to the Spline API to be able to build splines out of an array of world space points BuildSplineWorld() previously the points were expected in the local space of the spline. We also fixed a small bug in the simple loft where the number of cross section vertices was one less than it should be in open spline cross sections. Also added is another UV option in the simple loft layer that acts a little like the Physical UV mapper but instead bases the length uv coordinate on the width, this makes it a little easier to get your textures to fit the loft nicely. And finally we added a new helper script that allows you to constrain objects to splines but allow then to jump and interact with the background, s short video on that is below.
    [video=youtube;4V5Oii3LnoU]http://www.youtube.com/watch?feature=player_embedded&v=4V5Oii3LnoU

    Changes in v1.74

    • Added a BuildSplineWorld method to the api so splines can be built from world space points.
    • Fixed a bug in the Simple Loft layer where the cross section vertices were not calculated correctly.
    • Added another option to the Simple Layer UV params, ‘Calc Y’ will work like Phys UV but keep uv x between 0 and 1 and calc y based on length.
    • Added a beta of a new path follow script that will allow characters to be constrained to a path but otherwise be allowed to move freely and jump etc while on that path MegaCharacterFollow.cs
     
  28. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    The spline system in MegaShapes now supports twist values on each knot that make up the splines, this now makes it very easy to control the look of any mesh generated from the spline or to add banking effects to objects moving along the splines. Each knot can have its own twist angle and is not limited so extra spins can be applied easily.

    The Lofting system included with the full version of MegaShapes also makes use of the Twist values allowing you to quickly and easily add banking to your lofts, this could be done via a separate curve before and that curve can still be used on top of the knot twist values.
     
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have just submitted an update to MegaShapes to the Asset Store, this brings the new knot based twist angle system and changes to the Simple Loft Layer and Path Follow systems to take advantage of the new twist system.

    Changes in v1.75
    • Added beta support for twist values per knot, currently works for Simple Loft Layer.
    • Knot twist value now used in the extruded mesh options box, tube and ribbon
    • Path Follow script can use knot twist values
    • Character Follow script fixed.
    • New methods in API to Interpolate and get twist along with position
     
  30. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Another small update to MegaShapes, sees better handles for the knot twists as a small bug fix for splines with sharp corners. Also fixed a position bug in the smooth walk loft script and also made that compatible with the new knot twist system. The normal Walk Loft system works automatically.

    Changes in v1.77
    • Walk Loft smooth bug fixed where position was wrong if loft not at 0,0,0
    • Walk Loft smooth now works with the twist values
    • Changed the knot twist handle to make it simpler and less cluttered.
    • Fixed a slowdown that could happen with twist handles enabled.
     
  31. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Yet another update, the new knot twist system is now supported by all the Loft layer types so Complex loft and the Clone and Scatter spline layer types will now use the twist values. We also made the new Walk Loft Smooth work with the complex loft layer. Also fixed some bugs, the Copy layer system was not working nicely with some loft layers so the new layer would not become visible until its vertex count changed, copy layer now works correctly on all layer types, also fixed an exception error that was given when a layer was copied, this didnt effect the functionality at all and finally fixed a bug in the Create Layer popup window which didnt allow you to set the init values for the simple and complex layer types.

    Changes in v1.79

    • Fixed bug where a duplicated layer was not showing up in the until its vertex count changed.
    • Fixed the exception that was reported when layers were copied.
    • Fixed bug where you could not set the init values in the layer create window for simple and complex lofts.
    • Complex loft now works with knot twist values.
    • Clone Spline Simple layer now works with knot twist values
    • Clone Spline layer now works with knot twist values
    • Clone Spline Rules layer now works with knot twist values
    • Scatter Spline layer now works with knot twist values
    • Walk Loft smooth now works with complex lofts as well.
     
  32. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Another week another update. This brings the ability to now select a path spline from a shape with multiple splines in it for the Complex Loft layer, the simple Loft layer already has this option. Also updated the walk loft scripts to work correctly with lofts that use splines in multi spline shapes. The curve select was also not working correctly on the Clone Spline Rules layer so that has been fixed, and also the Create Layer pop up finally works correctly for all layer types. End caps were broken a little in the previous update so for non closed cross section splines they were a tri short and finally fixed a bug that was causing one extra vertex per loft section from added.

    Changes in v1.80
    • Fixed the Create Layer popup window so the params are correct for all layer types now.
    • You can now select the spline to use in the Complex loft layer when the path shape has more than one spline.
    • Walk Loft smooth works correctly when loft uses a curve value other than 0
    • Walk Loft works correctly when loft uses a curve value other than 0
    • Curve value now works correctly on Clone Spline Rules layer
    • Fixed end caps being one tri short in some cases on simple loft layer
    • Fixed bug causing extra un needed vertex being added per cross section in simple loft layer
     
  33. sc3

    sc3

    Joined:
    Nov 2, 2010
    Posts:
    103
    Hi Spookycat

    I recently bought MegaShapes, for animating a train along a spline. I've got the train working, and now want to loft some tracks along the spline.

    It works to some degree - I've noticed that somewhere, my spline appears to be twisting so that some of it is upside down. Like so:

    $splinetwist.jpg

    I can't seem to twist the knots to get it back upright. Also changing the "twist" value in the Spline Data list doesn't seem to do anything.

    As well, I've used the Spline Data list to set all my knots on the ground (X = 0), however some of the handles are not sitting on the ground and this results in the spline not sitting on the ground perfectly. I can't seem to find a way to modify the handles via precise coordinates, and dragging them manually to the ground is very tedious and difficult to get right. Is there a way I can make the entire spline sit on the ground at 0?

    Thank you.
     
  34. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    If you could submit a support ticket at the website we can get those problems solved for you.
     
  35. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748

    First look at a new layer type being added to our MegaShapes system, the track in this image is built with a single loft from one path spline and one cross section spline, all the materials and textures are added and blended by the new Multi Material layer.

    The new Multi Material layer allow you to define a material per spline section and the vertex color system in MegaShapes also allows you to blend multiple textures on each of those textures. The track is one single mesh procedurally created and easily editable in the editor or at runtime. You can off course make use of the other layer types on the system to add more detail, ie crash barriers, trees, place objects etc.

    Video guide to the Multi Material Layer
     
    Last edited: Apr 4, 2014
  36. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have just released version 1.81 of MegaShapes to the AssetStore and our website. This brings the beta version of the new Multi Material Layer that is shown in the images and videos above, allowing for lofts to have multiple materials in a single layer so making it a lot easier to build more interesting lofts such as the race track in the image which uses just two splines and a single loft layer. You have complete control over the density of the mesh produced so making it easy to change the vertex count for different platforms, or for building sections of track at different detail settings to make lod objects etc.

    We have also made the spline system a little friendlier to use such as adding buttons to flatten splines or remove all twist angles from a spline and added an easing option for the twist angles to get a smoother transition between angles.

    Also we will be increasing the price of the system a little in the near future so if you are thinking of making a purchase don't wait too long.

    Changes in v1.81

    • Added new race track demo scene
    • Fixed twist angles not being calculated correctly for out of range values on closed splines.
    • When adding a new knot it will now use the ID and Twist value from the previous knot
    • Added a Flatten button to the inspector so you can quickly flatten any spline
    • Added a Remove twist button to the inspector to reset any twists on a spline
    • Added a SetHeight method to the API so you can quickly set all knots and handles for spline to the same height
    • Added a SetTwist method to the API so you can quickly set all the knots in a spline to the same twist angle
    • Added option to choose easing mode for twist values, either Linear or Sine at the moment.
    • Added id values to the spline knots.
    • Added beta of new Loft Layer, this uses the new knot id values to assign different materials to the cross section, this allows a simple loft to easily have different materials applied.
    • Context Menu Help now works for Complex and Multi Mat layers
    • Demo scenes tidied up
     
  37. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    That's a pretty amazing update!

    1. Are there any plans on adding an 'alternate path' / 'split path' feature? For example, shortcuts in racing games. I know the vertice math is going to be crazy to allow a 'Y' intersection, but this would open up a ton more game types / options.

    2. Any progress on an endless runner mode? Where you can dynamically add more nodes to the end of the spline node list (and remove ones from the beginning). Or append and blend two spline paths together?

    Thanks,
     
  38. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    The splitting and joining of paths is pretty hard to solve on a basic loft with a single material but with multiple materials the problem is just not well enough defined to have a solution with out having overlapping materials etc, what happens in the area of the junction could be anything. I don't even know of any papers or other solutions that even attempt it, if you know of any please do share. The only real solution is to have junction meshes where a loft can join up and then start again from junction points. That is a system I am tinkering with but no guarantee as to when or even if it will be added at this point.

    The endless runner thing is very high on the todo list, got some issues that need ironing out with the current layers and a few extra params adding that will make life a lot easier, not that it cant be done now but it could be made easier.
     
  39. DougMcFarlane

    DougMcFarlane

    Joined:
    Apr 25, 2009
    Posts:
    197
    Thanks for the reply.

    I can barely wrap my head around how the 'Y' split algorithm would work. Where the two paths meet (in 3d space) would be the first point where any vertice from path 'A' overlaps any vertice on path 'B'. How do you determine if they 'overlap'? They could be oriented in any direction in 3d space. Ha, is this even possible?!

    Would this be easier to figure out if instead of two paths diverging and merging, you create an irregular shaped 'hole' in the surface (of the only path)? Maybe add parameters for hole boundries, like extra layers, objects. The 'hole' could be a simple spline running with the path with parameters such as position relative to the path, and curves to control the hole's start, middle, and end widths.

    For racing (for example), the road would become very wide with an 'obstacle' in the middle consisting of the inner area between the two pseudo paths. You could add extra objects / layers to create the inner path boundies.

    Just trying to come at this from another angle. Good luck.
     
  40. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    If the loft was just modelling one type of object say it was designed to just do roads with a pavement and grass area then you can tailor a solution to that for junctions, but a general lofter that could be used for any type of shape with all sorts of materials, cross sections, layers on top it becomes a much bigger problem.
     
  41. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    New feature we have just added to MegaShapes, now you can have your terrains match perfectly to your MegaShapes lofts with a click of a button, the system will match up whatever terrain you have so that the sides of your loft blend in nicely. You have complete control over the distance the blend happens as well as the profile of the blend. So now making race tracks or any other game level with MegaShapes is even easier and more fun. Also remember the system also includes the option to have your loft conform to the terrain, so you can easily meet in the middle if you wish, ie make a flat track then conform that a little to your terrain then carve the rest. It is up to you, you have complete freedom to experiment as everything is procedural. Even while your game is running you can have the the terrain adjust so making track or level editors easy. And again as everything is procedural you can adjust the number of vertices depending on the system the game is running on, or have your levels be built at runtime so making your games much smaller and load faster.

    Also added support for loading KML files as splines.

    Terrain Carve

     
    Last edited: Apr 14, 2014
  42. radimoto

    radimoto

    Joined:
    Aug 23, 2012
    Posts:
    257
    Looks really awesome!!

    Can you confirm if this only work with Unity Terrain? Could it support mesh terrains for use on mobile?
     
  43. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    That particular script works with Unity terrains, I will be extending it any mesh but there will be some limitations on those ie they will need enough vertices if you want a perfect join, if its just a close fit then fewer vertices will work but obviously trying to fit a terrain mesh of a couple of hundred vertices around a loft is not going to come out too well.
     
  44. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    We have just submitted version 1.83 of MegaShapes to the Asset Store. This brings the beta of the new Terrain Carving system shown in the video above, we are just doing the docs for this new feature and they will be on the website later today. We have also added an option to import KML files for your splines which can be quite useful for those wanting to model tracks. Other than that it is just some small bug fixes.

    If you use the new Terrain Carve system please remember it is in Beta so there could be some unknown issues, so please make sure you save you scene before you use it just in case something happens to the terrain data. To use the system just add the MegaTerrainCarve script to your terrain object and select it as the Terrain in the inspector, then select the loft and the layer to carve. If you then click the Save Terrain button the current state of the terrain object will be saved so it can be restored later if you need it.Other than that play with the values and click the conform button. Complete docs will be ready later.

    KML File of Leman in Google Earth
    $lemankml.jpg
    Same KML imported into MegaShapes

    $lemankml4.jpg

    Changes in v1.83
    • Beta of the Loft Terrain Carver added.
    • Fixed error message when deleting a layer from a loft.
    • Changing a spline used in a loft will now automatically update that loft, no longer need the realtime option set
    • Added KML import of splines
    • Offset value in Path Follow now works correctly
    • Multi Mat Layer include knots bug fixed.
    • Track demo scene improved.
     
    Last edited: Apr 15, 2014
  45. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Nearly done adding Mutli Material support to the complex loft layer, so you will be able to have any number of different cross sections along your loft path so being able to have more control over the resulting loft.
    $multimatcomplex.jpg
     
  46. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hello there, i have a question that may as well mean a 'will buy' from me, but i hope you can answer quite quickly as time is relevant

    If i'm not mistaken, with your latest additions (deform terrain, multi-material, scattering) do you think it would make perfect sense and entirely possible to create extremely realitic rivers and streams with this? The complex loft allows you to change the profile of the loft per segment right? and you could define quite complex banks and carve the terrain up quite well - and as im using RTP, i'd be able to use the geometry blend to smooth it out?

    When you scatter objects, can you choose which section of the profile you would scatter along? So i could scatter trees and other features along the banks and various types of stones, underwater vegetation and suchlike along the bed? I'm presuming i could create a river water surface by adding a less complex loft along the same spline (Forgive my ignorance on all this implementation), and the UVs follow the shape of the river? (I'm thinking of creating vector fields for finer river control on top of this)

    If so, that would be very useful and i'm having a good think about purchasing - The terrain deformation is selling it to me atm, would make it very easy to carve interesting forms into a terrain
     
  47. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Just submitted an update to the asset store. This adds the beta of the new Multi Material version of the complex loft so you can now have any number of different cross sections along your loft with different materials defined. There is no error checking at the moment on material ids so you need to make sure the cross section splines have the same number of knots in them and the material ids match. I added a method in the extra functions section in the inspector to allow you to copy ids from the previous spline so you don't have to go through every spline in a shape setting the ids for each one.

    The terrain carving works with the new layer but at the moment conforming does not work that will be in the next update. We also made some improvements to the carving system making it a little easier to use. The spline system has had some little extras added such as hiding the origin handle as it did get in the way of some knots sometimes and added a snap option to the knot and handle movement.

    And there are a few bug fixes as well.

    Changes in v1.84
    • The gizmos for Complex Loft now align correctly if twist mode active.
    • Added beta of the new Multi Material Complex loft layer.
    • Copy Knot IDs function added to extra functions section of Shapes inspector. Copies ids from the previous spline in the shape.
    • Terrain carve works with new Multi Mat complex layer
    • Terrain carve left and right scale values now don't effect one another.
    • Fixed a bug when Calc up was on on Clone Rules layer causing meshes to deform.
    • Knot index now shown in the inspector for easier editing.
    • Toggle added for drawing the origin handle that moves all the knots.
    • Added snap option when positioning knots
    • Added snap option when positioning knot handles.
     
    Last edited: May 6, 2014
  48. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    A small update to MegaShapes is in the Asset Store now which just brings a couple of bug fixes.

    Changes in v1.85
    • Fixed bug in Multi Mat Later where last vertex wasn't being added if cross distance value was large.
    • Duplicate layer now works for Multi Mat layer
    • Duplicate layer now works for Complex Multi Mat Layer
     
  49. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    Another small update to MegaShapes that adds ground conforming support to Multi Material Complex loft layer and fixes a small bug in capped lofts when conforming.

    Changes in v1.86
    • Conform now works in the Multi Mat Complex layer.
    • Fix bug when conforming simple mod layer with capped ends causing excetion in some cases
     
  50. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    Does this system work in Unity free?