A script to build custom shaped 3d floors

Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder 2, Slade, WadSmoosh, etc.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

A script to build custom shaped 3d floors

Postby Sir Robin » Sat Jan 15, 2022 7:46 am

I've been dinking around with 3d floors - is there any good tool for building those? I've been drawing them out on paper and then putting them in by hand. I wanted to write a script to help me do that faster and easier, so this is what I came up with.

Basically you start a new map, draw sector(s) in the shape that you want your 3d floor(s) to look like from the "front". Then run the script and it takes that XY drawing and flips it up to XZ and extrudes it into the Y axis and saves it as a 3d floor. You can then copy and paste that into your working map.

So for example you could draw a ring and have it extruded into a pipe:
Spoiler:

Or draw the DOOM logo:
Spoiler:

It applies the same textures that you drew the original sector with, and also uses the light level to set the opacity of the 3d floor, but I've notice that only seems to work on flat floors with no slopes, so I don't know how useful that is. Also that software mode can only see flat floors, but collision detection does still work even if you can't see them.

Anyway, is that useful for anyone? It's just a stand-alone script, I wrote it in PowerShell. But maybe if there's some interest in it I could slap an interface on it or put it as a plug-in for UDB or something?

EDIT: My script is posted here.
Here is the latest download link: 3dFloors_Extrude.zip
Important file in the package:
3dFloors_Extrude.ps1 - The main script file
3dFloors_Extrude.cfg - The configuration settings file
3dFloors_Extrude.txt - The readme file. Have a look at this if this is your first time using this script.

Last updated 2022/01/18
The script now handles 2-sided lines properly, and I fixed the texturing. I fixed and tweaked a bunch of small things, and added better error handling.
The control sectors are marked not to show on the textured automap and the lines are set not to show on the regular automap. Thanks Enjay for the suggestion.
The lightlevel property no longer controls floor translucency, I moved than functionality over to the flooralpha property.
Last edited by Sir Robin on Tue Jan 18, 2022 12:26 am, edited 1 time in total.
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: A script to build custom shaped 3d floors

Postby Logan MTM » Sat Jan 15, 2022 9:10 am

Holly Hell! :shock:
User avatar
Logan MTM
I can see you...
 
Joined: 16 Jan 2006
Location: Rio de Janeiro - Brazil

Re: A script to build custom shaped 3d floors

Postby Enjay » Sat Jan 15, 2022 9:38 am

Sir Robin wrote:Anyway, is that useful for anyone?

Is the pope a bear? Do Catholics poop in the woods? ;)

Seriously, that looks like an amazingly useful script and having it as a UDB plugin would be very welcome.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: A script to build custom shaped 3d floors

Postby Nash » Sat Jan 15, 2022 11:44 am

Hi, is it possible to have this be a UDBScript?

In case you are unfamiliar with UDBScript: https://biwa.github.io/udbscript-docs/

That said, UDBScript or not; what you made appears to be VERY useful. I'd certainly love to use it. :)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: A script to build custom shaped 3d floors

Postby SeventhSentinel » Sat Jan 15, 2022 12:31 pm

Now that SRB2 has rudimentary UDMF support, our development team would find that extremely useful as a UDB plugin.
User avatar
SeventhSentinel
 
Joined: 09 Jun 2016
Location: Ohio
Twitch ID: SeventhSentinel

Re: A script to build custom shaped 3d floors

Postby Sir Robin » Sat Jan 15, 2022 3:19 pm

@Logan MTM - now that's a reaction I like to get! :D

@Enjay - what's that? The pope shit on a bear in the woods? :lol:

@Nash - Thanks for the link. Looks like JavaScript. I'll see what it takes to port it over.

@SeventhSentinel - these floors need UDMF line type 160, sector moreids, floorplane_*, and ceilingplane_*, so if you're implementing all that then it should work for you.

So this script is working all well and good, but I'm thinking of what can be even better. I'm thinking I can break the input object into layers, and toggle those layers on and off along the extrusion path, to create more complex shapes.
Then you could cut a hole in the top of that pipe to jump down into:
Spoiler:

