New UDMF features

Remember it never hurts to ask, but you might not get it.
Post Reply
User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Contact:

New UDMF features

Post by Marscaleb »

So, reading about the forthcoming addition of UDMF, I see the potential for a lot of things I wanted to see added to the engine being much more reasonable to add.
Correct me if I'm wrong, as I never heard about UDMF until an hour ago, but since all the properties of everything are being stored as a text file, this means that anything can be added into a map, any detail, any trait, any random garbage. There doesn't have to be an existing variable that can be tweaked, data can just be written into the map as a quality of a given entity. From there, the engine just needs to support said trait. A lot of things I've wanted have suddenly become very easy to support, especially if 3DGE Builder is kept up-to-do date. (Although that is just about WYSIWYG compliance, and maybe making some traits easier to access/modify.)

#1 -Height and meshes

One of the first things that I have wanted is to assign individual HEIGHT to my things. This becomes particularly so if I have decorative polygon things, which is something I have been VERY interested in adding.
To that end, it would be so super snazzy if the editor was also updated to make it super easy to place and modify such things. What I'd ultimately be reaching to emulate is the use of static meshes, like how they are used in Unreal Engine. I'd like to be able to freely add any 3D mesh into my level, place it, rotate it freely (not just in eight directions,) move it up and down, scale it even, swap it out for a different 3D mesh... If I had a flat wall, I could just slap a bunch of meshes all over it to make it look more interesting. Or if I had a big chasm, I could build a bridge by adding meshes. (Granted, collision for these meshes is another issue that needs to be addressed, but one step at a time, you know?)

Strictly speaking, what I have described is almost already possible, just lacking the option to set unique heights for each thing, and perhaps full rotation. But the process of doing this is extended and laborious. Each mesh would have to be its own thing with its own number, I have to set it up in the DDF to establish what mesh and texture it uses, for each and every different mesh.
If the editor was revised around the concept of adding meshes though, it could be something done easily all right inside the level editor. Instead of adding a separate thing with a separate number for each mesh, just add a mesh. (Possibly saved as a special thing number, possibly just added into the map file and just described as a mesh, I'm not picky about the back end.) And then right there in the editor one could easily swap out the mesh for a different mesh. Just say "Hey use this mesh!" And likewise the texture(s). Set other individual properties like how it should handle collision, all right there in the editor so I can see the effects right away without having to go back and forth between different programs and then rebooting the editor so it can see the new DDF.
Honestly this is something that I imagine a lot of people would like in all the Dooms that use UDMF; adding easy static mesh features into Doom Builder might become a hot new thing.

#2 - Switches and effects

One of the annoying hassles in making doom maps is tracking down the exact combination of features I want for a line def. Mapping would be SO MUCH easier if I could set each of those features individually. Line is activated by walking, by pressing a switch, by shooting it -- all of that is ONE flag to set. Line is activated once, or can be activated multiple times -- that is ONE separate flag. Requiring a key to work -- that is ONE separate flag. And then finally the effect that is called out is likewise a separate setting. Thus, no one has to hunt down the one value that covers everything they are looking for, only to discover that Id never needed that feature to be one that only activated once, so you can't even do what you wanted to do. UHG.
But if all those elements are stored separately, I just "craft" the effect I want by picking the traits I require.

Most of this is setting up the editor to make it convenient. (And if you want an example, look at Doom Builder 64. That works this way.) But this is also an engine thing since there are existing limits to what features can be activated by what methods.

Also there are other effects that should be made separate from the "switch and door" effects so that they can be stacked. Texture panning, blinking lights, all of 3DGE's new features like mirrors and portals, scaling texture sizes. Plus the texture panning and blinking lights could benefit from extended customized options so a panning texture can pan in any direction/speed, blinking lights can set a variable for how often they blink or if they blink a color or specific brightness. (Like make the sector dark and have the blink go bright.)

It would also make sense to add speed/timer functions in there as well. Perhaps the user could either specify a specific amount of time like "0.5" or they could just select some preset "fast" "slow" options that correspond with the time frames for vanilla Doom's "Door open fast" and etc.

#3 - Any texture, anywhere.

I made a post about this last year. I still would want it, and UDMF sounds like a great way to implement it.
Any texture on any surface. No more using only flats for floors/ceilings. Textures get to go there now too.
And of course, rotate, scale, etc. Guess those options already exist, though.

#4 - Slopes

You mentioned UDMF on the post where I talked about slopes, but I figure I might as well bring it up here.
Slopes. And set the UVs of the slope so that the texture is aligned either to the floor, to the normal of the slope, or to a specified wall in that sector (for really steep slopes.)
And perhaps also the slopes should be able to be set to any arbitrary angle instead of just connecting to an existing floor/ceiling? Like how sloes work in Duke 3D, as a property of the floor or ceiling instead of a property of a line.
Also it occurs to me that we might want UV options for walls by sloped sectors. Specifically, either to have them UV like normal, or to skew the UV's to match the slope. Here's an example I stumbled across elsewhere on the internet for a polygonal engine.
Image

#5 - Doom 64 lighting
Oh Em Effin Gee, Yes please!
I think the coolest thing ever added to any version of Doom is Doom 64's colored lighting. (You could probably get a peak at the code for Doom 64 EX if you need to.)
There are a couple key things about how they implemented colored lighting. First of all, they separated the lighting into groups. Floors, ceilings, things, and walls all get a separate variable for lighting, and can thus each have their own lighting values.
But what REALLY made the lighting amazing was that the walls had separate values for the tops and bottoms. By adding a subtly different value for them, levels instantly had an amazingly moody effect applied to them. With careful use of blatantly different colors, some really wild effects were produced.
Image
Image

OMG I want this feature without question!

Thinking about the nature of UDMF though, since it extends an easy ability to assign properties to individual elements/instances, there would be no need to follow the same direct method of having five elements of sector lighting values. Or rather, it would make more sense to let these values be inherited so they don't all need to be set all the time.
So what seems reasonable to me would be to just add an element like "bottom" and an element for "things," and all other effect could be achieved by setting lighting for individual entities. If a "bottom" value is set, the ceiling and wall tops are set by the sector lighting, and floor and lower walls are set by the "bottom" value. Things would take their value from the wall gradient, unless a value is supplied for things. If a specific value is desired for the floor or ceiling, just set that value for that entity.
Same ultimate effect as what Doom 64 does, but without the need to set five separate values for each sector.

If you implement the static mesh idea I first mentioned, a mesh should be able to designate itself to use the lighting from the walls, floors, ceiling, or individual self, so that it can best match what it is supposed to look like.

And those are the ideas that come to my head right off the bat.
Man, I really hope these features can be added. These would be exactly the things I would need for my project. I'd help program them if I wasn't such an amateur that I'd need to be walked through everything.

User avatar
Corbachu
Site Admin
Posts: 778
Joined: Fri Jun 08, 2012 11:22 am
Gender:
Contact:

Re: New UDMF features

Post by Corbachu »

This post is great, lots of good ideas here!

I unfortunately do need to finish the base 3DGE_UDMF configuration, update 3DGE Builder again,
and release a new version to accommodate the features. I so far haven't been successful cloning
Zdoom's UDMF config -> 3DGE, but I probably need to put more effort into it.

A couple of things work already -- 3DGE already allows you to put any texture/flat/etc on any
surface =)

