Slice to Pieces

Plugins linking to this thread: (hide)

Slice to PiecesAuthor: Constantine Tarasenkov
I'm trying to work with K.I.S.S. principle keeping in head now. This compound is a result of 2 hour full of fun work. Extremely simple and fast.

So what it does it slice geometry with capping in a super fast way because of merge topo array technique. You can dive into the compound and see how it works, there's not so many nodes actually. Accepts arrays on input. It means that we can create a procedural exploding pizza boxes simulator with use of momentum in four steps!


Also included in Constantine's Procedural Topo Pack. See the si-community thread for comments, updates and an illustrated step-by-step instruction.

local backup: Slice to Pieces.rar
Draw Bones Inside MeshAuthor: Constantine Tarasenkov
Inspired by Cesar Saez's Bone Sketching tool. Select desired mesh and click on Animate -> Skeleton -> Draw Bones Inside Mesh menu. You can quickly choose prefix name and color for the chain which will be drawn.

Youtube demo.

local backup: DrawBonesInsideMesh.rar

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Slice to Pieces

Post by iamVFX » 28 Apr 2012, 13:52

I'm trying to work with K.I.S.S. principle keeping in head now. This compound is a result of 2 hour full of fun work. Extremely simple and fast.

So what it does it slice geometry with capping in a super fast way because of merge topo array technique. You can dive into the compound and see how it works, there's not so many nodes actually.

Accepts arrays on input. It means that we can create a procedural exploding pizza boxes simulator with use of momentum in four steps!

1) Create a box

Image

2) Apply Slice to Pieces compound

3) Build Linear Interpolated Array and set values from (0, -3,2, 0) to (0, 3,2, 0) as the origin and normal planes, set size to 10

[rimg=500]http://xsisupport.files.wordpress.com/2012/04/agneov.png[/rimg]

4) Apply momentum deform bodies with ground and have fun playing with it!

Image
You do not have the required permissions to view the files attached to this post.
Last edited by iamVFX on 13 Oct 2012, 23:08, edited 1 time in total.

Chris_TC
Posts: 411
Joined: 22 Mar 2010, 17:43

Re: Slice to Pieces

Post by Chris_TC » 29 Apr 2012, 09:51

Looks very handy, thank you!

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 29 Apr 2012, 19:45

You're welcome, Chris!

User avatar
guillaume
Posts: 41
Joined: 19 Jul 2009, 00:01

Re: Slice to Pieces

Post by guillaume » 01 May 2012, 15:10

Nice KISS compound indeed.

For the little story, I added the "Slice, Delete and Collapse Vertices" option in the Slice Polygon node at the last minute ;). Good to see that it is smartly used.

User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Re: Slice to Pieces

Post by bottleofram » 01 May 2012, 16:19

Simple but interesting.

How about adding an inset in between the slices?

If that doesn't go too much against the KISS idea, of course... ;)

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 01 May 2012, 20:02

guillaume wrote:Nice KISS compound indeed.

For the little story, I added the "Slice, Delete and Collapse Vertices" option in the Slice Polygon node at the last minute ;). Good to see that it is smartly used.
Guil, your impact to softimage was great, ICE modeling is super cool feature and we all thank you and other developers who implement that! Good luck with new fun projects! :)
bottleofram wrote:Simple but interesting.

How about adding an inset in between the slices?

