Render planet graphics from lua code

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
front
Inserter
Inserter
Posts: 48
Joined: Tue Dec 03, 2024 4:54 pm
Contact:

Render planet graphics from lua code

Post by front »

I did not see anything relevant in the api, but it would be nice if we could display a planet's space rendering from lua. Mainly to cover for one feature of visible planets in space, where it also displays planetslib moons around the planet you currently orbit.
Also to let Cerys use those graphics in the background as you look down at Fulgora, so it does not need to be a static sprite anymore.
User avatar
FluidNatalie
Burner Inserter
Burner Inserter
Posts: 18
Joined: Tue Oct 14, 2025 7:52 pm
Contact:

Re: Render planet graphics from lua code

Post by FluidNatalie »

+1
front
Inserter
Inserter
Posts: 48
Joined: Tue Dec 03, 2024 4:54 pm
Contact:

Re: Render planet graphics from lua code

Post by front »

I know exactly what I want now. Make this field an array, and let us add multiple backdrop definitions.

https://lua-api.factorio.com/latest/typ ... m_backdrop

It has a position and a radius, and we can use those to place and position multiple ones of them.

We also tried doing a ringworld, and this may work if we could place two, and flip the normals on one of them so it curves inside instead of outside forming a circle. That may also be hackable to make something visually orbit the planet.
06-26-2026, 16-17-42.png
06-26-2026, 16-17-42.png (614.18 KiB) Viewed 283 times
User avatar
AndreusAxolotl
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon Aug 04, 2025 6:26 pm
Contact:

Re: Render planet graphics from lua code

Post by AndreusAxolotl »

+1
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 531
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: Render planet graphics from lua code

Post by BraveCaperCat »

Yeah, I'd really like this.
Maybe a C function that constructs some LuaRenderedSprite object, given things like the orientation/position of the planet/light source(s), that we can pass to LuaRendering::draw_sprite's sprite parameter instead of a SpritePath.
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
Starchie
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Dec 13, 2015 11:48 am
Contact:

Re: Render planet graphics from lua code

Post by Starchie »

I have a planet currently that I want to look like an abandoned space station (and soon abandoned space ships), and that makes more sense to be a static, flat, and ideally non-circular sprite. I definitely don't want to give the player the impression of some spherical or larger land mass awaits them. Currently my best option is to try and reverse engineer the PlatformBackdrop so I can invert my graphic. That way I can try and force it emulate a flat sprite.
User avatar
BraveCaperCat
Filter Inserter
Filter Inserter
Posts: 531
Joined: Mon Jan 15, 2024 10:10 pm
Contact:

Re: Render planet graphics from lua code

Post by BraveCaperCat »

Starchie wrote: Thu Jul 16, 2026 2:31 pm I have a planet currently that I want to look like an abandoned space station (and soon abandoned space ships), and that makes more sense to be a static, flat, and ideally non-circular sprite. I definitely don't want to give the player the impression of some spherical or larger land mass awaits them. Currently my best option is to try and reverse engineer the PlatformBackdrop so I can invert my graphic. That way I can try and force it emulate a flat sprite.
I'm currently wondering how that's relevant to this interface request...
If you want to see the mods I've made, press one. If you need me to update a mod to 2.0, press two. If you're looking for QA, press three. If you've been waiting over 1 and a half years for Digital Age, bad luck.
Starchie
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sun Dec 13, 2015 11:48 am
Contact:

Re: Render planet graphics from lua code

Post by Starchie »

BraveCaperCat wrote: Thu Jul 16, 2026 2:34 pm I'm currently wondering how that's relevant to this interface request...
Sorry, I misinterpreted the request. I was envisioning rendering from lua to allow more arbitrary graphics options, separate to how planets are rendered from PlatformBackdrop. Rather than the using using PlatformBackdrop in more areas.
Post Reply

Return to “Modding interface requests”