Put a fitting around that hole:
Spoiler:

(Yes I know that fitting is clunky looking, I just threw in it real quick as a proof-of-concept)
Cut a hole in the side of the pipe to jump out of:
Spoiler:

And I know I said sloped 3d floors can't be translucent, but if I split it to layers, can you make a layer without slopes and make that translucent and then merge it back in:
Spoiler:


None of this is in the script yet, it's just done by hand as a proof-of-concept. I'm pretty sure I can make it work though.

I'll polish it up and bit and then throw it into github and post a link here - Anyone who wants to try it out in native PowerShell can give it a go.
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: A script to build custom shaped 3d floors

Postby boris » Sat Jan 15, 2022 4:17 pm

Sir Robin wrote:@Nash - Thanks for the link. Looks like JavaScript. I'll see what it takes to port it over.

That's because it is JS ;)
boris
I post less than Manc and Hobo
 
Joined: 15 Jul 2003

Re: A script to build custom shaped 3d floors

Postby Sir Robin » Sat Jan 15, 2022 5:02 pm

Here is some maps to play with
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: A script to build custom shaped 3d floors

Postby Enjay » Sat Jan 15, 2022 9:14 pm

These are very cool indeed.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: A script to build custom shaped 3d floors

Postby ramon.dexter » Sun Jan 16, 2022 1:59 am

Brav brave sir robin!

..he created 3d floor script...
Brave sir robin
He showed us how to use it...
Brave sir robin...

Great work indeed!
User avatar
ramon.dexter
rudebwoy
 
Joined: 20 Oct 2015
Location: Kozolupy, Bohemia
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: A script to build custom shaped 3d floors

Postby Nash » Sun Jan 16, 2022 2:44 am

Excellent work.

Not trying to be pushy or insistent, but I believe this is a perfect use-case for UDBScript, since this is considered an editing aid, and UDBScript was designed to allow this kind of power for users. :)

But of course, using it as an external tool is also fine. Thanks for doing this for the community. :)
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: A script to build custom shaped 3d floors

Postby Sir Robin » Sun Jan 16, 2022 8:44 am

Nash wrote:Excellent work.

Not trying to be pushy or insistent, but I believe this is a perfect use-case for UDBScript, since this is considered an editing aid, and UDBScript was designed to allow this kind of power for users. :)

But of course, using it as an external tool is also fine. Thanks for doing this for the community. :)

I hear ya, and I agree, absolutely. But that is going to require me to learn javascript, learn the interface to UDB, and convert or rewrite my code. So "Get this thing into a UDB plug-in" is a "nice to have" goal, while my immediate goal is "get this thing into the hands of the community ASAP". The path to that goal is to polish up the PowerShell script, document it, and get it uploaded. I'm planning to get that done today.
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: A script to build custom shaped 3d floors

Postby Nash » Sun Jan 16, 2022 9:48 am

Of course, you're right. :) Looking forward to test it!
User avatar
Nash
AKA Nash Muhandes! Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Re: A script to build custom shaped 3d floors

Postby Sir Robin » Mon Jan 17, 2022 7:19 am

OK! Here it goes. Not perfect, but posting it up as is to see what you folks can come up with.

3dFloors_Extrude.zip
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Re: A script to build custom shaped 3d floors

Postby Sir Robin » Mon Jan 17, 2022 8:38 am

gah, pretty obvious bug, I can't believe I didn't test for this. It seem if you have more than 2 heights, it breaks the texturing. So for example the ring has 2 heights, the bottom part and the top part. But for example a figure 8 would have 3 heights, and that seems to be what is breaking the texturing part of the script. The rest of it works, it creates the floors properly, just doesn't texture them.

You can still do that by hand for now - just select all the dummy sectors and make sure they have a floor and ceiling texture set.
User avatar
Sir Robin
 
Joined: 22 Dec 2021
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)

Next

Return to Creation, Conversion, and Editing

Who is online

Users browsing this forum: No registered users and 1 guest