Search Unity

27 Slicer - 9 Slicing, but for 3D meshes.

Discussion in 'Assets and Asset Store' started by Du-z, Nov 19, 2021.

  1. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19


    Scale Models Without Stretching The Details.

    User Manual | API Documentation | Online Demo | Asset Store

    27 Slicer is a Unity plugin that can dynamically resize models. 27 Slicing allows a 3D mesh to be scaled to many sizes with a single asset. This can be done at runtime, design time, or even exported as an Unity Mesh Asset.

    Slice Meshes -> Slice 3D Meshes and modify its size without distorting its details like scaling would. You can even reduce the size of the model.

    Slice Colliders -> Slice 3D Mesh and Box Colliders to match the sliced meshes.

    Slice Modifiers -> Add modifiers to reposition and resize children of sliced Game Objects.

    Export Sliced Meshes -> Export sliced meshes as a Unity asset. The exported mesh asset can then be used like any other mesh in Unity.

    Compatibility -> Compatible with the Built-in Render Pipeline, URP and HDRP.

    Source Code -> Full C# source code is provided.

    Online Documentation -> Comprehensive API Documentation and User Manual.



     
    Last edited: Jun 24, 2023
  2. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Well done for building such a smart tool! I have wanted to see someone tackle a 3D version of 9 slicing before, and it looks like a well considered implementation.

    I do wish the UX was a little better. Resizing via the numbers in the component is pretty fiddly vs scaling with the gizmo in the editor. Right now I'm using the Rect tool extensively and then replacing the badly scaled objects. Is it possible to convert the current object scale to a sliced equivalent? It could speed things up a lot, especially if that button could be assigned to a hotkey.

    Is it possible to export the scaled mesh to the project file?
     
  3. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi, thanks for you input!

    When the Slicer Controller is in edit mode you can change the slices with gizmos, but not the size (You can see it in action HERE). I have put 'Size Gizmos' in the the backlog for the next update.

    for your 'badly scaled objects', are these object that have a non uniform scale and you wish to bring them back down to a scale of (1, 1, 1)? I can certainly see a little utility like this working. I'll see what can be done.

    At the moment the sliced meshes cannot be exported. It is in the backlog though as part of a larger 'Mesh Baking' concept.
     
  4. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    145
    @Du-z Really nice asset!
    I have a question: if I laod a model at runtime (with any importer available, as FBX or GLB), and that the model is a proper '3D mesh' inside Unity, will your asset work at runtime (meaning can I add scripts to the model at runtime and slice them)?
     
  5. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi Pode, Thanks for you words of encouragement!

    Yes, you can certainly modify the slices and size at runtime. To improve performance the slice will not be automatically applied, you must call SlicerController.RefreshSlice() or if you are making adjustments every frame, you can override this behavior in the Configuration Window.

    The models in the videos above are COLLADA (.dae) files. They are modified at runtime using Unity Timeline with
    Refresh Slices On Update
    turned on in the 27 Slicer Configuration.
     
  6. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    I'm basically resizing the base transform scale with the Rect tool to make objects that fit the location. With something like this I'd want it to react to this scale value, or possibly have a single button to multiply this value by the current Slicer size.

    Being unable to export the object is a great shame, and will probably prevent me from buying it. I'll keep an eye out for updates in the future.
     
  7. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    145
    @Du-z thanks for the quick answer. Just to be sure, the slicing is done in a c# script, not in the vertex shader?
     
  8. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Thanks for your consideration dock.

    @Pode

    Slicing is all done in C#, The shader and materials you apply to the model will not be modified.
     
  9. Pode

    Pode

    Joined:
    Nov 13, 2013
    Posts:
    145
  10. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Thanks for your support @Pode it is very much appreciated! Let me know how you go with it :)
     
  11. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi All,

    Today marks the first update for 27 Slicer. Thanks for all of the great support and feedback so far, it has been amazing!

    v1.1.0
    Released 2021-11-30

    • Added Slicer Controller Slice Modifier which allows a parent Slicer Controller to modify a child Slicer Controller.
    • Added Hotkeys to Slicer Controllers. See Slicer Controller for the list.
    • Added 'Swap Scale With Size' utility to Slicer Controllers. Right click the top bar of the Slicer Controller.
    • Improved the look and function of the Slice Gizmo and added a Size Gizmo.
     
  12. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi All,

    Today we are releasing the next update to 27 Slicer. This update focused on the first stage of the Mesh Baking feature set. It adds a Sliced Mesh Exporter which will allow any sliced mesh to be exported as a Unity Asset.




    v1.2.0
    Released 2021-12-19

    • Added Sliced Mesh Exporter window, which can export any sliced mesh as a Unity asset. The exported mesh asset can then be used like any other mesh in Unity.
    • Sliced meshes now gets their Mark Dynamic property enabled.
     
    shyamarama and dock like this.
  13. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi All,

    We have another release for today. In this update we focused on adding ‘Slice Finalization’. This feature sets up the scene to use sliced meshes and then destroys all of the Slicing Components. This results in Sliced Meshes but with no performance overhead from the Slicing Components.

    Checkout the Optimizations manual page to read up more on how this feature can be used.

    v1.3.0
    Released 2022-05-01

    • Added Slice Finalization, which can be used to optimize a scene that makes use of slicing, but does not require real time slicing. See the Optimizations manual page for more information.
    • The Sliced Mesh Exporter window can now skip exporting individual files via a checkbox.
    • Improved inspector behavior when selecting multiple Slicing Components.
    • Tested and confirmed compatibility with LOD meshes.
     
  14. dock

    dock

    Joined:
    Jan 2, 2008
    Posts:
    605
    Really glad to see this project continue, and the addition of sliced mesh exporting is a big improvement. Unfortunately the price is quite high for something so specific. I’ll keep this in mind if I have a project that will benefit from it.
     
  15. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Hey, very cool asset.

    I'm wondering about performance at runtime with meshes that have lots of vertices.

    Is 27 slicer performing scale/position operations to the internal transforms/slices that we previously define in "Edit" mode? So it would be like scaling 27 (or 23 minus the 4 corners) transform operations?

    Or is it rebuilding the mesh (changing vertex data) with every scale change?

    Thanks
     
  16. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi there, good question.

    It modifies each vert in the mesh, In short it uses the last way you described.

    If you are looking for a bit more performance and are happy to get your hands dirty, you could look at adding a code path that uses a compute shader if the hardware is available. The for loop at the bottom of SliceUtility.SliceVerts(Mesh, ...) could be translated into one.
     
    iddqd likes this.
  17. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    501
    Ok, thank you for the clarification.
     
  18. Rayd-GmbH

    Rayd-GmbH

    Joined:
    Jun 3, 2015
    Posts:
    6
    Hey, i recently bought your asset as it is exactly what i need for a current project - the slicing is nice, but i am having some issues with Undo/prefabs.
    Whenever i undo anything, it breaks the sliced mesh and i can only revert it when resetting the mesh on the mesh filter to the original mesh. I have the same problem when duplicating an object - the meshes of one object are overridden by the other one. Though those issues can somehow be worked around, iwonder if i should "upgrade" all my meshes to be sliced... is there anything i can do to change this behaviour?
     
  19. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi, Thanks for the questions, sorry to hear you are having issues with the undo and duplication.

    I'll have a look at what changes I can make to improve the behaviors of both of these.

    What version of Unity are you using for your project?
    Could I also get you to describe the steps to reproduce the issue when duplicating an object please?
     
  20. Rayd-GmbH

    Rayd-GmbH

    Joined:
    Jun 3, 2015
    Posts:
    6
    Thanks for yout quick reply, i am using Unity 2022.3.4f1.

    The bug i have with duplicating:
    1. create a new scene, new object, add slicer controller and mesh slicer component
    2. add any mesh (default cube) as child, setup slicer controller to do some slicing, change the size
    3. duplicate the object, change the size: both objects change sizes, they share the same mesh
    (4. revert the mesh filter back to the original "cube", now they do not share the same mesh and working as expected)

    The undo bug could have been related to this, as i have duplicated some items before - i will try it and see if i can reproduce. Thanks!
     
  21. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi, I have found the cause of the bug.

    I need to add some test cases before I submit the change to the store, the store submission can take a while to go through.

    In the mean time I will send you a PM with the fix.
     
  22. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Hello! :D friendly question, do you plan on having a sale any time soon? :) I've had your asset up in a tab for the better half of a year haha and am quite interested, but am intimidated at the price for such a (potentially) fringe use case as I currently have.

    Cheers!
     
  23. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi,

    Next time the asset store invites the plugin to be in a sale I will add it. Unfortunately these things are by invite only though.

    I will send off an email to see if it can be added to the invite list for the next sale.
     
  24. thatscraigz

    thatscraigz

    Joined:
    Mar 27, 2015
    Posts:
    100
    Deal! That sounds great! :D thank you!
     
  25. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi All,

    Seeing as I haven't heard back from the email yet I have decided to manually reduce the price of 27 Slicer.

    I have updated the listing manually to be 50% off for the next week.
     
    shyamarama likes this.
  26. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    Hello, I'm trying to scale a rounded corner rectangle and the scaling part works great but the UV's not so much. They seem to be correctly scaled in the center but not on the remainder of the rectangle.
    Do you have any insights of why this occurs or how to fix it?

    Original FBX (while editing the slices):
    roundedRect-editmode.jpeg

    Scaled FBX:
    roundedRect-scaled.jpeg
     
  27. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi,

    It is likely that the vertices for the left and right sides are falling outside of the slices that are doing the stretching.

    See how the top and bottom are being scaled as you would expect. See if you can get the slices to be placed the same way relative to the vertices.

    Failing that feel free to DM the model and slicing configuration and I can have a closer look at it for you.
     
  28. luispedrofonseca

    luispedrofonseca

    Joined:
    Aug 29, 2012
    Posts:
    943
    @Du-z I don't think that's the case. The model is pretty basic and the slices seem to be correctly setup. I'll send a DM with the project file if you don't mind to have a look. Thanks, appreciate it!
     
  29. Du-z

    Du-z

    Joined:
    May 10, 2013
    Posts:
    19
    Hi All,

    Today signifies the launch of version 1.4 of 27 Slicer.I have completely rewritten how 27 Slicer modifies the UVs and added a lot more control and settings in. Thanks to @luispedrofonseca for raising this issue!

    Checkout the Upgrading Guide page to see the best practices when Updating 27 Slicer.

    v1.4.0
    Released 2024-01-07
    • Added a lot more control and options to UV slicing.
     
    shyamarama likes this.
  30. Igotlazy

    Igotlazy

    Joined:
    Jan 15, 2018
    Posts:
    65
    Hey there. I'm looking to be able to slice meshes in a way where I can get consistent outline widths regardless of the size of the mesh. Is this asset able to do that?

    This is what Unity gives as default behaviour with a cube mesh, which is to be expected.
    upload_2024-2-12_18-14-34.png
    I effectively want the vertical outlines to be the same size as the horizontal.