Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Unit icons and IconRenderBooth #114

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Oct 26, 2024

Adds icons for all units and a dev render booth to render them.

Icon Overview

unit_icons

Build Menu

Replaces the single letter buttons with the icons.
Readability should likely be improved further with some labels or better backdrops.

unit_build

Icon Render Booth

The icons are rendered with a special IconRenderBooth scene in the util folder.

Below the render Viewport each unit has a Node3D with the same name as the unit. The node has its own Camera3D child and whatever custom setup needs to be made visible as well.

When the scene is played it goes through each node, makes it visible and activates the child camera and takes a snapshot image of the unit. The image is stored inside the res://assets/ui/icons/ folder as a png.

unit_renderbooth

Notes

Due the the way that the unit scene file stores their geometry with all kinds of gameplay extras this wasn't very clean. I ended up making the unit geometry unique and discarding everything that got in the camera's way. This naturally lead to some resource duplication now like meshes stored inside the scene file. Imo this should be cleaned up and improved on the unit level by having the visible unit geometry like meshes split from the rest of the unit. This is already partially done for the structure-geometries.

@Scony the "grid" texture that I ended up using for the ground is from the kenney prototype textures pack.
https://www.kenney.nl/assets/prototype-textures

Adds icons for all units and a dev render booth to render them.
@Scony
Copy link
Contributor

Scony commented Oct 31, 2024

Looks perfect, thanks!

@Scony Scony merged commit 527e181 into lampe-games:main Oct 31, 2024
1 check failed
@smix8 smix8 deleted the unit_icons branch November 1, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants