Best method for doubly sloped 3D floors

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.
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Best method for doubly sloped 3D floors

Post by boris »

Hey there,

what's the best method for doubly sloped 3D floors? Right now I'm playing around with the slope things 9500 and 9501. It works pretty good (although GZDB seems to not be able to handle multiple planes, so the preview in visual mode can fuck up), but I'm wondering if there's a better method (or any other method at all) to create doubly sloped 3D floors.
Are there any known downsides to using this method?

Here's an example WAD of how I'm doing it right now: http://88.198.197.45/boris/doom/doubleslope.wad
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

Anyone? Or is nobody doing doubly sloped 3D floors at all?
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Best method for doubly sloped 3D floors

Post by NeuralStunner »

I stopped using those slope things ages ago, now I use vertex slopes instead. Have you tried them? Much nicer way to get the exact heights you want.
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Best method for doubly sloped 3D floors

Post by Nash »

If GZDB's renderer is messing it up, is MaxEd aware of it? Perhaps it's a bug that he can fix.
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

NeuralStunner wrote:I stopped using those slope things ages ago, now I use vertex slopes instead. Have you tried them? Much nicer way to get the exact heights you want.
That would be great, but they are unfortunately limited to sectors with exactly 3 sides, so it's not of much use for my 3D floor plugin.
Nash wrote:If GZDB's renderer is messing it up, is MaxEd aware of it? Perhaps it's a bug that he can fix.
It's not working in GZDB because it doesn't care if there's already a plane defined - it just creates a new one. But then I'm not even sure if it's intended to work like that in ZDoom in the first place.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Best method for doubly sloped 3D floors

Post by Graf Zahl »

boris wrote:
NeuralStunner wrote:I stopped using those slope things ages ago, now I use vertex slopes instead. Have you tried them? Much nicer way to get the exact heights you want.
That would be great, but they are unfortunately limited to sectors with exactly 3 sides, so it's not of much use for my 3D floor plugin.
... since the vertex height things are the only means with sufficient fine control you'll have to alter your plugin. Once you have a triangular sector it should be trivial to extrapolate the correct vertex heights for the 3D floor. Any other way to achieve it is just a crutch, doomed to fail.
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

Graf Zahl wrote:
boris wrote:
NeuralStunner wrote:I stopped using those slope things ages ago, now I use vertex slopes instead. Have you tried them? Much nicer way to get the exact heights you want.
That would be great, but they are unfortunately limited to sectors with exactly 3 sides, so it's not of much use for my 3D floor plugin.
... since the vertex height things are the only means with sufficient fine control you'll have to alter your plugin. Once you have a triangular sector it should be trivial to extrapolate the correct vertex heights for the 3D floor. Any other way to achieve it is just a crutch, doomed to fail.
That's what I'm doing already (but with things 9500/9501). When you look at the videos I posted in my plugin thread you'll see that the control sectors pretty small. The problem with the 3-sided sectors is that you can't assign more than 3 tags to use this sector as a 3D floor.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Best method for doubly sloped 3D floors

Post by NeuralStunner »

I always make my control sectors triangular anyway. Uses fewer linedefs.

If you have multiple destination sectors using the same 3D slope, you can tag them all the same. Perhaps the plugin should present a list of current 3D floors (and their characteristics) to allow for this kind of reuse?
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

I'm reusing tags. But consider this:

Image

The control sector of the middle 3D floor has 3 lines with the 3D floor special. If you wanted to add another 3D floor that shares space with one or more of those sectors, you'd need a 4th line in the control sector of the middle floor.
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

I think I've come up with a solution: using a 3-sided sector to create, then surround it with the control sector for the 3D floor, and finally use action 118 to copy the plane:

Image

However, doing it this way may result in pretty extreme z-positions, mostly for very steep slopes and remote control sectors. Are there any practical limitations to the z-positions when using UDMF? Floor and ceiling heights of more than 5,000,000 seem to work fine in GZDoom, but mouse movement in GZDB becomes rather erratic in visual mode. Doesn't really matter for control sectors, though.
User avatar
Nash
 
 
Posts: 17506
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Best method for doubly sloped 3D floors

Post by Nash »

I don't have technical expertise but I'll comment as a user. Since the automatically generated control sectors aren't really meant to be edited through "normal" means without the plugin... as long as the mouse movement remains in normal operation in the regular play area (meaning away from the CSA), I guess that's fine... :S
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Best method for doubly sloped 3D floors

Post by Graf Zahl »

boris wrote: Floor and ceiling heights of more than 5,000,000 seem to work fine in GZDoom

Ouch!
I'm not sure this is really safe. Coordinates are still stored as 16.16 fixed point throughout the engine. The only point where this isn't the case are the slope calculations inside the GL renderer but to be honest, I have no idea why avalue of 5000000 even works for you. Judging from the code it shouldnt.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Best method for doubly sloped 3D floors

Post by NeuralStunner »

Graf Zahl wrote:16.16 fixed point
It's worse, though: 15.16 (With the sign bit limiting you even further.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Best method for doubly sloped 3D floors

Post by Graf Zahl »

Wrong. It's 16.16 signed. Although it's a sign bit you still got a value range of 65536, ranging from -32768 to 32767.
boris
Posts: 782
Joined: Tue Jul 15, 2003 3:37 pm

Re: Best method for doubly sloped 3D floors

Post by boris »

Graf Zahl wrote:[...]I have no idea why avalue of 5000000 even works for you. Judging from the code it shouldnt.
I checked it out again, and while it doesn't crash GZDoom, it doesn't work as expected. Setting a sector's floor height to 5000000 turns to a height of 16264 in game. I.e. the last 16 bit of 5000000.

Unfortunately, with that limitation the 3-sided sectors are not really an option for me.

It's funny how there are like half a dozen more or less obscure ways to define a plane, but none through UDFM. Should be pretty straightforward to set it through extra fields in the sector. Like

Code: Select all

plane_floor_p1_x = <float>;
plane_floor_p1_y = <float>;
plane_floor_p1_z = <float>;

plane_floor_p2_x = <float>;
plane_floor_p2_y = <float>;
plane_floor_p2_z = <float>;

plane_floor_p3_x = <float>;
plane_floor_p3_y = <float>;
plane_floor_p3_z = <float>;
Locked

Return to “Editing (Archive)”