Background / under camera layer for rendering another surface

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Honktown
Filter Inserter
Filter Inserter
Posts: 770
Joined: Thu Oct 03, 2019 7:10 am
Contact:

Background / under camera layer for rendering another surface

Post by Honktown »

The idea: A camera and background layer (via LuaRender) or a GUI camera in screen, rendered behind the current surface, which has transparent tiles (out-of-map are not transparent)

Context: a scenario where there's a moving "ship" on an ocean. The scenario has the same problem the idea has in Minecraft: everything needs to move, and it takes a *lot* to clone and move everything. Semi-related, any mod which wants a "background animation", such as stars, water, or even that the player is "up in the air" and wants to show a zoomed out surface beneath (drone scouting/bombing? transportation? many possibilities)

Current similar things:
Render an animation at the lowest layer via LuaRender. Tested render layer property, doesn't like drawing beneath tiles, even with render-layer 0

Camera-over-camera. Actually could be done *very* well, but would require some changes to work better:
cameratest.lua
(2 KiB) Downloaded 42 times
The code example draws one camera over another. With ignored_by_interaction = true and zoom chosen, the graphics are almost seamless in rendering (there's a slight brightness variation, unknown).

Problems: All the other guis are drawn beneath. If a camera could be pushed down, and even better, rendered completely behind a surface, then there'd be effectively no issue. This would be the "most desireable" method: a camera drawn behind the current GUI and world, with the surface "on top"/"above" using transparent tiles to let the camera beneath show through. Also, the character-entity interaction would work seamlessly if the camera could be pushed all the way back. At present, the code above opens inventory guis above the camera, but there are no selection cursors and no entity place images.
I have mods! I guess!
Link

posila
Factorio Staff
Factorio Staff
Posts: 4991
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Background / under camera layer for rendering another surface

Post by posila »

Hello, I just came here to ruin your hopes and dreams and say that this won't be possible in 1.1 or any future unpaid update.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4863
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Background / under camera layer for rendering another surface

Post by eradicator »

posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

orzelek
Smart Inserter
Smart Inserter
Posts: 3828
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Background / under camera layer for rendering another surface

Post by orzelek »

eradicator wrote:
Tue May 04, 2021 5:51 pm
posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.
It smells like spoiler :D
My guess is that in the dlc we will have some reason to have a scrolling background layer behind the view :)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4863
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Background / under camera layer for rendering another surface

Post by eradicator »

orzelek wrote:
Tue May 04, 2021 6:11 pm
My guess is that in the dlc we will have some reason to have a scrolling background layer behind the view :)
Considering recent hirings I won't be suprised if space happens ;). I think I saw Mr. E. ask about parallax backgrounds before...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

posila
Factorio Staff
Factorio Staff
Posts: 4991
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Background / under camera layer for rendering another surface

Post by posila »

eradicator wrote:
Tue May 04, 2021 5:51 pm
posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.
Main reason I wrote it that way was due to tile rendering being quite expensive (due to small size of tile - 32x32 was OK size for games running in 640x480, but is not great for games running at 1080p or 4K, and there is ability to zoom-out further away ... making them smaller; and there is quite complex system for tile transitions) so current tile rendering system implements optimizations that are not quite compatible with what OP is asking, unless we bump up minimum requirements for the game, which I think would be unfair to people who already bought the game. But we already agreed to significantly increase minimum requirements for paid expansions, and changes are being made to the tile rendering that might make the request possible to implement.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 4863
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Background / under camera layer for rendering another surface

Post by eradicator »

Thanks for the explanation.
posila wrote:
Wed May 05, 2021 11:23 am
But we already agreed to significantly increase minimum requirements for paid expansions,
My toaster just made a very sad sound :roll:. (I fixed the cooling btw.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Post Reply

Return to “Modding interface requests”