Fila wrote: Sat Nov 28, 2026 12:01 am Kmaster, I'm tightening some rules right now in the engine but we should figure out to make the converter play nicely with the engine. Right now it continuously converts models by different rules and places them either in mid-tier for FPS or worse, in the per-frame tier (which is uploading and rendering the model every single frame).
In monster.ini, under the [Graphics] section add objPathTint=1 which will colour every object in the world in 3 ways:
Green - instanced, the fastest tier. Any object that is not moveable has to be here with the exception of objects with glass/mesh material as they need special rendering. (foliage material goes here in instanced)
Blue - resident cache... middle speed tier. This is reserved only for objects that move (such as the trucks, trains etc)
No colour - it's reuploaded and drawn every single frame. This is what the original game did and what tanks the FPS the hardest. Glass/Mesh material faces (so not the whole model, just the face) go here because they need special rendering and the mesh needs special draw order.
All those trees should be using foliage.
I made a further change (the tightening some rules) that will instance all the objects did by your converter but if the converter changes values again, that means it's going to slip through the cracks again. That's why I was recommending to use the values found inside binedit as they are taken straight from the engine.
I'd like to, but I don't have the source of the latest BinEdit. The only BinEdit source I have is from Mal's 2006 changes, from before materials existed, so it has no material presets. That's why the converters write their own material values instead of BinEdit's. Today they write:
-Cut-out faces (trees, fences, signs): LIT | ALPHATEST | TWOSIDED, with no translucency. So the trees aren't marked as foliage, as you noticed.
-See-through faces (glass): LIT | BLEND | TWOSIDED | NOZWRITE.
-Two-sided solid faces: LIT | TWOSIDED.
I've read this https://www.mtm2.com/~mtmg/misc/MATERIAL_GUIDE.md material guide, which lists the flags each preset sets:
-Foliage: Lit, Alpha test, Two-sided, Translucent.
-Glass: Lit, Gouraud, Blend, Reflect, Fresnel, No Z-write, with reflectivity 0.35, Fresnel bias 0.08, Fresnel strength 2.5, base alpha 0.35 and specular power 32.
-Mesh: Glass plus "Texture alpha = solid".
So our trees are missing Translucent, and our glass is missing Gouraud, Reflect, Fresnel and the numbers. I'll change the converters to match those flag sets.
What the guide doesn't have is what the file actually stores, and that's what I need to match the engine exactly. Could you send me:
-the bit value of each flag, as in engine/3D.H (above all Gouraud, Reflect, Fresnel, Translucent and Texture alpha = solid, which I don't have);
-the Foliage preset's translucency value and how it's stored in the material record (I read it as the top 16 bits of the last word, with the alpha reference in the low 16);
-what changed in the 27 Nov BinEdit update to fix the conversion trees, since the guide may not show it yet;
-anything else the engine checks when it picks the tier.
If that's easier, a small BIN saved from the current BinEdit with one face per preset would work too. An agent can read the values straight from it.
Once I have them, I'll keep those values in one shared place that all my converters use, so a later converter can't mess up again. Then I'll run the tracks with objPathTint=1 and check where each object lands.