fake slicer

hi,

Just a test project… : )

FakeSlicer

  • Slicing a box (but not really)
  • It works by adjusting box size/vertices and cloning a prefab box as a new slice object
  • Sliceplane is “fake”, just Y value is used for getting a location
  • Adjusts rigidbody weights based on object size/density (so each slice has “correct” weight)
  • Missing: texture adjustment (now it shrinks…)

webplayer:

w/s = move plane up/down
a = slice
mouse = drag objects
*sometimes objects fall through the ground…refresh demo to try again

download:

  • Package ( script with comments)

447178–15552–$fake_slicer1.unitypackage (666 KB)

Very cool. Thanks for sharing this! :slight_smile:

Fake? Not sure there are other ways, but no matter how you slice it it’s the end result that matters :slight_smile:

Why is it “fake”? It does what it’s supposed to do, and it does it well :smile:

Hope you get some time to make it more advanced, though. Something like what Metal Gear Rising are doing:

Keep it up!

Very nice idea,
Try to make the same with cones, this should work ; )

Maybe some will get a cool idea for a slicing game.

One thing i noticed is that the texture gets contrakted.
Can you Change the Tileing of the texure to fix that?

Hi,

Texture can be fixed with uv map atleast…
(planar uvmap code from docs “locked” streching, havent tried others…)

Another simple test scene:

  • with cylinder, sideways.

webplayer:

a/d = move cylinder
space = slice
mouse = drag objects

download:

  • Package ( script with comments)

448895--15646--$slicer2.jpg
448895–15647–$fake_slicer2.unitypackage (15.4 KB)

one bug tho… When you cut the cylinder and the cylinder is not under the slicer then it will create a cylinder that has a height of 0 :stuck_out_tongue:

thats the ‘fake slice’ then : )
(min-height checking missing/failed)

My new game ‘Slice the Salomi’ takes place in a butcher shop.

Hi,

Testing different technique

  • Capsule (but bit too low poly capsulecollider not so good for this…)
  • ‘Infinity plane’ for cutting ( Unity - Scripting API: Plane )
  • Using “Plane.GetSide” to check which side the vertex is
  • if above cutplane, move it down with distance from “Plane.GetDistanceToPoint”
  • Clone the slice from original object

Webplayer:

wasd = move cutting plane
qe = rotate cutting plane (dont rotate it upside down…)
space = slice
mouse = drag objects (try dragging the original object and cut it while hanging in air)
(cannot cut the slices, just the original object, although should be possible to do that, or to cut multiple objects)

Download:

  • Package ( script with comments)

*edit typo

449114--15656--$slicer3.jpg
449114–15657–$fake_slicer3.unitypackage (19.3 KB)

What about Skinned Mesh?

not tested, i guess would need to do this:
http://docs.unity3d.com/ScriptReference/SkinnedMeshRenderer.BakeMesh.html

Thank you for answer.

I replaced
mesh = GetComponent(MeshFilter).mesh
on
GetComponent(SkinnedMeshRenderer).BakeMesh(mesh)

Mesh not sliced, but flattened.
screenshots


yeah, thats the “fake” part of the slicer :slight_smile: it just duplicates the mesh and pushes the “cut” vertices to the cut plane.

Maybe you could improve the effect by placing all cut vertices in the center, so at least they wouldnt stick out…

But there are real mesh slicers in asset store, TurboSlicer and maybe some more,
not sure if theres some free ones…

I’ll try to improve. We will have a free slicer. :sunglasses:

1 Like

Any improvement on this topic? I’m really interested on it.
Regards

I have this and the Invector Melee Template, i’m trying to use this to be able to cut enemys apart. so far it works but i can only cut either the mesh or bone, any ideas how I can fix this? Iv’e gotten so close lol

no updates to those…
i think asset store had several slicers, for characters also.