ICE Modeling Workshop : Cut edges between two vertices

231 views
Skip to first unread message

Guillaume Laforge

unread,
May 6, 2011, 10:48:17 AM5/6/11
to soft...@listproc.autodesk.com
Here is a new idea for a workshop : http://vimeo.com/23367815
I made the prototype some weeks ago as a proof of concept, but never found the time to finish it. So it could be a good exercise :).

The goal is to be able to slice a polygon mesh between two vertices.
Using the factory Slice Polygon node, it won't work as it would slice the polygons using an infinite plane, so you will need to create your own slicing algorithm (stay calm, it won't hurt :), to "clamp" the slicing plane. 

Building such compound, we will learn how to split some edges using some geometry rules and then how to connect the new vertices with some new edges.

We can decompose the tool in several tasks :

- We need a way to translate two vertices and an up vector into a plane in ICE.
- We need to find the edges cutting this plane.
- On those specific edges, we need to compute the exact split ratio and then do the split.
- Then, we will add the new edges.

I don't think we will do it in one week as I'm missing time on my side. So lets start next week with the first task : How to define the cutting plane in ICE using three input points !

Feel free to ask some questions if you are interested in this exercise.

Cheers,

Guillaume Laforge

Claude Vervoort

unread,
May 11, 2011, 8:44:35 PM5/11/11
to soft...@listproc.autodesk.com
Hi,

So in preps for this challenge (and as good exercise to practice a bit of matrix transformation), I've made a compound that takes 3 parameters: 2 points (A and B) making a line and a vector (the normal of the intersecting plane) and the output is a matrix projecting any point onto that line. It seems to be working (although I have not extensively tested it).

I've added to the compound an extra input: a point coordinates and 2 outputs for it: the projected point on the line and a boolean indicating if the projected point is between A and B.

Here is the link to the annotated compound:  http://claudeonthe.net/images/si/line_projection.jpg

And a 2012 scene with a little test setup (the A, B, Points to project are defined in the tree, the normal used for the projection is the Y axis of the null called normal): http://claudeonthe.net/images/si/line_projection.scn

I imagine this is not the most efficient (in terms of computation) to get to that value, but I wanted to try the matrix way.

Any comment welcome :)

Cheers,

Claude




Guillaume Laforge

unread,
May 15, 2011, 4:27:05 PM5/15/11
to soft...@listproc.autodesk.com
Hi,

I couldn't find time this week to continue this workshop, but here are some hints on how we could find the intersecting edges :

From the start and end vertices and from an Up Vector (that could be defined by a null), we can build a plan.
Then for each each edge vertices position, we can compute the dot product to this plane normal.
This dot product give us the signed distance from the plane. If edge vertices signed distance values are opposite then the edge is cutting the plane.

Claude, I didn't take a look in depth to your compound, but maybe your way is also valid ;). It will be intersecting to compare both way.


Cheers,

Guillaume

Guillaume Laforge

unread,
May 15, 2011, 4:48:32 PM5/15/11
to soft...@listproc.autodesk.com
> If edge vertices signed distance values are opposite

I was not very clear, I meant, "if the sign of the edge's signed distance values are opposite"...

Claude Vervoort

unread,
May 23, 2011, 10:36:15 PM5/23/11
to soft...@listproc.autodesk.com
Hi!

I've finally got an ICE tree that do split the edges. I've made a video to give a quick tour of the approach I took and uploaded it on Vimeo: http://vimeo.com/24147547

I've made the scene available too if someone is interested: http://claudeonthe.net/scenes/cutting_edge.zip

Right now it's cutting the polygons using the plane segment defined by the 2 vertices and the up vector.... but it cuts through the whole geometry (that is the opposite side of the mesh if there is one is cut too). I was not sure what to do for that. One would be to filter the polygons to slice based on their normals and the up vector. But that is a partial answer.

Claude

Guillaume Laforge

unread,
May 30, 2011, 5:34:14 PM5/30/11
to soft...@listproc.autodesk.com
Hi all,

I finally found a couple of hours to finish this workshop :P.

You will find the "Apply Slice Between Two Vertices" in this addon. I added some comments to help you understand how it was made, so feel free to dive inside each compounds !

The addon also include the "Cap Borders" compound of the first workshop. I also added a couple of other compounds (already published on some forums or list) to centralize the stuff a little bit.

So here is what you will find in the addon : 

- Apply Slice Between Two Vertices
- Apply Thickness
- Cap Borders
- Create Bullet Shattered Primitive
- Create Copies from Polygon Mesh.2.0
- Create Extrusion Along Strands.2.0
- Deform Strand Extrusion

I added some commands + menu to apply some of those compound. Here is a little summary in video.

Cheers,

Guillaume
Reply all
Reply to author
Forward
0 new messages