Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
So uh, this maybe requires some context.
In /tg/ code, we use vis_contents as a way to "fake" z level layering.
So there's logic for linking z levels together, and we have openspace turfs that take the turf a layer "below" them and stick it in their vis_contents.

We want to be able to apply effects to the things on the "lower" level, things that make the height more obvious. Stuff like a dropshadow.

We do this by using the VIS_INHERIT_PLANE vis_flag on /obj and /turf, to tell the objects below to render onto into the openspace turf's plane.

The trouble is we use planes for rendering effects outside of just openspace, things like global drop shadows, or a distortion around a grav anomaly.

But there doesn't appear to be any way to get those to apply, while using vis_contents in this way. The more we use plane masters as a way to apply effects, the worse this problem gets.

It would be amazing to have a vis_flag that tells objects on a turf being copied to render as usual, with their current planes, then have the output of that take on the plane of the parent.

I'm not sure how feasible this is, but it would be great to have. I've considered a few workarounds, like creating "below" planes and plane masters, but that's really hacky, and imposes a depth limit on recursive vis_contents, which is annoying.
You can do this with render_source/render_target, but it's a pain in the ass.
If I'm following this right, basically what you want to do here is group planes together, which is doable via render targets. It's one of the reasons I introduced them. You'd render the individual planes to render_targets with an asterisk in front so they wouldn't actually draw on the map, then use objects with the matching render_source to draw them all on the target plane you wanted to group them all under. This has a number of advantages, not least of which is that you can downscale the lower levels.

I wouldn't worry too much about a maximum recursion. Even in a game as complex as SS13 I don't see anyone going beyond a few levels there.
I really hate the idea of needing to make that many planes, though it might be a usable workaround. Thanks a ton for mentioning it, I've been kinda worried about getting scuttled by this problem.

I'm not sure if this really changes anything, but I think you massively underestimate our mappers willingness to commit warcrimes

The towerstation of babel

This one was 10 levels tall

I really don't relish the concept of needing to put all the objects on (x) z level on their own z plane, just to get this working (Assuming I've understood you properly, it's like 2 am)
A generic solution would be nice, though I can understand if that doesn't make sense for some reason or another.
You don't have to change the actual plane values of the objects on each Z-level if you use FLOAT_PLANE. However, over at /vg/station we are acutely aware of the other headaches this causes.
if objects are already in a plane, how do you then put them in a z level specific plane, without having n copies of the plane for each z level?