Jump to content

How to perfect fractured a sphere into tetrahedrons ?


jingyisw

Recommended Posts

Hmm, just a thought. What if you were to correct the tetrahedrons as a post action, so to speak, shift the points into creating equilateral triangles..? Now triggering that shift is one thing, but how would you do it?

Now, someone probably know how to do mathematically on the incoming tetrahedron points - I do not, so I tried doing it in a for each...

*

Edit: Update - I managed to fix my positioning issue but alignment is still off. I'm thinking aligning the new tetrahedron primitive 0 normal to the incoming tetrahedron primitive 0 normal, though not sure how to do that - yet. :)

So here I use the explode value as the trigger, at 0 it keeps the original tetrahedron shape, at 1 (or above) it has been forced into a perfect tetrahedron. Due to misalignment, some shapes morph through themselves, so I need to fix that.

tetrasphere.v3.hipnc

Edited by Farmfield
Link to comment
Share on other sites

LOL, this alignment thingie is messing with me... So the alignment SOP aligns primitives between the objects on a "as close as" per primitive normal, that means, we need to have the primitive order for both tetrahedrons match spatially - easily solved with a sort in one axis...

Well, either the sort SOP doesn't work on tetrahedrons or I'm a moron - I just can't get it to work. :P

tetrasphere.v3.alignment.hipnc

Link to comment
Share on other sites

The idea is to morph each incoming tetrahedron to a regular tetrahedron based on a trigger - the trigger in this scene file being the the explode SOP, but it could be anything really, like distance to neighbouring tetrahedrons.

But the trigger isn't the issue, the issue is getting a working alignment between the tetrahedrons before the shift - as they are (mis-)aligned now, some tetrahedrons morph through themselves...

LOL, and suddenly I realize I could have use a blend shapes SOP, no need for my wrangle SOP - well, either way I need to align the tetrahedrons before it'll work...

Edited by Farmfield
Link to comment
Share on other sites

Now I had another hour free to put into this and I just can't seem to find my way out of this issue with the pieces blending through themselves. My problem with sorting on an axis was due to the object being rotated on the object level - so that was me being predictably confused over basic stuff - but still, I can't figure out a way to align the primitives before blending them. I need the pieces roughly aligned per point number to avoid them blending through themselves...

This problem is so tricky to solve, there just has to be a ridiculously simple solution I completely missed. I can almost guarantee it. :D

tetrasphere.v4.alignment.hiplc

Link to comment
Share on other sites

You may find incenter (coordinates of insphere) of irregular tetrahedron, then compute distances and vector deltas between it and all points, then set positions as center + normalized delta * average distance. It will regularize tetrahedron (in my imagination, at least). I had no luck finding incenter so far.

Link to comment
Share on other sites

But now you are talking about shifting the incoming tetrahedron points to their regular tetrahedron point positions based on the insphere..? But thinking about it, aligning a regular tetrahedron to an irregular (as best it can) would basically need the same data, right? Damn, my math skills are too friggin rusty for this stuff. :P

Where is Zvezdelina Stankova when you need her? :D

Well, I think I'm gonna try getting Jeff Lait or alike at SESI forums give me some input on this - I bet you can solve this pretty easily if you happen to be a SESI dev with a math Ph.D... :D

Link to comment
Share on other sites

Oh, that's really cool. I mean, it's all out there, it's just about finding the formula and fitting it into VEX. Great work.

So, what if you calculated the insphere for both tetrahedrons, then aligned the regular tetrahedron insphere to the irregular one and then shifted that rotation back onto the tetrahedron? :D

 

Edit: Doh - LOL, I'm an idiot, the sphere is scaled/translated only, not orientated. :P 

Edited by Farmfield
Link to comment
Share on other sites

Petz, the easiest way to explain my problem is through this scene file - I'm trying to align two tetrahedrons so I can blend between them. The problem I have is I have a shitload of irregular tetrahedrons coming in, so it's a two step process, first align them, then sort the points so I can blend between them without having pieces blend through themselves - as in this scene file.

Edit - F***! I didn't check your scenefile before posting that - sry. Ignore the above. :)

Edited by Farmfield
Link to comment
Share on other sites

Yes, awesomeness. We already knew the alignment doesn't work for regular tetrahedrons as they don't tessellate, but this is a cool setup as you can trigger this shift, like in a RBD sim where you shift every single piece into this shape, creating the appearance of the impossible, regular tetrahedron fragments. :)

Petz - awesome stuff, just awesome.

Edit:

Also new issues to solve. There was something funky with the piece orientation doing an explode, but a fuse in the for each solved that. And I got stray primitives out of the tetrahedralize SOP, dunno what's that about. Funny I haven't noticed that before.

 

Edited by Farmfield
Link to comment
Share on other sites

On 6/17/2016 at 3:40 PM, jingyisw said:

i recently saw a reel . Some sort of abstract effect . and i just wanna know

 How to perfect fractured a sphere into tetrahedrons ?  Is there anyone have

solutions to do this ? Please help me .:ph34r:

So this basically solves the thread then, because you can't really tessellate "perfect" (regular-) tetrahedrons, but you can fake it. :D

And I'm extremely appreciative for the help with this last thing, Petz & F1. Not that I understand this extract transforms thingie - how are there transforms on the pieces out of the Tetrahedralize sop? Well, I'll figure it out, I hope. ;)

 

Link to comment
Share on other sites

Oh, that point wrangle in the for each is nuts - that was what I was talking about in my initial question about this, shifting the actual points on the object - very cool. I would still want a blend in there to easily be able to "fade" between them - though I guess you could set that up in the wrangle too, create a keyable parameter for it. :)

And I have yet to dig deeper into how the extract transforms thingie works that Petz solved it with - I only come so far as to understand it's actually calculating a transform compared to something else. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...