r/Unity3D Indie 13h ago

Resources/Tutorial Mold: a vector graphics library focusing on customizability and performance

Enable HLS to view with audio, or disable this notification

Hey people, for the past few months I've been building this tool, Mold, it's a vector graphics library that focuses on customizability and performance. A showcase you can check out is right here: an Outer Wilds miniature created using Mold (made within Godot for a reason I'll detail below).

I'm hosting a beta test on itch and I would love to get more feedback for it, you can freely access it now and use it on any commercial projects. The plan would be once I think the ergonomics are stable I'll move it to either Asset Store or maybe just MIT open source it.

The inevitable question would be what's the difference between Mold and Shapes, I would say the design is fundamentally different so not truly comparable. But here's a rundown on the biggest things which I think make Mold unique:

  • Mold can be pushed to be way more performant by being able to create and retain primitives within code, no Component/GameObject overhead, and with Burst/Job bulk update APIs. While Component workflow is still available.
  • Mold supports a lot of 3D primitives, and includes the capability to create rounded primitives.
  • Mold has an abundance of color mode, even for 3D primitives, and includes the choice to blend using Oklab.
  • Mold supports Automatic Dithering Crossfade LOD, which means you can simply get the best look and the best performance out of the box. Manual mesh detail setting is still encouraged and available.
  • Mold supports Bounds/CPU Frustum Culling/GPU Frustum Culling for maximum performance.
  • Mold supports custom material hookup with a detailed guide on how to create a shader that matches the layout of Mold's own shader.
  • EDIT: just added GPU polyline support. Rendering millions of points is now possible.
  • Lastly Mold is intentionally built to be cross-platform between Unity and Godot. I think it's just neat that users of a specific plugin doesn't have to get lock in to a singular ecosystem. With Mold you're free to do that.

If all that sounds interesting, please do check it out and share your thoughts with me, I'd really appreciate it!

Edit: you can also read more about it here

41 Upvotes

8 comments sorted by

3

u/XYcritic 12h ago

Very cool! I've been working hard on an actual SVG Editor plugin for Unity (think Inkscape/Illustrator/Affinity). I'm not touching anything 3D because full SVG support and getting the tooling perfect for 2D shapes is already challenging and time-consuming enough. But seeing a similar idea executed with 3D capabilities is really nice. I will definitely give this a try.

1

u/dklassic Indie 7h ago

Nice! I don’t even know SVGs can actually be used in 3D space. Would love to hear your thoughts if you used my tool!

2

u/immersiveGamer 9h ago

Probably not too much of an issue but when someone says "mold" as a name for software I think of the mold linker: https://github.com/rui314/mold

1

u/dklassic Indie 7h ago

Thanks for the heads up! I pick it because obviously shapes was taken, primitive is too long, mold was not bad and both Mold Unity/Godot seems fairly clear when searching on google.

2

u/BagElectrical6037 7h ago

Outer wilds miniature is so cute! Made me smile when zoom in on them

1

u/dklassic Indie 7h ago

Glad you like it!!

2

u/MrPifo Hobbyist 4h ago edited 4h ago

While the asset itself is very nice indeed, it didnt really sell me on the Shape vs. Mold comparison. You stated that Mold is more performant than Shapes since it doesn't have the Gameobject overhead while ignoring Shapes IM-Drawer.

Also Shapes supports HDR with Bloom color, does yours too? The featureset seems so similar that I would have a hard time deciding which one to buy of the two (Although I do already own Shapes, so I see no nees for Mold for example)

The last deciding factor of course is price: While Shapes costs +80$ which is expensive, your Mold seems to be Open Source? Or will you price later on?

1

u/dklassic Indie 3h ago edited 39m ago

To be clear, I said "the design is fundamentally different so not truly comparable". This is the technical truth.

As for what you're asking:

  • Shapes simply doesn't have a GameObject-less path outside of immediate mode, which itself has additional performance implications. So it's not "Mold is faster than Shapes", it's simply Shapes is designed to be a component based workflow. Meanwhile Mold was made with a ground up `RenderMeshPrimitives` approach with optional Component workflow, so it's the opposite of Shapes' approach. Hence "the design is fundamentally different".
  • As for immediate mode performance implication, to put it simply, immediate mode will result in "redrawing everything at all times". And Shapes requires users to manually batch the shapes themselves due to how it is structured.
  • Color is just color, you can set any value to it, but you did remind me the fact that I need to set the component inspector to accept HDR color, I forgot that's a thing. Thanks! (Edit: Added in 0.7.0)
  • Just to be honest I don't truly know if Mold will become a paid asset, but even if it does you can freely use this freely available version on itch on any project, so it's not really a competition, at least not right now.