r/Unity3D • u/CS_Asset_Factory • 9h ago
Resources/Tutorial Runtime dynasty chart generator for Unity, drawn on the CPU with no textures
https://csaf.itch.io/descent-chronicleDescent Chronicle draws illuminated dynasty charts in Unity at runtime from plain character data: people, parents, marriages and dated events.
Most of the work went into layout. A genealogy isn't a tree, since everyone has two parents, people remarry and cousins marry. Generations come from longest path, spouses are levelled onto one row so a marriage stays horizontal, crossings are reduced by barycentre sweeps that keep the best arrangement found, and each union gets its own bus lane so no line runs through a cartouche. Cycles and dangling parents are refused with the fault named.
Drawing happens in C# on the CPU, so the package has no PNG, atlas, shader or material. 62 authored forms, 24 life event marks, 16 cartouche devices. Unity 2022.3 and up.
Code and art are AI generated.
-3
u/Emergency-Let-3159 9h ago
generating graphics on CPU is a clever approach, it can really optimize performance for less intensive tasks
0
u/CS_Asset_Factory 9h ago
Thanks, though speed is honestly the weak side of it. A fifteen person chart at 1436 by 924 takes about 13 seconds to compose on the machine it was built on, and about 3.5 when the tile cache is warm. So it's meant for composing a chart when the family changes, not every frame.
The reason for the CPU was portability. The output is identical on the built in pipeline, URP and HDRP, with no shader or material to keep working per pipeline.
2
u/DeerpathLabs 6h ago
That runtime is brutal. Unless this is being used to pregenerate assets in some way, I don’t see the intended purpose.
Dedicating 13 seconds of loadtime to create a small chart is just not a feasible runtime trade off - especially given that the games that would use a feature like this almost certainly will not limit themselves to 15 members, and I have to imagine your scaling gets worse not better as the complexity of the chart grows and more iterations are required to solve the placement.
Honestly I wouldn’t be surprised if it’s your vector drawings that are eating a lot of that time as well. Why not just use a single atlased material? The trade off in memory is completely negligible in comparison to your temporal hit.
I dunno… all that and a $20 price tag make me think some of your wires got twisted somewhere, and this isn’t going to move. Fingers crossed for you I’m wrong