Instalar Steam
iniciar sesión
|
idioma
简体中文 (chino simplificado)
繁體中文 (chino tradicional)
日本語 (japonés)
한국어 (coreano)
ไทย (tailandés)
Български (búlgaro)
Čeština (checo)
Dansk (danés)
Deutsch (alemán)
English (inglés)
Español de Hispanoamérica
Ελληνικά (griego)
Français (francés)
Italiano
Bahasa Indonesia (indonesio)
Magyar (húngaro)
Nederlands (holandés)
Norsk (noruego)
Polski (polaco)
Português (Portugués de Portugal)
Português-Brasil (portugués de Brasil)
Română (rumano)
Русский (ruso)
Suomi (finés)
Svenska (sueco)
Türkçe (turco)
Tiếng Việt (vietnamita)
Українська (ucraniano)
Comunicar un error de traducción
Never tried to port a map, but i think the idea is the same - u need to join all meshes into 1 object (and make sure its material quantity would not exceed limits to compile to mdl)
props ofc better to be exported individually.
The only problem is if map is big and have complex materials - u will die to export all textures :D
Firstly, import it into blender, which I assume you've already done. Next, I assume you have the CATS blender plugin. If you don't, download and install it now. You press N on the viewport to open the side panel where it's at. Now, create an armature with a single bone, it comes like this by default. Then, join all of the meshes that make up the map and parent them to the armature. Put it all in a collection now, as that will save you time later. Now, on the CATS sidebar, click "Separate by Materials" to split the mesh by its materials. Next, and I used to have a script for this but it's gone now, you want to rename all the materials ON EACH MESH to the names of their base texture. After this is done, select the meshes in groups of NO MORE THAN 32 (you can tell how many are selected if you right click the VERY BOTTOM of blender and turn on scene statistics) and join them together, whether using Ctrl+J or the CATS join selected function. Now, import a source engine model (and since I know you use sourceIO, import it at 1 scale) and scale the armature that they are all still parented to to be proportionate to whomever you just imported. Ideally, they should be a half life 2 character.
NOTE: IF THE MAP IS TOO BIG TO FIT IN THE SOURCE ENGINE, SCALE IT DOWN TO 0.5 OR LESS, AND SCALE DOWN ALL THE MODELS YOU USE IN SFM BY THAT AMOUNT BY ADDING A SCALE CONTROLLER TO THEIR ROOTTRANSFORM. It's the only solution I can think of.
Now, delete them. Apply the transforms on everything, especially the armature, and then do a scene DMX export. This should give you meshes with no more than 32 materials applied each. Now, compile them as a staticprop, just decompile one and sub in your model details, it's easier. Make sure to remove the $bbox and similar commands, or it may disappear when not looking at the center of the model. Now, download notepad++ and VTFEdit if you don't have them already. Also, make sure to put all of the textures in a single folder. If they aren't PNGs already, the CATS blender addon under the optimization tab has a button that will convert them to those. Now, in VTFEdit go to tools and convert folder. Select to VTF, and make sure it says "*.png" in the text box. Set the input folder to wherever the textures are, tick recursive if they're in subfolders, of the input folder, and set the output folder to "materials\models\whateveryouputinthecdmaterialsfortheqcfile" (don't literally put that please) and then press options on the folder convert window. Here, I would recommend you select these options;
Normal Format: DXT1
Alpha Format: DXT5
(With so many textures, compression is basically a must)
Resize ✅
Clamp (only enable and set to like 2048 if there's a lot of 4k or 8k textures, as you don't want dozens of those sitting around)
Mipmaps ❌
(Not needed for SFM and adds around 33% to the texture's size)
Generate normal map ❌
In advanced, set the version to 7.5, and tick off "compute thumbnail". DXT compression should already be set to high, make sure it is if it isn't.
Now, click OK to go back to the batch convert window. Check "Create VMT Files", and press convert.
Next, open notepad++, and press CTRL+H. Go to find in files, and set the directory to where your new VMT files are. Set the filters to "*.vmt" (without quotes), and click match case. Set the text to find to "LightmappedGeneric", and replace it with "VertexLitGeneric", without quotes (or with, if you want. it doesn't make a difference as the shader is surrounded by quotes in the VMT).
Now, press replace in files, and wait.
Once that's done, set the text to find to "translucent", also turn off match case. Now, set the text to replace it with to "alphatest". Press replace in files again, and wait. Now, you're done. You can manually edit the materials individually after this, if you want to add normal maps or something similar. If you're gonna, I'm not trying to be a shill, but I actually wrote a guide on how to properly convert normal maps from other engines to source, you might want to look at that.
Also, I may have missed something, because I'm just saying this all from memory, as I'm typing it on my phone right now, please say if so.
First of all, will I be compiling this as a map (BSP) or as a very large and complex prop (MDL)?
Since you mention a QC attribute, how should the QC look like, or rather what other attributes are necessary for me to put in?
And lastly, it looks like most if not all meshes have some nodes added to them, primarily the material ones (is this what they're called?). Should I do something about it, does it affect the workflow you described, or can I just ignore those nodes?
This would be multiple large .mdls, as studiomdl has a material limit of 32 so it's impossible to compile them all into one. Now, if you want to make it into a map, and you know how to use hammer, just put them all as prop_stafics in the same location, and surround it with a tools black before putting a single, 1 brightness light somewhere in the map.
Next question: The qc.
Like I said, just decompile any static prop from the half life 2 folder, then replace the model name, the materials path, and the $model or $body command it uses with your own, then compile it.
Lastly, the materials.
If they have a bunch of nodes, look at the original texture the material uses. If that texture pretty much looks like the final output, you can ignore it. If it doesn't, you'll have to bake it.
To bake, combine all the objects with materials like this into one object. Go into your blender preferences, and set the render device to CUDA if you use a Nvidia graphics card, OptiX if that works, just use whichever one your graphics card supports. Make sure to check the box with your gpu specified in it, too. Now, go to your render settings, and set it to cycles, and make sure to put it on your GPU. Set the resolution to 4096x4096 or 8192x8192 if your computer is REALLY good, and then create a new armature. Parent the mesh with all of the materials you want to bake to the armature, and select it in CATS via a drop-down menu that appears when you have multiple armatures. Go ahead and press GMOD organic under the bake menu, set it to GPU, and press copy and bake. Now, you should get an exact clone, but with all materials baked to one texture. Delete the original, and then clear the transforms of the new one. That should be it.
Still, I am interested in learning how to port props, which I guess should be simpler and not as time-consuming. The main issue here is that the props I would like to try porting are for Daz 3D. They cost a bit, and while I don't mind purchasing them, I need to be sure I can port them into SFM. I tried looking through discussions but didn't find much about porting from Daz 3D to SFM. Could you guide me, please?