As far as meshes go, are you thinking something along the line of a 3D model being imported into
the editor? Like, an MD2 or MD3 or MD5 with actual vertex collision? Because that would probably
be the easiest. I would have to rework the internal bounding box code in 3DGE to accommodate, but
it's been on my mind for awhile now. Unless you are thinking of actual true meshes, that would require
some change to the map format I think, but the general idea is certainly possible.

You can achieve Doom64 lighting already -- it is tagged to a special THINGID that you would place into
a sector. You can easily mimic that lighting effect:

Image

See this post on how to emulate
that lighting. I bet I can have it doable inside of the editor too, with a bit of effort ;)


The biggest thing I need to do first is get UDMF editing up and running in the map editor, and then combine
it with 3DGE's existing config. Then I need to get things like 3D floors and 3D models working in-editor
like they do in GZDoom Builder, so it is a process. I'm glad people are interested in the editor though, it definitely
gives me motivation to come back to it! ^_^
\(סּںסּَ` )/ۜ

User avatar
Marscaleb
Posts: 89
Joined: Sat Jun 25, 2016 12:57 pm
Location: California or Utah
Contact:

Re: New UDMF features

Post by Marscaleb »

Yeah I know you can already accomplish those texture options within 3DGE, but the point is to have it easily integrated into the editor.

Hmm; it's nice to see that it already can run pretty close to the Doom 64 lighting, but it's tied to a thing? So I have to create a thing for each unique lighting effect and drop said thing into each sector to use that light. That's a bit of a hassle if I wanted to use it more than just occasionally; I'd still like to see a native effect in the normal lighting. And I'm not sure if I like it being tied in with the dynamic lighting. Plus, it just occurred to me that if you can light the things differently than the walls and stuff, then you can use the effect to make it look more like the walls are painted a particular color (without having to make a whole new texture) rather than the room being bathed in colored light.

As for the meshes, yes, I was thinking along the lines of dropping in a MD3 file. I mean, I'm sure someone might find it useful if more formats were supported, but the point is still the same. A mesh that I created in an external program, and plop it in as if it were scenery. I'm not sure what you mean by "actual true meshes;" the polygonal objects from the MDx files are real meshes so far as I understand.

You say the vertex collision would be easy. I'm a little surprised and a little confused about that. I suppose if you literally mean to collide with the vertices in the mesh that would be less complex, but I was thinking of a per-poly collision. And if that were easy, well, why don't sloped sectors have sloped collision?
I was thinking that my example of adding a mesh to make a bridge would be something a long ways off since having true 3D collision would require re-writing the collision code.
Also, if meshes could have a per-poly collision, some meshes might be too complex for their own good and bog down the game with expensive calculations. An advanced system would be to specify custom collision hulls for meshes, such as using an alternate (simpler and lower-poly) mesh for the collision, or possibly generating a simple collision hull within the editor. Of course, once things start getting this complicated, you'd want to be able to save a list of definitions for the meshes in your wad file, so you can just add the mesh with all the collision and textures and such set already.
...But that's probably something to think about later down the road.

Oh yeah, and another tidbit I forgot to mention about customizing the editor. I would want to be able to view the meshes as a wireframe when in the 2D mode in the editor. It just seems more sensible to me. Maybe you're already on this; I haven't tried using meshes much in 3DGE. But if I could easily add them into my level, in a way that I can make it (at least appear like) my level is built out of 3D geometry, I would be all over that.