Background / under camera layer for rendering another surface
Posted: Tue May 04, 2021 2:41 am
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: 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.
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: 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.