Re: A script to build custom shaped 3d floors
Posted: Mon Jan 17, 2022 12:01 pm
Ok, just one question: How do I do it? I downloaded the maps, but it just don't tell anything on how to duild this, or how to script it...
Yeah, there isn't really much to configure. The script runs fine right out of the box. The main reason for the config file was for the script to keep track of it's sector tags and output files. The rest I just threw in for convince.Enjay wrote:Honestly, I just made my source map, called it input.wad, dumped it into the 3dFE folder, and used right-click "run in powershell" on 3dfloors_extrude.ps1 to generate the map using default settings (i.e. I didn't actually bother configuring anything for this first attempt).
Good call, that will be easy enough to addEnjay wrote:Minor convenience suggestion - autoflag control sector lines as not shown on map and control sector floors to not show on the textured automap. Not that big a deal because it doesn't take that long to edit these in after map generation but it would be nice for it to happen automatically (perhaps via a cfg setting).
The 3d floors get their translucency from the source sector lightlevel. If you want them opaque, set it to 255 or higher. UDB calls it brightness on the sector properties panel.Enjay wrote:Not sure why the floors default to translucent either. Again, that strikes me as something that would make sense as a CFG option.
That will work better when I get the script to recognize 2-sided walls. But it'll never give you a real side-view of a level, because of the polar difference between sectors and floors. Sectors are negative space to move around in, while 3d floors are positive space to block movement.Enjay wrote:I didn't actually expect this to work at all, so the fact that I got something that is recognisably MAP01in 3D floors is pretty cool.
Cool, thanks. Like I said, it's really not hard to do manually (especially as the util lines the control sectors and control lines up in a way that makes them easy to select) but it will be a nice thing to have.Sir Robin wrote:Good call, that will be easy enough to add
Honestly, I don't think there is any need. Now that I know the light level sets it (I did wonder - given that all mine came out at 192 - i.e. the Doombuilder default light level - (and, yes, I know it's in the docs too - that's what I get for skim-reading them)) that actually gives a lot of control via how the mapper sets up the initial input.wad. Doing it it via the config file would be less easy and unnecessary duplication of a feature IMO.Sir Robin wrote:I could put in a config option to turn that feature off entirely.
Almost no use whatsoever I imagine.Enjay wrote:A neat "wow factor" but I don't know how useful it would be to a level designer.
Already done. The bulk of a project like this is coming up with the algorithm and the 3d math to do the conversion. Setting a property to a default value is super-easy by comparison. Literally 1 line of code. Done.Enjay wrote:Cool, thanks. Like I said, it's really not hard to do manually (especially as the util lines the control sectors and control lines up in a way that makes them easy to select) but it will be a nice thing to have.
I changed it to use the alphafloor property - in UDB that's called the floor portal alpha. The difference is since that one defaults to 1.0, nobody forgets to set it by mistake, like the lightlevel. So I think that's more convenient and sensical.Enjay wrote:Honestly, I don't think there is any need. Now that I know the light level sets it (I did wonder - given that all mine came out at 192 - i.e. the Doombuilder default light level - (and, yes, I know it's in the docs too - that's what I get for skim-reading them)) that actually gives a lot of control via how the mapper sets up the initial input.wad. Doing it it via the config file would be less easy and unnecessary duplication of a feature IMO.
I can think that if someone was doing a platformer type game and wanted a tall area with lots of platforms, imagine like one of the vertical shaft areas in a Metrovania game, then that script might be useful to them. but really unless there are a ton of platforms, I can't see it being any faster or easier that just building them by hand.Enjay wrote:Almost no use whatsoever I imagine.I only did it to see if anything would come out at all. It is likely to have very little, if any, real world use.
Spoiler:
Spoiler:So the script now works with 2-sided lines and textures them appropriately. I was holding off on that, I really thought those features would be harder to add. Now I'm kinda proud of it.
Thanks!SanyaWaffles wrote:This is really impressive work!
Spoiler:But basic rectangular stairs aren't difficult to do. You could probably create those by hand almost as fast as you could with my script.
Spoiler:Look at the bevels at the tops and the points at the bottom. Yeah you could still do that by hand, but it's kind of a pain. This script does most of that work for you.
Spoiler:
Spoiler:That's a cool 3d floor, but what to do with it? It's just kinda floating out there on it's own. You need to attach it to your level so it looks like it fits in.
Spoiler:Notice there are two templates, one that attaches to the floor and one that attaches to the ceiling. Both of them match up to the geometry of your 3d floor, one above and one below.
Spoiler:Or use the floor matings to make it look like it's supported on the ground:
Spoiler:You can get clever with it, make the pipe look like it's embedded in a higher floor:
Spoiler:Or coming out of a wall:
Spoiler:I think this will be pretty useful, looks way better than just sticking your 3d floor up against a flat surface.