Ability to display models beyond sector boundaries?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
LiveAndLetDoom
Posts: 4
Joined: Tue Feb 11, 2020 1:03 pm

Ability to display models beyond sector boundaries?

Post by LiveAndLetDoom »

I'd like to use large-ish models as the "ground" for a map, for instance to have a large crater that the player seems to actually be walking around in, whether or not they hit invisible walls restricting their movement past a point. But I don't believe there is a way to tell gzdoom to draw the model beyond it's containing sectors' geometry.

I wonder if it would be realistic to allow such models to be drawn beyond sector boundaries where linedefs are type 9/line horizon, even if those parts are purely decorative/non-interactive? Or perhaps as some kind of object type which allows gzdoom to know that a given model is meant to be used this way, even if it treats it as purely decorative and the mapper must add invisible level geometry in the parts that should be "interactive".

Note that I can simulate this effect in a hacky way using skyboxes, but there are two major time-consuming issues with that approach:

1. It's in a skybox, so it will not move along with the player (as subtle as the effect might be, it makes a huge difference). Thankfully, it's possible to use zscript to manipulate the viewpoint camera to achieve this effect, though it's a lot of extra work to find appropriate values to mimic the effect, rather than the model just being rendered as part of the level proper instead of in the skybox.

2. Manipulating the skybox camera like this such that it gets "too close" to the model results in parts of the model being clipped away, which forces ridiculous amounts of fiddling around to try to hide the problem (tinkering with the model geometry, adding level geometry to "mask" or replace it, endlessly trying to line it all up so it looks alright, etc).

As such it would be nice to just treat the model as another in-level thing, but allowing it to extend out purely visually, and not try to abuse skyboxes that way.

But even if it is, there would still be another issue, as far as I can tell: it seems impossible to position a large model correctly down to the player's "eye level". I've tested with a lightwave/obj model, but it looks like if the model is too large, I cannot specify a z-height on its related Thing on the map to bring it down far enough; the values seem to just be too large for the variables, or something along those lines, and the model hovers off way over the player's head. I've also tried the various z-positioning options right in the modeldef itself, but none of them seem to influence the model at all (I wonder if that's because it's in obj format?).

Has anyone else played around with this before, and perhaps found some workarounds?
Post Reply

Return to “Mapping”