v0.8.3 beta
GoldSrc Map2Prop is a tool for converting .rmf and .jmf files, as well as .obj files exported from the Steam version of J.A.C.K, to goldsrc .smd file that can then be compiled into a goldsrc format studio model without the hassle of using an 3D editor.
Notice:
It has come to my attention that Windows Defender will flag the executable as a trojan. It seems to be a common issue with the bundler I used, and could also be due to me not having used code signing on it yet. I'm working on fixing the latter. (I'm just a webdev who's just starting out making desktop apps, still got a lot of figuring out to do!)
All I can do is promise I haven't put anything nasty in my code, but you should of course not blindly trust a stranger on the internet.
If you're unsure, just come back later when the issue is hopefully fixed. 🙂
Installation
No installation required, simply extract the .7z archive into your folder of choice.
Map2Prop is currently only supported on Windows.
Linux support is planned for a future release.
How to use
For most basic use you just need to ensure all required textures are in the same folder as the project file, or make use of automatic .wad extraction (explained further down). Then simply drag your project file onto the executable.
You may also use the CLI interface. Run
Map2Prop.exe -h
to list all available options.
Map2Prop is able to read and extract textures from .wad packages found in a
wad list
defined in
config.ini
or by command line, from a game/mod defined in
config.ini
, or within the project file's directory, prioritised in that order. The application will automatically do this for all texture files not found within the project file's directory.
Smoothing
Smooth shading and the angle threshold for smoothing can be set in
config.ini
and/or command line, but may also be set by suffixing the file name with
_smooth{x}
where
{x}
is the optional parameter for angle threshold. Leaving out the threshold parameter or setting it to zero will smooth all edges of the model.
Example:
mymodel_smooth60.rmf
will have smooth shading applied to all edges less than 60° apart.
Skip faces
Neither input format does any "inside face" culling. I'm not talking about backface culling, but rather the faces inside of objects.
I recommend covering all unseen faces (as well as any other faces you want to skip) with NULL texture as these will be stripped out during the process.
Why is the Sven Co-op studiomdl.exe required for compilation?
The reason for requiring the
Sven Co-op studiomdl.exe for compiling these models is because of how map textures work, i.e. they may tile or otherwise extend beyond the UV bounds. Legacy studiomdl.exe compilers will clamp UV coordinates which is no good for this. Don’t worry, the compiled model will still work perfectly fine in vanilla Half-Life.
Issues / bugs
Please post any issues/bugs you find as a comment here or as a private message to me. 🙂
I'm currently investigating a small discrepancy in the UV map. So far it looks to me it's just a rounding error or floating point precision error, but won't know for sure until I find the cause of it.
Special Thanks
Thanks to Captain P for showing me the .rmf/.jmf parsing code from MESS!
Alpha Testers
Many thanks goes out to the kind people who helped me test this program and provide useful feedback and suggestions during its alpha stage:
- SV BOY
- TheMadCarrot
- Descen
I haven't had a chance to try the tool out yet, but I am endlessly grateful that you're working on it!
I am very likely to have a chance to experience it soon, thank you very much for your work and love. Love comes from China.
I hope it's useful to those that don't want to learn to use a 3D editor but still want to make model props for their maps. ^^
The program can't start because api-ms-win-core-path-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem.
That's on Windows 7. Why is the executable so massive?
The size is mostly due to a library I used for a lot of the math functions, and I agree it's unnecessarily large. Been working on refactoring out that bloated library since last week and should have a new version ready pretty soon. 🙂
Also found and fixed a bug related to reading .obj files with ORIGIN brushes.
The models look indistinguishable from their brush counterparts.
Amazing job with the program <3
This program is a step forward to make goldsrc propmaking workflow better, for sure. For one, it eliminates the need to use Blender+plugin for the obj to smd conversion.
I really hope you explore the possibility of extracting compiled .bsp models as .objs, which you can feed into the toolchain, as the lightmaps can then be baked into the textures of the props, suitable for larger props e.g. 3d skyboxes.
What this would make possible is a single compile workflow: csg, bsp, vis, rad, bsp2prop.
Again, this tool being at the end means it has rad's lighting information to work with.
I know unrealkaraulov's newbspguy fork has this exact feature, but it's not accessible in the CLI (in fact his fork's CLI is completely broken) and he's been on radio silence as of late.
Crafty can export .bsp as .objs as well but only the whole .bsp. Again, UK's newbspguy comes in a clutch with its ability to export individual brush model as a standalone .bsp, which you feed into Crafty. But again, the problem with these programs are that they have no command line interfaces.
Months ago I had the desire to create a script/tool that would allow me to do that, but I abandoned it. It's good that you made it possible.
The idea i had in mind was basically converting the brush in an entity called "brush_model" with some keyvalues. Then during the compiling process (before zhlt tools process) the script/tool would convert the "brush_model" entity to mdl (using external tools) and then automatically inserting it into the map as a cycler_sprite. I never got around to implementing it, i just coded a few lines to parse the .map file in a basic way.
Here concept map of the idea:
@cindor That sounds similar to the concept Kimilil was talking about.
Someone in the Discord came up with the idea to use custom entities that would be turned into models and put back in the map. I guess one could call a program at the start of the compile process that'd extract these entities from the .map file and run Map2Prop on those (once I finish the .map format support) and then replace these entities with cycler_sprite or whatnot (possibly give it a CLI argument) before overwriting the .map and let the rest of the compile process go as usual. It wouldn't have Kimilil's baked lightmaps, but could been an alternative way of doing this.
I'm thinking instead of using a custom point entity (info_bone) that can hold a
name
andparent
, and have it skinned to the vertices of any brushes grouped with it (or even radius around the entity, could use a keyvalue for that as well). Might look into it after the full release.@SirYodaJedi I think it'll work fine, unless you use any Quake III curved surfaces. Just looked at the code now and realised it doesn't handle the curved surface array in each solid, which will corrupt all other solids after the first one. Already fixing that now 🙂