Jump to content
  • 0

The proper way to create 3D floors?


ChrisVR

Question

I have followed a tutorial on YouTube. I made a sector outside the map, gave it action 160 with tag 1 and set the tag 1 to the area I want as a 3D floor. That works. Now I'm trying to create another store level, but I can't get anything else to be drawn on top of my other floor...

 

 

Builder_2018-07-16_21-30-28.png

Share this post


Link to post

8 answers to this question

Recommended Posts

  • 0

One thing to note though: 3D floors are much more computationally expensive than regular floors.  If you put lots into a single location it can impact the FPS quite substantially.  So while by all means use them however much you want, if you start to notice your map's FPS is dropping and you're not sure why, it could well be the 3D floors.

Share this post


Link to post
  • 0

I'm making a multiplayer map, and it's pretty much barebones except the very few places where I want to use 3D floors.

Sadly in 2018 this is still a luxury... I wish Doom was much more optimized.

Share this post


Link to post
  • 0

The cost of 3D floors isn't that high, though.

 

https://forum.zdoom.org/viewtopic.php?p=1056460#p1056460

Of course it all depends on the scenario but in condensed form it looks like this:



For a 3D floor in the affected sector(s) one or two added planes get rendered, depending on the type. Additionally all outward-facing sides will create a new wall primitive needing to be processed.
The only scenario where this gets expensive is when you got to split sectors in order to add the 3D floor where needed. Ultimately, 3D floors are extremely cheap to process, they only start to hit if you got several 100 of them, but even in that case each one will be like adding one or two more sectors, not more.


A portal on the other hand, requires the following steps at the very least. Note that there can be shortcuts but they only take effect if no sky is visible so they do not apply to BoA:

- the entire portal area needs to be filled with a stencil value that serves as a mask.
- the depth buffer in the affected area needs to be cleared.
- the new scene needs to be rendered into the stencilled area.
- the depth buffer needs to be restored for the following translucent stuff and sprites in general.

It is impossible to do these 4 steps without at least one full stall on the rendering pipeline. Under normal, contained circumstances where you operate in closed-off rooms and one sided walls the stall will be a few microseconds.
In the case of C3M3, however, it occurs inside a highly detailed scene, meaning that before processing the portal, the GPU has to flush the entire main scene and after that re-traverse the BSP with no more parallelization taking place. This will cause a speed hit of several milliseconds which results in a considerable drop of fps.

Share this post


Link to post
  • 0
16 minutes ago, Gez said:

The cost of 3D floors isn't that high, though.

 

Well I'll be! I always presumed they were pretty intensive.  I remember Dragonfly's map in Confinement 256, that fit about 60 3D floors into a single 256x256 space, and my god it ran awfully, like it dropped a typically 60fps rig down to 20fps.  Certainly far worse than a single scene of 60 sectors.  So while they're probably not as bad as I'm thinking, they do certainly have a tangible impact if overused.

Edited by Bauul

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...