I think it can be done with materials, but I don’t know how to achieve it. Please provide some ideas.
Numerous ways can be used to approach it but just using procedural mesh seems like the most simple one.
How do I use procedural mesh to generate pie charts and partition regions? Please share your thoughts and API?
maybe you could make an animation of a pie chart slice expanding and contracting, then organize the slices somehow in code.
could use vertex animation since you wouldn’t be moving too many verts.
so let’s say you have 4 categories named (a,b,c,d)
‘a’: 10 units
‘b’: 40 units
‘c’: 20 units
‘d’: 80 units
so total units are 150, and after a little division.
‘a’: 6.6%
‘b’: 27%
‘c’: 13%
‘d’: 53%
so you spawn in 4 slices. the animation needs parameter in the 0-1 range that decides the size of the slice based on the percentages. then rotate the slices so they don’t overlap. (6.6%+27%) * 360 equals about 121 degrees for the rotation of ‘c’.
i updated my comment with some psuedo code
if you use blender then you can use this.
https://forums.unrealengine.com/community/work-in-progress/110003-vertex-animation-script-for-blender-3d-users
for 3ds max
I’m not an animator. So while I know there are a number of different ways to animate things, I’m not sure which is the best method here. alembic animation, and morph targets may also be worth looking into.
How should I make it? Please share your thoughts and API?
How should I make and use vertex animation?
you’ll be able to find instructions by googling it.
there a number of ways to animate things vertex animation is just one ways you could use. alembic animation, morph targets, skeletal animation are also options. I’m not an animator so I can’t really break down how to do it for you.
I think it can be done with materials
Here:
And this one has downloadable uasset:
They might be the same. One of them works for sure, I replicated it once with some additional bells and whistles.
Making it 3d? Maybe via displacement? Doing it all in material should be pretty efficient.
Thank you for sharing. I’ll try it.
Thank you for sharing. I used the content you shared, but it seems that it can only be used on the UI. How should I use it when I attach the material to Static Mesh?
I’m sure you’ve long since found a solution, but for anyone needing one in the future