Opaque Sloped 3D Floors in GZDoom

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

Calling all GZDoom wizards!

Please can any body point me in the right direction here?
I'd like to have houses with rooves sloped to an apex in the usual way. Cross section:
(The bottom two vertical walls are normal sectors (floor=128,ceil=384))
Image
I know sloped 3d floors are allowed if they are 100% opaque but how on earth would
one tell the engine this arrangement? After all, there are two apex lines involved, since
the 3d floors have non-zero thickness.

Has anybody done this?

(At least if it's impossible, knowing so would save me time from trying to do it)
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Opaque Sloped 3D Floors in GZDoom

Post by Enjay »

It's pretty easy. For a complicated example, look at the second map in my Burghead mod. If you hold on for a few minutes. I'll put up a simpler example.
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

Thx Enjay. I have got it to work with the 3D floors not sloped, at least. Be interested to see how you did it :)
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Opaque Sloped 3D Floors in GZDoom

Post by Enjay »

Here you go. :)

The key is making sure that the control sectors are aligned with where the slopes will appear in game.

[edit]ack, I just noticed that you have dimensions on your sketch. The example uses different dimensions, but the principle is sound.[/edit]
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

Thanks very much - will take me while to understand it, but its a long weekend... :D
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Opaque Sloped 3D Floors in GZDoom

Post by Enjay »

This explanation may help a little:
Spoiler:
1 is a pair of sloped control sectors for a 3D floor. The long sectors in the middle are what actually form the slope. The small squares at the end provide the heights to slope the control sector to. The main reason for #1 existing is because I wanted the area under the eves outside the building to be slightly brighter than inside the building. Otherwise the eve areas could have received the same tag as the building. To this end, these sectors have a light level of 144.

2 is a pair of sloped control sectors very much like 1. There are 2 key differences. 1) the light level is darker (128) and 2) each side has 2 3D floor lines. Most of the building is covered by the lines with tags 1 or 2. However, I wanted a doorway and that needed an additional pair of tags.

Areas 1 and 2 would look something like this in elevation:
Spoiler:
3 is a pair of 3D floors to make the area above the door which is also a 3D floor. These are only sloped on the top because the door should have a horizontal lintel.

it looks something like this in elevation:
Spoiler:
Remember, the floors only appear in the areas tagged in the play sector, but all the slopes need to be made the same gradient and orientation to match up. So, even if you are only using a little bit of that slope in the play area, it is easiest to make a full slope and match it up to the others out of sight in the control sectors.

4 has almost nothing to do with the 3D floors. It is just there to slope the gable ends of the building. Because none of those sectors are beside anything that could be used as a height reference, this seemed an easy way to do it. There are other methods. However, this method made it nice and easy to make all the slopes and control sectors the same size to guarantee that all the gradients and alignments are the same.

it looks something like this in elevation.
Spoiler:
Gez
 
 
Posts: 17938
Joined: Fri Jul 06, 2007 3:22 pm

Re: Opaque Sloped 3D Floors in GZDoom

Post by Gez »

Enjay wrote:Remember, the floors only appear in the areas tagged in the play sector, but all the slopes need to be made the same gradient and orientation to match up. So, even if you are only using a little bit of that slope in the play area, it is easiest to make a full slope and match it up to the others out of sight in the control sectors.
Alternatively: [wiki]Plane_Copy[/wiki]. :wink:
User avatar
Enjay
 
 
Posts: 26935
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Opaque Sloped 3D Floors in GZDoom

Post by Enjay »

Indeed. Personally, I find the method that I used in the example easiest because its mechanical nature makes sense to me but, yes, Plane_copy or slope things would do the job and may be preferred by some people and be unquestionably preferable in some situations.
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

Thx for the explanations. I managed it right with slope floor to here and such (things only), but that only works if you don't want the triangle part between the roof and the base. Slope Copy might be useful in general though, have to check it out.

EDIT:
Preliminary screenshot:
Image
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

I need to sleep so won't go into detail right now; however, it is possible to do this with just three control sections (each having a left side and a right side) for the roof. The idea is to have the roof as a self-contained unit, then build up the walls and floors separately (allows multistory buildings). If you want a front/back window in the roof triangle, it gets a bit more complicated, but the engine can do it (I know because I made one!).

Image

EDIT: (window in roof triangle and two floors):
Image
User avatar
MartinHowe
Posts: 2056
Joined: Mon Aug 11, 2003 1:50 pm
Preferred Pronouns: He/Him
Location: East Suffolk (UK)

Re: Opaque Sloped 3D Floors in GZDoom

Post by MartinHowe »

We have a project thread, yay!
Locked

Return to “Editing (Archive)”