• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Polyhedron animations math

Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Hey guys!

I need your sage advice once again.

Here's the idea:
I want to make animations for my livestream, that play when people purchase bits (It's a currency on Twitch).

Now, depending on the amount of bits purchased, it will play a different animation.

There will be, then, 5 different animations, and because my entire stream is based on gaming and there's already quite a few D&D elements in there, I want to have these animations be rolling dice.

The dice used in D&D are: d4, d6, d8, d10, d12 and the almighty d20.

So I need to do quite a bit of math to create these 3D polys.

Now, I've found scripts online that are ready to go and just generate the polys for you, BUT

Editing the die faces is... not obvious.

The one I'm using right now is this:

https://aescripts.com/create3dshapes/
This video shows how it's quite perfect for creating exactly the shapes I want, the dice look exactly like this.

https://www.youtube.com/watch?v=X4As5IFpzLk

 

But, because editing the faces is just weird, I thought about maybe doing them from scratch.
So I'd make the faces in Illustrator, bring them into AE and do the math.

 

Anyone offer some help here?
Thanks in advance.

TOPICS
How to

Views

359

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

Moving to AI is not really a solution, to be honest. You're still stuck with arranging the faces after the fact and the usual issues with precision, the bounding box of the layers complicating the math and potential further mayhem due to continuous rasterization/ collapsed transformations. It's going to be just as complicated as navigating the pre-comps created from the script. All that being the case, the only honest answer here is to move on to a genuine 3D program where this could be as easy as creating the polyhedron, exploding it into its separate polygons and create a per-poly UV map to which then individual textures can be applied. Still a ton of work for the higher power shapes, but at least doable in a realistic way without growing a beard over it. Of course the basic tetrahedron, cube and and octahedron should be doable in AE, but anything beyond that will be a nightmare to deal with in AE, no matter which approach.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

So, this answer doesn't help.

I am not, nor should anyone really, move to a new piece of software, especially one that's not free, and then have to deal with the entire learning curve of a completely new thing, to do one project.

I found a tutorial on how to apply the faces, here: https://www.youtube.com/watch?v=QVCIW-NtPpI
So I'm halfway there now.
I'm stuck on something much simpler, though: AE by default, centers the anchor point of something, via its bounding box.
For triangles, that obviously doesn't work if you're trying to rotate the triangle.

I need the anchor point to be the actual centroid of the triangle.

I'm sure I'm missing something dead simple that would do this...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 23, 2021 Jun 23, 2021

Copy link to clipboard

Copied

LATEST

There's nothing simple about calculating centroids. A simple triangle can have multiple centers - center of mass, intersection of its perpendiculars, weighted distance from edge, circumscribed center and so on. Some of them typically coincide, others do not. Not trying to be a stiffler about the math, but depending on which method you employ, you could end up with a veritable mess. And since in AE you still would need to account for 3D rotations due to that Euler vs. Quarternions thing, it would be a major clusterduck. At least for the latter part you would most definitely want to rotate around one of the polygon's edges or a corner point, not the actual center. That would also have the benefit that your polygons in the pre-comps would retain predicatable upright orientation for adding the textures. Point in case: You need to treat this like a folding map, not a polygon generation algorithm and refactor the math to account for this. Otherwise I guess the nab script is as good as it gets and you have to put up with its shortcomings and quirks.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines