Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Turbo Slicer

Discussion in 'Assets and Asset Store' started by ThatJoeOverThere, Aug 27, 2012.

  1. LaserSaber

    LaserSaber

    Joined:
    Jul 20, 2010
    Posts:
    11
    @Toby Grierson

    Great! I look forward to the next update. Playmaker actions will be a great addition. Any performance updates for faster frame rates will be much appreciated. I have already finished my game which uses your wonderful plugin. It is in the "Waiting for Review" phase at Apple.
    [video=youtube_share;Ssyfw_VokzA]http://youtu.be/Ssyfw_VokzA
     
  2. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Any news? I sent in my invoice number a month ago... ?
     
  3. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Turbo Slicer 1.5 has been sent to Unity for review.

    Changes:

    • Normals are toggled in editor instead of preprocessor
    • Tangents, UV2 support added.
    • Infill more reliable.
    • Infill no longer mangles UVs, Normals on unwelded verts.
    • Demos use pseudonamespaces to avoid name collisions (components are prefixed with TSD1, TSD2.)
    • Some Unity 4 compatibility fixes.

    The summary in post #1 of this thread has been updated to reflect changes.

    The todo list is shrinking. Next update will probably involve further cleanup and profiling.

    Skinned mesh support without ragdoll processing is on the cards but I can give no ETA right now. For ragdolls, I refer y'all to Limb Hacker.
     
  4. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Awesome, just updated it. But I ran into a problem upon importing :

    "Assets/Noble Muffins/Turbo Slicer/Slice By Line Demo/Target.cs(11,16): error CS0246: The type or namespace name `MuffinSliceDemonstration' could not be found. Are you missing a using directive or an assembly reference?"
     
  5. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    That's very strange. Are you able to roll it back? Do you have a backup?
     
  6. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Yeh, sure. I can roll back. But I want those new features! :D

    So what's causing this?
    "...namespace name `MuffinSliceDemonstration' could not be found"
     
  7. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    I'm not exactly sure why this is occurring, but it sounds like Unity doesn't import things the way I thought, which is pretty embarrassing and I'm at a loss of what I should do.

    But here's what's happening and how to upgrade you.

    I changed the demo's components to different names in a different folder. I though it would put this in alongside what's already there. It did not; it appears to have replaced some, but not all, code with the new code.

    So an old Target.cs is referring to MuffinSliceDemonstration, which is now TSD1somethingsomething.

    Easy fix; deselect the demo code. Don't import it.

    The rest should be fine.

    Let me know how that goes.
     
  8. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Yep, after deleting Target.cs seemed to do the trick! No more error! Thanks! :)
     
  9. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Delightful! I thought about that but didn't suggest it as I didn't know what else might have been wrong. But I'm glad it works now.
     
  10. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    BTW, isn't Target.cs deprecated already? Kinda strange it was still there.

    EDIT : I went to check on the Asset Store's own "Package Contents" list and I couldn't find the Target.cs on the list anymore. Did you just updated it by removing that file? Or maybe this is due to the effect of Asset Store only unzipping content to the same directory every time you update the package? (instead of deleting the old package directory it merely copy the new over the old.... which could cause this with the old files still exist on the project).

    If the later is true, that means updating procedure would require deleting Turbo Slicer directory from the project before updating and importing back in to the project.
     
  11. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Basically, Target.cs is now TSD1Target.cs. If your build is working (and you got that error) it means that everything else was updated correctly. I think that it somehow didn't recognize that Target.cs and TSD1Target.cs were the same, though it did work with everything else. Apparently zapping Target.cs fixes it.
     
  12. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    So the whole idea of putting the demos into the package, letting people revise them, then updating them was completely and totally bonkers and I should be flogged.

    The package is being updated like so:

    -Demos will no longer be in there.
    -Demos will be downloaded from the website.
    -Demos can be downloaded for Unity 3 or 4.

    I found serious problems importing Unity 3 scenes via the package system and to solve it I am providing separate Unity 4 packages made in Unity 4. The same will occur for Limb Hacker.
     
  13. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Hey Toby, I got a tip for you - did you know that you can pack ZIP FILES into your Asset Store packages? :D
    It means that you don't have to force users to download the demos from website (or even looking for it - you forgot to provide the download link for the demos :p) - you can just pack TWO ZIP FILES (and mark them accordingly as "TS_Demo_Unity3.zip" or "TS_Demo_Unity4.zip") into your Turbo Slicer Asset Store pack and when user finish updating - you can just tell users to unzip the demos inside the project folder according to their own version number. How easy is that! ;)
     
  14. bravery

    bravery

    Joined:
    Mar 26, 2009
    Posts:
    270
    Hi Toby,

    I purchased this kit, and send you an email about an issue yesterday.

    The Issue is about creating alternative objects when slice the original object.

    Appreciate your support and quick reply.
     
  15. S Gage

    S Gage

    Joined:
    May 30, 2013
    Posts:
    7
    Hey, so this seemed easy enough to get something simple up and running,

    I seem to be having a lot of trouble getting shapes to fill their holes correctly when sliced. A cube seems to work ok, though after slicing two or three times it often fails to fill. I also have a lot of problems with cylinders. What are the limits of complexity? You mentioned a sphere in the documentation so I shouldn't be close to hitting it.

    One modification I had to make was a cooldown on the sliced objects before they could be re-sliced, otherwise I always ended up with a load of tiny thin slices between the main two chunks of a sliced object when I used your slicer prefab. Is that normal?

    Also, I can't get the infill stuff to work (consistently shows the material with its initial UV coordinates), but I'll fiddle around with that for a bit longer unless there are any particular gotchas you know off.

    Finally, is there a reason you've disabled multi-object editing? I can work around it but it'd be nicer if I didn't have to.

    Cheers,

    Sam
     
    Last edited: Aug 19, 2013
  16. S Gage

    S Gage

    Joined:
    May 30, 2013
    Posts:
    7
    The infill problem seemed to be related to the texture x,y,h,w coordinates not being set up correctly. I see that the new coordinates are relative to the old ones, so a material set to 0.5 tiling in the x will need to be offset by 1 in the infill settings to be actually offset by 0.5.

    I think that was the only real problem I had. I'd suggest the option to specify absolute or relative coordinates would be nice.
     
  17. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Hi, sorry to reply late. The infill issue is being examined. It has been a bit buggy for a while and is kind of complicated actually.

    I'll see what I can do to add multi object editing.
     
  18. Harry Nguyen

    Harry Nguyen

    Joined:
    Aug 5, 2013
    Posts:
    17
    Dear supporter,
    $TurboSlicerEmpty.png
    I have already implemented Turbo Slicer on my project.
    This work properly except sometime object some missing fill area at slice.
    For example I slice an orange, the result are 2 half of orange, but sometime there are display only 2 part without anything inside.
    Could you please point me what problem here?

    Regards,
     
  19. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    This happens sometimes. I have improved this dramatically and these improvements will be in the next update. I'm working really hard to get this and the new Limb Hacker out soon. Write to toby at noble muffins dot com and I will reply to you when this update is up.
     
  20. Harry Nguyen

    Harry Nguyen

    Joined:
    Aug 5, 2013
    Posts:
    17
    Oh, I see sample Synergy Blade and other games are not empty, so I think I wrong on implement, it is appear many times.
    Thanks.
     
  21. ActarusItA

    ActarusItA

    Joined:
    Feb 28, 2013
    Posts:
    3
    Hy All This is my game made with Turbo Slice Library:

    https://play.google.com/store/apps/details?id=com.halloween.slice

    It's time to try something else. Halloween Slice is the first slice game with a 3D HD scrolling levels!
    Become a Ninja by slashing away by your finger wolfs , zombies , vampires , mummies and other terrific creatures.
    But be careful...don't cut the venom potions , if you don't want get in trouble.
    Grab along the way the enchantments to use against the malefic monsters!

    $SCREENSHOT3B.png $SCREENSHOT1B.png $SCREENSHOT4.png
     
  22. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Hey, I mentioned your game on Facebook.

    News

    New Turbo Slicer

    Bugs fixed include a memory leak, a problem transferring collider properties to slice results, ... More reliable infill (if problems continue for people I have a plan B so let me know), multi-object support in the inspector, some performance improvements.

    New demos with cleaner code, I hope. Deployed via the site so TS updates don't mangle your modifications to them. The updated manual describes what each class in each demo does.

    Tutorial video shows adding Turbo Slicer to the "Sword Demo", and adding an object to the "Touch Slicer" demo.

    A good chunk of work was done in its sister-product Limb Hacker. When the update for that comes out, they will both support the same "slicer" construct and use the same "Sword Demo".

    There was some refactoring. If it gets mangled in the update, let me know at toby at noble muffins dot com and I will walk you through repairing your setup.

    I did my best (manually modifying the meta files and including "stubs") to ensure that it overwrites the prior version effectively but the system isn't perfect.
     
    Last edited: Oct 28, 2013
  23. Headworker

    Headworker

    Joined:
    Sep 6, 2012
    Posts:
    28
    Hello.

    Could this tool also be used to gradually cut a mesh? Im currently trying to build something with welding / cutting meshes with a torchlight. Im looking for a possibility to cut (dent) into meshes gradually, until they are fully cut
     
  24. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Unfortunately no; that would be a very different beast.

    You probably want to use voxels; you have something like a 3D array of values representing the presence of material which is easily modifiable and a renderable mesh based on this array.

    You torchlight would change figures in the 3D array and, in the view adapter's Update thread, it would check for changes and rebuild the mesh if appropriate.

    Likely much has been written about this topic elsewhere. Challenges include building the mesh and transforming from world space to the object's voxel space.

    If this is a funded project and you need help, contact me toby at noble muffins dot com and I can build such a kit in about two weeks at cost.
     
  25. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, I bought TS very early before Limb Hacker, you did include Limb Hack in old version for us, how do I get latest?
     
  26. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Limb Hacker is a separate product.

    However the newest Turbo Slicer, up now (update in the Asset Store download manager or write me if you bought elsewhere) slices skinned meshes.

    It doesn't process rag dolls like Limb Hacker. It does this (the demo).
     
  27. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  28. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Yes yes, of course. Write me at that e-mail address please; I'll want your e-mail address.
     
  29. Aladinho

    Aladinho

    Joined:
    Jul 18, 2013
    Posts:
    9
    Toby Is this tool fit for game like "Slice summer" on android?
    I'm very interest to do something like that
     
  30. MaxB

    MaxB

    Joined:
    Jun 13, 2013
    Posts:
    13
    Looks like the site is down, where can we find the demos now?
     
  31. DD88

    DD88

    Joined:
    Jul 29, 2014
    Posts:
    1
    Does this work with 3D Text Meshes?
     
  32. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
  33. sr388

    sr388

    Joined:
    Jul 22, 2014
    Posts:
    2,817
    I have been looking for something like this for a while, it is an awesome asset, but I would like to know which asset is better, have a better performance, specially in mobile devices (where I am more interested to work with it), which is the faster, etc of the next assets:
    • piecemaker
    • turbo slicer
    • shatter toolkit
    I ask this because of all them have different price, and I want to know which is the best purchase, so if any of you have experience with this assets, please tell me what do you think about them.

    Thanks in advice.
     
  34. Megalithic

    Megalithic

    Joined:
    Apr 21, 2014
    Posts:
    61
    The site seems to be down. Any idea whats going on? I just found your product and was looking into it.

    Please let me know whats going on.
     
  35. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    267
    Looks good, and something I probably need for a project I'm now slowly starting (while still trying to finish a previous project)! The need might be computationally somewhat demanding though. Every single mesh in a potentially somewhat big area should be sliceable. So every single mesh should be matched against one or two slicers.

    Would it sound feasible that I would call bounds.Intersects for everything and in case it's true, then attach the sliceable script and do the slicing? Alternatively pretty much everything in the world could have the sliceable script to begin with. Either way, I'd probably need to do the intersects check on everything first in order to avoid calling slicing on everything. And maybe I should create a more effective, optimized method that would somehow deduct which meshes at least aren't gonna be sliced. Just not sure yet, how I'd do that.

    An additional question: will it update colliders too? I might eg. need a simple box collider to change into a mesh collider after slicing.
     
  36. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    It depends on how much work you give it, but computers are redonkulously powerful that sounds like something which would work. I also know for a fact that there are many relevant optimization techniques, like octrees. But computer performance is far too complex a topic to speculate about so just use a naive approach (foreach) to start and do not implement an optimization without an evidence-based justification.

    Yes. Once you ask Turbo Slicer to slice something, it's going to do a vertex by vertex analysis to determine if a slice is necessary.

    Turbo Slicer will slice an object which does not have a Sliceable component attached. However the Sliceable component carries configuration information. In order to hand-configure an object, you must do so in the editor by attaching the Sliceable component and entering data there. Use a script to attach the Sliceable component only if you are using a script to configure it.

    Colliders will update. Turbo Slicer's code does not create the new colliders; Unity code is invoked which will refresh colliders.

    After it is sliced, you will need to take the slice results (a set of two objects) and modify them.

    Create a component by subclassing AbstractSliceHandler and write your collider change code into the HandleSlice method. Then attach the component to the object in question.

    If you want to manage colliders yourself using a subclass of AbstractSliceHandler, than you will probably want to uncheck the "Refresh Colliders" box on the Sliceable component so that Turbo Slicer knows it shouldn't waste any time asking Unity to refresh the colliders.
     
    JeffersonTD likes this.
  37. JeffersonTD

    JeffersonTD

    Joined:
    Feb 5, 2013
    Posts:
    267
    All right. Thanks. I'll probably try it out, when it get I get to that stage with my project.
     
  38. Laiken

    Laiken

    Joined:
    Nov 18, 2015
    Posts:
    50
    Will Turbo Slicer have any problem cutting things with cloth component on it? And can I make it so it will only cut the cloth (and not the actual person together)?

    Thanks
     
  39. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    If the cloth is a mesh than the cloth will cut, however, it might not serve your purpose; if the cloth is a skinned mesh than it will become a non-skinned mesh.
     
  40. Laiken

    Laiken

    Joined:
    Nov 18, 2015
    Posts:
    50
    I see. Thank you
     
  41. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    By the way, if you're on a project with a budget, I am available as a contractor to make some bespoke cutting solution. Write me at toby at noble muffins dot com if you want to discuss it.
     
  42. Yoji-Ogita

    Yoji-Ogita

    Joined:
    Dec 14, 2015
    Posts:
    1
    Hi, Toby
    I use Turbo Slicer 1.7.4 and I see empty planes occasionally when I slice the object.
    I see your reply above saying sometimes it happens. Could you tell me what kind of conditions it meets when it happens?
    I would like to take a look at the turbo slicer code itself and would like to know where to look at it.
     
  43. wooncho

    wooncho

    Joined:
    Apr 22, 2016
    Posts:
    1
    Hi,

    To help understand my concerns, I am using Turbo Slicer 2. Anyway, when I build it using WSA, there is an error related to ThreadPool (System.Threading.ThreadPool.QueueUserWorkItem (ThreadSafeSlice.Slice, jobState) in TurboSlicer.cs because WSA does not support ThreadPool.QueueUserWorkItem. For this reason, I selected WorkerThreadMode.Synchronous to prevent from the error. For my case, how do I fix the error of the ThreadPool?

    Thanks,
    Woon
     
  44. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    Hi – Sorry about that. Easy to fix.

    Do you mean Windows Store Application?

    In TurboSlicer.cs on line 21, there is this code:

    Code (CSharp):
    1. #if UNITY_WEBGL
    This needs a little modification. It needs to account for WSA.

    Code (CSharp):
    1. #if UNITY_WEBGL | UNITY_WSA
    There seem to be a lot of options for Windows Store apps in the Unity manual. But if you understand the idea of the above code, you can tweak it further.
     
  45. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    So actually you need a double pipe, like

    Code (CSharp):
    1. #if UNITY_WEBGL || UNITY_WSA
    But you get the idea, right?

    Tell me – did it work?
     
  46. RFLG

    RFLG

    Joined:
    Feb 7, 2011
    Posts:
    153
    Hello, I've bought turbo slicer 2 and I have two questions: one is an issue, the other is more of a couple of execution pointers.

    I'm running unity 5.6.3p3

    Issue:

    -I have some very simple, low-poly meshes with read/write enabled, I've added the sliceable (with shreddable:ON) and shatter on click scripts, however I keep getting this error when trying to slice them:
    • "Turbo Slicer needs to read mesh 'Combined Mesh (root: scene)' on object 'Building-02-White', but cannot. If this object is an original, go to its mesh and enable readability. If this object is a slice result, go to the sliceable configuration on the original and turn on 'shreddable."
    Any ideas on what is going on?

    My next question is related with a specific implementation I'm doing:
    • If I wanted to implement Turbo Slice with a line renderer, e.g only cut where the line crosses, how could I do it (in general terms)? From what I've seen, I'd had to use the line slicer (since my line renderer has variable lenght), but I'm not sure on how to articulate Turbo Slicer's components to that. Can anyone help?
    Thanks for the help and for the time in advance!
     
  47. ThatJoeOverThere

    ThatJoeOverThere

    Joined:
    Aug 24, 2012
    Posts:
    120
    On the first issue, is it possible that the object you're passing to Turbo Slicer is not the object you think it is, or that it references a different mesh which is not marked as readable?

    In case you don't know what this means, this paragraph will explain. The graphics engine stores data in a way that is useful to the GPU, but not useful to scripts. Usually it is interleaved; sometimes it is on a different memory bus; etc. In order to provide mesh data to scripts, Unity keeps a copy of all mesh data in arrays of structs. This is done at the cost of system memory, so, Unity only keeps these script-readable copies if you explicitly ask it to using the "read/write" option on each mesh. If Turbo Slicer tries to consume _any_ mesh which does not have script-readable data, it will abort and give you that error.

    On the second. Have you looked carefully at the "slice by line" method on the TurboSlicer.Singleton object? It should allow you to pass in screen coordinates and a camera, provided that you have this information.

    If you're talking about a Unity3D line renderer in 3D space, are you able to observe its set of vertices? If so, any two vertices forms a line segment. If you have a mathematically rigorous means of defining its _orientation_ than you can make a plane from that. This is a design issue. Try to visualize it; can you articulate precisely what orientation the slice should have?
     
    Last edited: Oct 18, 2017