If that doesn't go too much against the KISS idea, of course... ;)
Great idea, bottleofram, as always! (would be nice if I'll know your real name, by the way ;) ) Here the inset, this is 1.1 version and I will not delete the previous one so that everyone had an idea what's happened to compound from version to version.

Image
You do not have the required permissions to view the files attached to this post.

User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Re: Slice to Pieces

Post by bottleofram » 01 May 2012, 23:25

Haha, and you are as quick as always!

As a sidenote, i'm amazed by people who manage to keep it simple. Paid the price of failure far too many times for not keeping that principle in mind! :))


Its Alex, btw. Nice to meet 'ya.

User avatar
bottleofram
Posts: 355
Joined: 17 Aug 2010, 11:21

Re: Slice to Pieces

Post by bottleofram » 02 May 2012, 00:22



Image

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 09 May 2012, 13:20

Interesting idea, Alex. It's reminds me some of the architectural shapes for some reason, especially with triangle example

Here is the new quick lazy 1.2 update! I found interesting idea in Paul's tutorial about creating a thickness map. So I use raycast node for finding outside polygons, it works stable in all cases because capped polygons of sliced mesh will always be looking at each other since mesh is sliced by a flat planes. Here is some other usage of the compound:

Image

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 09 May 2012, 13:44

Actually, no, I have to delete it since some of the polygons of the mesh can be faced to each other aside from the sliced ones :D

Coming up next: 1.3 fix... :D

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 10 May 2012, 03:15

1.3 is here.

[rimg=600]http://img213.imageshack.us/img213/5526/59348265.png[/rimg]

1) It was obvious that if the polygon does not lie on the slice plane it's just not sliced. I use dot product instead of raycast now, so you get proper MaterialID indices.
2) Inset accepts array of values only. If you want to have one value for all slices use Build Array from Constant node (see Example 1).
3) Special blocker was added for the performance stability of the package - if origin and normal plane arrays are not the same size it will be not executed at all.

Although the compound is much more complex now, the speed is actually the same since I doesn't do anything complicated.


P.S. I found a simpler and faster way to delete geometry, by the way!

[rimg=500]http://img692.imageshack.us/img692/3783/39845193.png[/rimg]

It's slow process if you use delete polygon or vertex nodes since topology can be really heavy, especially dealing with repeat node, so... Don't delete it! Replace topo with one triangle and delete that poly instead. Done! lol

[rimg=500]http://img819.imageshack.us/img819/756/26117884.png[/rimg]


Example model with cubes from post above is included in archive file
You do not have the required permissions to view the files attached to this post.

scaron
Posts: 119
Joined: 08 Jul 2009, 05:16

Re: Slice to Pieces

Post by scaron » 10 May 2012, 21:13

hey constantine

thanks for the continued updates.the 'fast delete' you mention, is this just a general observation or is it relevant to your slice compound? in other words when would you want to just delete all polygons?

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 10 May 2012, 22:01

scaron wrote:hey constantine

thanks for the continued updates.the 'fast delete' you mention, is this just a general observation or is it relevant to your slice compound? in other words when would you want to just delete all polygons?
Yes, it's relevant to this compound

So basically I delete current topo to store new sliced piece with other one by the end of the 2-step loop, since factory Slice Polygon node give only one piece at time. Then for the next slice plane I repeat the process with the new sliced mesh that was stored.

Since I can't store only some parts of the topology type data it should be deleted to ensure that it's not placed in the array again

And it's crazy, only imagine it, I delete all the polygons of the mesh and then create them again in the repeat loop several times! It's dumb, it's lazy and sounds like it should work super slow. But in reality it's not. And this is so cool for me, and I don't know why only for me, lol

The inspiration for doing this was given by a lecture of Jonathan Blow, part when he tells about DooM source code and its "unoptimized" assets search, be sure to check this out: http://www.myplick.com/view/7CRyJCWLM71/CSUA-talk

scaron
Posts: 119
Joined: 08 Jul 2009, 05:16

Re: Slice to Pieces

Post by scaron » 11 May 2012, 20:43

iamVFX wrote:The inspiration for doing this was given by a lecture of Jonathan Blow, part when he tells about DooM source code and its "unoptimized" assets search, be sure to check this out: http://www.myplick.com/view/7CRyJCWLM71/CSUA-talk
awesome, thanks!

sekow
Posts: 3
Joined: 04 Jun 2009, 11:27

Re: Slice to Pieces

Post by sekow » 21 May 2012, 23:36

spend the weekend to get to the same point, and now i stumble upon this..
i should check the forums more often. great work constantine !

iamVFX
Posts: 697
Joined: 24 Sep 2010, 18:28

Re: Slice to Pieces

Post by iamVFX » 28 Oct 2012, 17:43

I redesigned the capping of the standard Slice Polygon node. Also it's much faster now.

[rimg=400]http://img268.imageshack.us/img268/695/screenshot1zb.png[/rimg][rimg=400]http://img826.imageshack.us/img826/8264/screenshot2ug.png[/rimg]

I will upload it soon with the updated Procedural Topo Pack, stay tuned.