Map2Prop supports MAP format now, what's next?

Posted 8 months ago2024-02-21 23:56:05 UTC
Hi, hope you all are well!

For me I've just been very busy at work and stuff, and most days been too tired to work on any personal projects. Most of these days have just been working, cooking, and trying to sleep. 😅

But had a few days where I managed to force myself to argue with geometric planes and fix up silly mistakes and eventually got the MAP parser and converter finished up and released a new beta version of Map2Prop (and with that also opening the repo to the public).
With that I feel like it's getting near to a state where I can confidently elevate it out of the beta and up to a proper full release. With that comes of course the question of what remains for that.
In the development branch I've already added a config option and CLI argument for auto exiting on finish (instead of waiting for input). I decided to keep the wait-for-input on finish as the default behaviour to give non-CLI-savvy users the opportunity to see the success message or alternatively any possible error/warning messages before the window closes. This option should make it easier to use the application in batch scripts and such, which will later on open up for including it in map compile processes.

Next up is making use of tool textures to accomplish certain tasks. So far I've got this list:
  • ORIGIN: Set a custom origin point for the model instead of using world origin (removed from mesh)
  • BOUNDINGBOX: Set the parameters for the $bbox QC command (removed from mesh)
  • CLIP: Set the parameters for the $cbox QC command (removed from mesh)
  • CONTENTWATER: Mirror all faces of the model
  • BEVEL: Smooth all vertices within this volume (removed from mesh)
  • CLIPBEVEL: Do not smooth the vertices within this volume (removed from mesh)
Lastly I want to create a FGD with a custom brush entity class that will be read by Map2Prop. The idea is to include Map2Prop in the compile process and when fed a MAP file it will read these custom entities, convert their brushes to models, and change these entities to item_generic/cycler_sprite/etc (classname will be specified using a keyvalue) already filled out to use the newly converted model.
The entity class will include keyvalues to configure many of the options already exposed in config/CLI but on a per-entity basis (this will of course also be available outside of the compile process context).

I haven't decided yet whether any of these features will have their own release, or if I'll save all of them for v1.
I want to thank you all for the love you've shown my silly little project already. I'm looking forward to seeing all the maps you guys are making using it and I hope it continues to be helpful 😁

4 Comments

Commented 8 months ago2024-02-23 20:01:11 UTC Comment #106007
Thanks for the updates, this tool is very useful.
Have you already opened the repo?

I like that smart idea of using 'contentwater' for mirror faces

What entities (and keyvalues) do you have in mind for the fgd?. I made a small mock-up in case you haven't thought of one yet, maybe this can help:
// Map2Prop FGD

@BaseClass = Map2Prop
[
    m2p_version(string) : "Map2Prop Version": "1"
    m2p_doc(string) : "Map2Prop Documentation" : "https://erty-gamedev.github.io/Docs-Map2Prop/"
]

@SolidClass base(Map2Prop) = entity_name : "Convert brush into a model"
[
    // Model file name
    name(string) : "Model Name"

    // Add the generated model as a point entity
    entity(choices) : "Append model as entity" : 0 =
    [
        0 : "item_generic"
        1 : "cycler_sprite"
        2 : "cycler"
        3 : "env_sprite"
    ]

    // Where generated .mdl is saved
    path(string) : "output model directory"

    offset(choices) : "Adjust model origin" : 0 =
    [
        0 : "no"
        1 : "center bottom"
    ]

    smoothing(string) : "Smooth shading" : "0"


]
Commented 8 months ago2024-02-24 00:10:08 UTC Comment #106008
Thank you! I had already started working on a FGD, currently it looks like this:
@SolidClass = func_map2prop : "Brushes for Map2Prop to turn into a model"
[
    spawnflags(flags) =
    [
        1 : "Disable" : 0
    ]

    outname(string) : "Exported model's name"
    outdir(string) : "Exported model subfolder"
    gamma(string) : "Gamma (default 1.8)" : "1.8"
    smoothing(string) : "Smoothing threshold (0 disables)" : "60.0"
    scale(string) : "Scale" : "1.0"
    rotate(string) : "Rotate" : "0.0"
    convert_to(choices) : "Classname after conversion" : 0 =
    [
        0: "cycler"
        1: "cycler_sprite"
        2: "env_sprite"
        3: "item_generic"
        4: "monster_furniture"
        5: "monster_generic"
    ]
]
So your mock-up was not far off, just missing some of the QC options.
Also instead of an offset key the mapper should just use an ORIGIN brush to set the model origin. It's a practice most mappers should be familiar with already. 🙂

The source code repo is still private, waiting until v1 to open that one.
Commented 8 months ago2024-02-24 14:04:39 UTC Comment #106009
Suggestions (might be a repeat from the vault):
  1. A way to place/reuse the model multiple places in the map. Maybe a point entity that targets the main func_ entity, inheriting the func_'s convert_to.
    • Technically you can do this with MESS that runs after map2prop, but why use 2 tools when 1 tool do job.
    • Using brush entities that inherit others is actually mighty useful actually, to get the right sizing and positioning in the map. Maybe something like zhlt_usemodel approach is more ideal. Maybe do both.
  2. More bones 🦴, a way to assign different parts of meshes to different bones, and a way to set bone hierarchy (easy enough using target keyvalue)
  3. A way to create separate meshes (i.e. separate bodygroup parts) that is later combined into a single model. Probably separate entities that has a shared keyvalue (like MESS). Probably needs a way to set the main entity from the group too (also like MESS).
Commented 8 months ago2024-02-24 16:40:58 UTC Comment #106010
I could just implement an parent_model key, where the value is another func_map2prop that becomes a template so to speak.
Perhaps add a spawnflag "Is submodel" that makes the mesh of this entity become a submodel of the template's model (or the worldspawn model, if no parent_model is set).

I have some ideas for skeletal stuff, but I'm saving that for post-release.

You must log in to post a comment. You can login or register a new account.