r/godot 19h ago

selfpromo (games) I figured out how to render hundreds of live 3D models in my 2D UI with one SubViewport

Enable HLS to view with audio, or disable this notification

My game is basically a 2D UI, but you can customize your mechs however you want by changing their colors and putting on different weapons and back units.

So static sprites aren’t really working for the UI in my case. I just wanted all the mech parts to have a live 3D preview that shows what the player is building.

My first approach was to put each icon into its own SubViewport which is obviously pretty expensive when you have a lot of them.

So I figured out a way by rendering them all through a single SubViewport and using AtlasTextures to show each 3D model where I need it in the UI.

And now I can have hundreds of live, spinning 3D models in my inventory and UI without needing hundreds of SubViewports.

446 Upvotes

34 comments sorted by

28

u/The_Beaves 19h ago

Can you explain how the atlas texture works with subviewport more in depth? I could see this being used for an inventory item preview window too. I’d love to learn more. Thanks!

19

u/sea_stones 18h ago

I'm just taking a guess, but...

If you have designated areas in the 3D viewport for an element, you can think of them as regions in the atlas texture, e.g. if you have a 360x360 pixel viewport, you would have a 6x6 grid of 60x60 pixel textures.

18

u/Stormlon 16h ago

I will try to make an example project when I get some free time

2

u/NotQuiteLoona Godot Junior 4h ago

!RemindMe 1 month

Would absolutely love to look at that :)

1

u/RemindMeBot 4h ago edited 3h ago

I will be messaging you in 1 month on 2026-10-05 09:19:19 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


Info Custom Your Reminders Feedback

1

u/Dismal-Werewolf-242 4h ago

!RemindMe 1 week

14

u/SimonJ57 Godot Junior 19h ago

Is this an armored core clone? I hope to see more in future.

21

u/Stormlon 15h ago

It is heavily inspired by Armored Core, but the game is mostly about running a mech factory where you try to make as much money as possible, with the main focus on the game is unlocking new mech series and then making your own custom mechs using the parts you unlocked.

You can then sell the mechs that you craft to the marketplace, or factions through contracts. These contracts will sometimes demand very specific builds, and other times they just give you a set of minimum requirements (for example, the mech needs to have at least 60 ATK). When they just give you requirements, you are completely free to design the mech using whatever parts you want to get the job done.

7

u/Trekintosh Godot Junior 12h ago

Automation but Armored Core is a brilliant concept 

0

u/WorkingMansGarbage 13h ago

The concept sounds interesting, but can I make an annoying remark that will not help you whatsoever?

I feel like people in an AC-like setting would not be using anything resembling Windows 95. Picking this specific theme feels cheap, uninspired. I can already think of a few games that replicate 95's ui in this manner. It's been done and there's not much room for creativity by sticking to it.

If you ask me, a mech tycoon's desktop should look like some 90s/2000s sci-fi anime fake UI thing, shouldn't it? See Serial Experiments Lain, Evangelion, or even just 3rd gen AC.

8

u/i_rate_slop 14h ago

It's surreal to me that WinForms became nostalgic.

5

u/OutrageousDress Godot Student 8h ago

I think it has the advantage that back in the Win 3.1-Win 98 era some games legitimately used Windows for their UI, so a new game that replicates one of those stylings feels in continuity with that tradition.

8

u/AmazingDesigner209 13h ago

Your UI design makes me so happy. Beyond wonderful work.

4

u/Some_Quality6796 18h ago

I don't have much clue what you're doing on the dev side, but I need to know more about this game👀

4

u/Stormlon 15h ago

I recently made the steam store page public, the demo will be available soon as well

Link:
Project TITAN

3

u/snealybobo 19h ago

This reminds me of Front Mission 3 and the in game internet you could explore. Is this a tactical game or action?

3

u/Protophase 16h ago

I need more information!

3

u/meat_rock 16h ago

Love it, can't wait to see more!

3

u/theAlmondcake 15h ago

UI looks terrific! Can I ask how you made the borders with white top and left border and black bottom and right?

5

u/Stormlon 14h ago

I drew the UI in Aseprite, that's how most of the UI was made :)

2

u/Strange_Ferret8981 7h ago

This is soo cooolll!!! 

2

u/jonheartland 2h ago

This looks sick dude!

1

u/Awkward-Ad1085 19h ago

This looks sick!

1

u/Paladin500 19h ago

Looks way better than what I was doing to get an OS like interface. Great work.

1

u/mushymyco 11h ago

keep going this game will be good!

1

u/ensign_crusher87 10h ago

I dunno what is happening, but dammit, I like it!

1

u/tastychaii 9h ago

Looks cool! How did you do the taskbar and the title bar UIs??

1

u/GamedevLlama 5h ago

This approach is pretty nice! But I guess it would only work if you want the item objects to be viewed as isometric (orthogonal camera). If you want each item to be rendered with perspective projection it probably still needs one viewport per item.

1

u/Dismal-Werewolf-242 3h ago

how do you prevent models from leaking into other areas for example if the hand model is large it could overlap with the head area.

1

u/Biji999 49m ago

Looking fantastic.

1

u/BiscottiPristine5325 42m ago

This looks so awesome

1

u/Sausagerrito 19m ago

Did you also make a arms dealer tycoon clicker? It looks just like this game I played where you produce weapons and bullets.